Cannot find symbol in java when i use object -
when execute in command prompt, gives error height cannot find symbol
class vol { int height; int width; int length; } class box { public static void main(string args[]) { vol mybox = new vol(); // mybox created object mybox.height = 10; system.out.println(height); } }
class vol { int height; int width; int length; } class box { public static void main(string args[]) { vol mybox = new vol(); //mybox created object mybox.height = 10; system.out.println(mybox.height); } }
try one.
Comments
Post a Comment