Click Here... The figure besides shows the structure of a Java class. The four important terms that makes up the java file are : 1. Source File 2. Class File 3. Method 4. Statement What is a Source file? A Java source file contains any number of classes. But the rule is, declare only one class as public and save the source file with name as that of public class. If not done so, you may get compile time error(Ugh! now what is compile-time error). Dont worry! it will be explained!. If public class is not defined, file can be stored using any name of your choice! Class File! Java is considered as relatively safe and secure because of its ability to convert a java program into a file coded in a stream of 8 bits. This file is generated by Java compiler and executed by The JVM. The class file is a byte code of a java program . Byte code of a java program is portable and readable only to JVM. This file is platform independent. Class file is just a ...
Java Tutorial or Core Java Tutorial or Java Programming Tutorials for beginners and professionals with core concepts and examples covers the basics and fundamentals of java technology. Lets get started!