0

How does system.out.println(var) equal var?

class var; var="hello"; System.out.println(var)???

27th Jan 2017, 10:56 AM
Stone
1 ответ
+ 4
If you're trying to print "Hello" then var, which is your variable, should be of String data type. Example: (Java) String var; var = "Hello"; System.out.println(var); //Outputs "Hello"
27th Jan 2017, 11:21 AM
Ghauth Christians
Ghauth Christians - avatar