+ 1

Why do variables show no output?

3rd Sep 2018, 2:04 PM
himanshu
himanshu - avatar
3 odpowiedzi
+ 5
//Think of them as empty boxes String box = "ball"; //lets open the box System.out.print(box); //output ball
3rd Sep 2018, 2:46 PM
D_Stark
D_Stark - avatar
+ 3
variable only keep value you need to print there value to see output
3rd Sep 2018, 2:32 PM
Sudarshan Rai
Sudarshan Rai - avatar
+ 1
it will show output without initalizing bt this is not applicable for local variable it is only for static and class variable
3rd Sep 2018, 5:27 PM
Aarav Raj
Aarav Raj - avatar