Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

input java

import java.util.Scanner;

class Input {
    public static void main(String[] args) {
    	
        Scanner input = new Scanner(System.in);
    	
        System.out.print("Enter an integer: ");
        int number = input.nextInt();
        System.out.println("You entered " + number);

        // closing the scanner object
        input.close();
    }
}
Source by www.programiz.com #
 
PREVIOUS NEXT
Tagged: #input #java
ADD COMMENT
Topic
Name
7+2 =