• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

userinput

 
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
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • 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
Posts: 23834
140
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux 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!