Does anyone know how i can get System.in to work.
Ive done this before in C++ by just using cin <<
but i cant seem to get it to work in Java.

import java.io.*;

class menu{
public static void main(String args[]){

int choice = 0;
for(;{
System.out.println(" ");
System.out.println("Press 1 to say Hi");
System.out.println("Press 2 to say Hello");
System.out.println(" ");
System.out.println("Enter a choice: ");
System.in(choice); // dosent seem to work
break;}



switch(choice){
case '1':
System.out.println("Your choice is 1");
break;
case '2':
System.out.println("Your choice is 2");
break;
default:
System.out.println("You must enter in a choice");
break;
}



}
}