Created
September 19, 2013 21:04
-
-
Save bjhaid/6629800 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
import java.lang.Integer; | |
public class Test { | |
public static void main (String args[]) { | |
Scanner input = new Scanner(System.in); | |
while(true) { | |
Integer myint = readWord(input); | |
if (myint != 100) break; | |
System.out.println("Entered word is: " + myint); | |
} | |
} | |
public static int readWord(Scanner scanner) { | |
Scanner input = scanner; | |
System.out.print("Enter word to search for: "); | |
int inputword = new Integer(input.next()); | |
System.out.println("Searching for word "+ inputword+ "..."); | |
return inputword; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment