Understanding the Java Class Structure


In Java programs, classes are the basic building blocks. When defining a class, you describe all the parts and characteristics of one of those building blocks. To use most classes, you have to create objects. An object is a runtime instance of a class in memory. All the various objects of all the different classes represent the state of your program. In the following sections, we’ll look at fi elds, methods, and comments. We’ll also explore the relationship between classes and files.

back... Fields and Methods...