a) There can be only one or zero public class per file and any number of non public classes
b) If there is a public class then file name should match the public class name
c) There can be only one package statement and any number of import statements but package statement should be the first line and import statements should immediately follow if they are there
d) public class can be the first class or come in between or after any number of non public classes
e) there can be a main method in one or any number or classes in the source file
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment