Java Nested Class Question

0 Developer John · February 9, 2015
Why isn't this valid when making a Java nested class:


public class Hello{

public static void main(String[] args){

class Test{
System.out.println();
}
}
}

-Thanks!8-)

Post a Reply

Replies

- page 2
Oldest  Newest  Rating
0 Developer John · February 10, 2015
Isn't it because an object's state is stored in stored in its fields, while an object's behavior is stored in its methods? There should be a connection to that. 
0 Developer John · February 10, 2015
Yes.
  • 1
  • 2

Java / Android Development

124,618 followers
About

Very popular language used to create desktop applications, website applets, and Android apps.

Links
Moderators
Bucky Roberts Administrator