+ 1
How to track an input string in Java??
Suppose I'm letting the user to input hundreds of string and whenever an user inputs "New York"....then an output should be generated that someone has just entered "New York".....so that's it......please anyone can help
1 Respuesta
+ 5
//example
String str = "New York";
if(str.equalsIgnoreCase("New York"){System.out.print("New York was entered");}
/*You could use an array and run through the array untill the condition is true*/