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);        
  }
}

 

Comments

Popular posts from this blog

Student Result Management System

What Is The Job Role Of A Customer Support Executive?

TOP RECRUITMENT COMPANIES IN INDIA