java-util-scanner

Storing short strings and numeric values in resources in Android

I want to have some static numeric and text values as an application resource. For example my data is like this: Levels 5 First_Level 500 60 1 Second_Level 500 80 1 Third_Level 200 60 1 Fourth_Level 130 30 2 Final_Level 100 30 3 ... and another 300 lines... The format and order of the data is predefined and guaranteed to be valid. I ...

Java Shell wildcard tokenizer

My Java is extremely rusty and I'm stuck trying to make a user interface that simplifies the execution of shell scripts or batch files depending on whether it's Linus or Win32 respectively. The files have the following naming convention. module-verb-object-etc [args-list] mysql-connect-grid mysql-connect-rds mysql-dump-grid m...

java scanner input does not equal itself?

I'm writing a loop that will exit itself when the scanner receives the string "end". Though, when i type in end the loop continues. so if file = the input, then if(file=="end") is false, even though i typed in end! It's driving me crazy and i'd very much appreciate if anyone could give their thoughts on where this has went wrong. This is...

Scanner in Java not working

I'm trying to write a very simple number guessing game (code is below). After 1 round is finished, the user is supposed to be able to decide whether he/she wants to play another round or not. Problem is, the program always skips the last question (never letting the user answer 'y' or otherwise. What am I missing here? Is there something ...

Scanner to TextIO question.

I need to add a value and input it directly into an array using TextIO. I know that if I was using Scanner I would use the in.nextDouble() function, but how would I do it using TextIO? TextIO.put("Enter credit hours:"); creditHour[sem][grd]+=in.nextDouble(); //I have to use TextIO here. Thanks in advance, ...