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

Example:-

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

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

Read on Facebook

3 Comments

  • Christy Curtis

    July 29, 2020 - 3:35 pm

    Precisely what an excellent tale Our experts have actually recently read
    through! I really like such write-ups which worth reading all of them twice.
    it is actually stuffed with functional info on the subject matter, just like that one . Many thanks a thousand to the writer for such an amazing piece!

  • 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