Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Input data

 
Mike Sh
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
I know C++ in the language I can input data by using cin >> x;
How can I do this in Java?
Thanks
 
Albert Kam
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
umm, there are many ways to do this kind of stuff.
i'll give one example : (import the java.io.*)
BufferedReader in =
new BufferedReader(new InputStreamReader(System.in));
String input = in.readLine();
eh, i think i got a kind of de javu
hope that helps
cyao !
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!