public static void game() { while (!word.equals(currentWord) && strikes < Stuff.maxStrikes) { String s = stan.next(); s = s.toLowerCase(); word.indexOf(s); if (s.length() > 1) { System.out.println("ENTER ONE LETTER AT A TIME, GENIUS."); } else if (word.indexOf(s) != -1 && guesses.indexOf(s) == -1) { guesses += s; letter(s); System.out.println("Good job!"); } else if (guesses.indexOf(s) != -1) { System.out.println("You already guessed that"); } else { guesses += s; strikes++; System.out.println("Nope, not in the word"); } Stuff.printMan(strikes); System.out.println(currentWord); } if (strikes == Stuff.maxStrikes) { System.out.println("You Lose, Loser"); } else { System.out.println("You Win!"); } }
public static void main(String[] args) throws Exception { String url = "jdbc:mysql://localhost:3307/"; String dbName = "test"; // "world"; String driver = "com.mysql.jdbc.Driver"; String userName = "******"; String password = "******"; Class.forName(driver).newInstance(); Connection conn = DriverManager.getConnection(url + dbName, userName, password); JDapper jd = new JDapper(conn); Stuff s = new Stuff(); s.string1 = "Hi youtube"; s.number1 = 42; jd.insert("stuff", s); }
public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ScheduledEvent that = (ScheduledEvent) o; if (schedule != null ? !schedule.equals(that.schedule) : that.schedule != null) return false; if (source != null ? !source.equals(that.source) : that.source != null) return false; if (timeStamp != null ? !timeStamp.equals(that.timeStamp) : that.timeStamp != null) return false; return true; }
public static void main(String[] args) { // TODO Auto-generated method stub Stuff.laptop = "Asus"; // Stuff.subjectName(); System.out.println("Round before Stuff was created " + Stuff.rounds); Stuff thingOne = new Stuff(); new Stuff(); System.out.println("Round after Stuff was created " + Stuff.rounds); thingOne.name = "Hemang"; thingOne.sayName(); thingOne.subjectName(); System.out.println(Math.PI); System.out.println(Stuff.LUCKY_ME); }
String convert(final Stuff stuff) { return String.format( FORMAT, getCleansedString(stuff.getKey()), getCleansedString(stuff.getValue())); }
public int hashCode() { int result = source != null ? source.hashCode() : 0; result = 31 * result + (timeStamp != null ? timeStamp.hashCode() : 0); result = 31 * result + (schedule != null ? schedule.hashCode() : 0); return result; }