0

Problem with code

I want to write male as answer to "choose gender" . After that I want "how many"? to come up import java.util.Scanner; public class Personer{ public static void main(String[] args) { System.out.println("Choose gender"); } }

23rd Dec 2016, 12:35 PM
Jim Johansson
Jim Johansson - avatar
1 Odpowiedź
0
import java.util.Scanner; class MyClass { public static void main(String[ ] args) { Scanner myVar = new Scanner(System.in); System.out.println("choose gender "); myVar.nextLine(); System.out.println("what age"); myVar.nextInt(); } } whit this you won't get any output, just input
23rd Dec 2016, 12:53 PM
Leonida17st
Leonida17st - avatar