Basic Java Language: Difference between revisions
wikademia>Cremisis13 →Protection: Addition of clarification |
wikademia>Cremisis13 →Protection: Classes |
||
| Line 48: | Line 48: | ||
"class it is in" means the class that you have created using <code>public class NAME</code>. You will learn about packages later, but essentially they are a package of related code (classes). "Subclass" is that it can be accessed from any class that extends it (see Inheritance). | "class it is in" means the class that you have created using <code>public class NAME</code>. You will learn about packages later, but essentially they are a package of related code (classes). "Subclass" is that it can be accessed from any class that extends it (see Inheritance). | ||
Protection of classes is a little different. When you say "public" it means that the class is the main class in that .java file. Notice "main class" - you can have multiple classes in the same .java file, but only one public or "main" class. | |||
=Statements= | =Statements= | ||