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

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -