import java.util.Scanner; // Dont forget the ";"
public class class_name {
public static void main(String[] args){
Scanner inp = new Scanner(System.in);
System.out.print("? ");
String x = inp.nextLine();
String x = inp.nextInt();
// code here
} // end of main{}
} // end of class{}
- Print on console
System.out.print();
System.out.println();
- Get User Input
Scanner inp = new Scanner (System.in);
// Declare variable <= input
String x = inp.nextLine();
// ...
- if - else