0
Java. Method Scanner
Please, What is the problem of my code, I can not generate two user entries? import java.util.Scanner; public class myMargen { public static void main(String[] arg){ int a, b; Scanner S = new Scanner(System.in); System.out.print("Introduce value A: "); a = S.nextInt(); System.out.print("Introduce value B: "); b = S.nextInt(); } }
1 Respuesta
+ 2
First of all don't start the variables with a Upper case letter, second the code seems correct! Can you elaborate on what you were expecting?