0
Where problem?
3 Answers
0
Pleasure. Happy coding :)
+ 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);
}
}
0
Thank!