+ 1

If a variable used in println function whether the variable name is printed or variable value is printed?

15th Mar 2018, 1:46 PM
A.G.RAGHUL
A.G.RAGHUL - avatar
3 Answers
+ 16
depends whether U putted variable in double quotes or not System.out.println(var); //prints value of variable var System.out.println("var"); //prints var
15th Mar 2018, 1:52 PM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 2
thank you
15th Mar 2018, 1:54 PM
A.G.RAGHUL
A.G.RAGHUL - avatar
15th Mar 2018, 1:47 PM
A.G.RAGHUL
A.G.RAGHUL - avatar