+ 1
What means separate line?
3 Respostas
+ 1
int x= sc.nextInt();
You can also initialize it as int X. However, using lowercase is better
+ 1
Example:
println("hello");
println("java);
Output:
hello //line 1
java //line 2
+ 1
Thanks Muhd Khairul. I also have a question. In Java, when I use Scanner to get user input data if I use two variables x and y to calculate a sum for example, when I press run I must introduce x and y. What sign should I use for introducing both x and y? X - y? X / y? Thank you