How to Create Input using JAVA

How to Create Input using JAVA

In this article, you will learn How to Create Input using JAVA. It works like in HTML and PHP


import java.util.Scanner; // import the Scanner class 

class MyClass {
  public static void main(String[] args) {
    Scanner myObj = new Scanner(;
    String userName;
     System.out.println("Enter username"); 
    userName = myObj.nextLine();       
    System.out.println("Username is: " + userName);        

Read on Facebook


  • Connor Burch

    July 29, 2020 - 12:21 pm

    I recently came to state – this article is a greatly written and
    argumentative reading. Thank an individual for it.Seems such
    as I’m being extremely lucky this few days. Thanks a whole lot for the work, maintain writing.
    You usually are too proficient at it to stop.

  • Little Lesley

    May 22, 2020 - 10:52 pm

    I found something similar a couple of weeks before,
    however you did detailed study, and your article seems to be much
    more compelling than others. I am amazed with the arguments you provided as well as the fashion of your article.
    I enjoy when articles are both interesting and informative, when even dull details are
    presented in an interactive way. Well, it is absolutely about your article.

Leave A Reply