View Single Post
Old 04-05-2003, 08:01 PM   #1 (permalink)
Apodysophilia
Regular Contributor
 
Apodysophilia's Avatar
 
Join Date: Apr 2003
Location: noWhere, PA
Posts: 104
Apodysophilia is on a distinguished road
Send a message via AIM to Apodysophilia
Input and out put, Q&A

i know how to do it with int, chara, and double. but how do i do it with String?? and do you know a better way to do it?? and how do i use the use code brackets??, untill i learn i will us the [ SHELL] ones becase it looks good


[SHELL]
private int intValue () throws IOException
{
int value;

BufferedReader input = new BufferedReader( new InputStreamReader( System.in) );

String inputStr;
inputStr = input.readLine();
StringTokenizer sTok = new StringTokenizer ( inputStr);
value = Integer.parseInt( sTok.nextToken() ) ;

return value;
}

[/SHELL]
Apodysophilia is offline   Reply With Quote