Class Java

Class Java

The basic construct of programming is Class Java like the basic constructs for a building is sand, cement and steel. Inside the class, exists other constructs like main, methods, variables and constructors etc.

Java demands to write any code of any thousands of lines, within the class declaration only – between the open brace, {, and close brace, }. Outside the braces not allowed.

Observe the following specimen code.

Class Java
Output screenshot on Class Java

When the programmer gives the execution command, the public class is loaded into the RAM. The execution starts from main() method. For C/C++ people, one strange thing is to compile a Java program, main() is not necessary. That is, to compile Java program, main is not required but to execute main is required.

Know more about classes in Java with the following links of this same Web site,

Following tutorial gives easy entrance to Java.

1. Java Features – Buzz Words
2. Primitive Data Types
3. Data Types Default Values – No Garbage
4. OOPS concepts – introduction
5. Java Naming Conventions – Readability
6. Basic Class Structure, Compilation and Execution
7. Using Local and Instance Variables
8. Three Great Principles – Data Binding, Data Hiding, Encapsulation
9. Using Variables from Methods

More elaborate discussion of classes, abstract classes and interfaces is given in "Java Classes and Interfaces".

Even though, the above topics give you an easy approach to learn, I advice you to take help of your friend knowing Java; the learning goes faster (even you have good programming skills in other languages).

Leave a Reply

Your email address will not be published. Required fields are marked *