• Post Reply Bookmark Topic Watch Topic
  • New Topic

userinput  RSS feed

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,there is a similar "code" like userinput?
 
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

Please explain your question in more detail, because it is currently completely unclear what you mean.
 
akol ompen
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jesper de Jong wrote:Welcome to the Ranch.

Please explain your question in more detail, because it is currently completely unclear what you mean.

I tell it clearly i think.Another way to give variables from keyboard
 
akol ompen
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
akol ompen wrote:
Jesper de Jong wrote:Welcome to the Ranch.

Please explain your question in more detail, because it is currently completely unclear what you mean.

I tell it clearly i think.Another way to give variables from keyboard.Creating a class like  userinput  for example
 
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One option. Use System.in to get from standard input. Of course, unfortunately, if standard input has been redirected, then it won't  be the keyboard.

Another option. Use System.console() to get the Console attached to the JVM -- which also can read from the keyboard. Of course, unfortunately, if the JVM is running in the background, then it won't have a console.

And BTW, perhaps it is a language translation thingy, but your original post was completely not clear. And even your follow up, is kinda open to interpretation.  Next time, it may be a good idea to give more than a single sentence as your initial question.

Henry
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!