Method 1 of 3:

For the Windows OS

  1. How to Get Input from Console in Java Picture 1
    Click on the Start (Windows) Button.
  2. How to Get Input from Console in Java Picture 2
    Navigate to the Control Panel.
  3. How to Get Input from Console in Java Picture 3
    Find the Java Icon and double click on the same to open it.
  4. How to Get Input from Console in Java Picture 4
    Once you enter the Control Panel, navigate to the tab named Advanced. Next, navigate to the Heading named as Java Console. Once you access the same, click on the radio button named Show Console. Next Click on Apply and then on the button named OK.
  5. How to Get Input from Console in Java Picture 5
    Once you access the console, there are a number of different command prompts available to you. Select the appropriate one to complete the task. You can read the data from the console in two different ways.
    1. Buffered Reader.The first way is via the Buffered Reader command. The command for the same is shown below.
    2. Scanner .The second method is to use the Scanner command. The details of this command can be seen below
Method 2 of 3:

For the Windows 8 (and above)

  1. How to Get Input from Console in Java Picture 6
    Click on the logo and W simultaneously.
  2. How to Get Input from Console in Java Picture 7
    Search for Java Control Panel
  3. How to Get Input from Console in Java Picture 8
    Click the icon to access the same.
  4. How to Get Input from Console in Java Picture 9
    Once you enter the Control Panel, navigate to the tab named Advanced. Next, navigate to the Heading named as Java Console. Once you access the same, click on the radio button named Show Console. Next Click on Apply and then on the button named OK.
  5. How to Get Input from Console in Java Picture 10
    Once you access the console, there are a number of different command prompts available to you. Select the appropriate one to complete the task. You can read the data from the console in two different ways.
    1. Buffered Reader.The first way is via the Buffered Reader command. The command for the same is shown below.
    2. Scanner.The second method is to use the Scanner command. The details of this command can be seen below
Method 3 of 3:

For the Mac OS

  1. How to Get Input from Console in Java Picture 11
    Click on the logo of Apple located on the top left hand corner
  2. How to Get Input from Console in Java Picture 12
    Navigate to the option named System Preferences
  3. How to Get Input from Console in Java Picture 13
    You will notice the icon for Java.
  4. How to Get Input from Console in Java Picture 14
    Click on the same to access the control panel.
  5. How to Get Input from Console in Java Picture 15
    Navigate to the tab named Advanced. Next, navigate to the Heading named as Java Console. Once you access the same, click on the radio button named Show Console. Next Click on Apply and then on the button named OK.
  6. How to Get Input from Console in Java Picture 16
    Once you access the console, there are a number of different command prompts available to you. Select the appropriate one to complete the task. You can read the data from the console in two different ways.
    1. Buffered Reader.The first way is via the Buffered Reader command. The command for the same is shown below.
    2. Scanner.The second method is to use the Scanner command. The details of this command can be seen below
4.5 ★ | 2 Vote | 👨 195 Views

Above is an article about: "How to Get Input from Console in Java". Hope this article is useful to you. Don't forget to rate the article, like and share this article with your friends and relatives. Good luck!

« PREV POST
NEXT POST »