fork download
  1. System.out.print("グーなら0、チョキなら1、パーなら2を入力してください。>");
  2. int myHand = new java.util.Scanner(System.in).nextInt();
  3. if (!(myHand == 0 || myHand == 1 || myHand == 2)) {
  4. System.out.println("指定された値を入力してください。終了します。");
  5. System.exit(1);
  6. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:1: error: class, interface, or enum expected
System.out.print("????0??????1?????2??????????>");
^
Main.java:2: error: class, interface, or enum expected
	int myHand = new java.util.Scanner(System.in).nextInt();
	^
Main.java:3: error: class, interface, or enum expected
	if (!(myHand == 0 || myHand == 1 || myHand == 2)) {
	^
Main.java:5: error: class, interface, or enum expected
		System.exit(1);
		^
Main.java:6: error: class, interface, or enum expected
	}
	^
5 errors
stdout
Standard output is empty