INPUT
in the header of the class file :
import java.util.Scanner;

in the method:
Scanner sc = new Scanner(System.in);

int i = sc.nextInt();
double d = sc.nextDouble();
long l = sc.nextLong();
byte b = sc.nextByte(); // etc
OUTPUT
for single variables:
System.out.println(single variable);

for multiple variables:
System.out.println(var1+" "+var2+...);

the idea is to convert variables to strings and concatenate them
Comments