26th Sep 2017, 1:49 PM
Illia Svud
Illia Svud - avatar
3 Answers
0
Pleasure. Happy coding :)
26th Sep 2017, 7:27 PM
Duncan
Duncan - avatar
+ 2
A few things: 1) You nested one class within another 2) You have no 'main' method 3) "Person man=new Person" creates an instance of a person object. With your println you referenced 'Person' instead of 'man' public class Person{ int height=180; } class myProgram { public static void main(String[ ] args) { Person man=new Person(); System.out.println(man.height); } }
26th Sep 2017, 2:09 PM
Duncan
Duncan - avatar
0
Thank!
26th Sep 2017, 2:32 PM
Illia Svud
Illia Svud - avatar