how would you code this in Java?
char c; int n; cin >> c >> n; So that I can get this kind of inputs:
X123123 1 Answer
You can use Scanner with System.in. E.g.
Scanner s = new Scanner(System.in); char c = s.findInLine(".").charAt(0); int n = s.nextInt(); 3