User Input

+2 carl fer · July 8, 2015
Hi Bucky! Is it possible to have a User Input in this kind of program? Using Scanner?

Post a Reply

Replies

Oldest  Newest  Rating
+1 Alex Claudio · July 8, 2015
This is possible by importing a scanner and calling it down below: 


In your main class, at the first line write:
import java.util.Scanner;


Then down the bottom call it using this:
Scanner bucky = new Scanner(System.in);
+1 Neil Cannon · July 9, 2015
package bucky;

import java.util.Scanner;

class apples{

    public static void main(String[] args){
            
        Scanner neil = new Scanner (System.in);
        System.out.println(neil.nextLine());
        
        neil.close();
    }
        
}
  • 1

Java / Android Development

107,024 followers
About

Very popular language used to create desktop applications, website applets, and Android apps.

Links
Moderators
Bucky Roberts Administrator