Java za mlade programere (1) - Tutoriali.org
Java za mlade programere (1) - Tutoriali.org
Java za mlade programere (1) - Tutoriali.org
- No tags were found...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
dummy = System.in.read();}}catch(java.io.IOException e){System.out.println("Input error");}}public static String inString(String prompt){// returns input stringinputFlush();printPrompt(prompt);return inString();}public static String inString(){int aChar;String s = "";boolean finished = false;while(!finished){try{aChar = System.in.read();if (aChar < 0 || (char)aChar == '\n'){finished = true;}else if ((char)aChar != '\r'){s = s + (char) aChar;}}catch(java.io.IOException e){System.out.println("Input error");