15-05-2012, 12:06 PM
bytecode
![Microsoft PowerPoint Document .ppt](https://seminarproject.net/images/attachtypes/ppt.gif)
Bytecode is a highly optimized set of instructions designed to be executed by the Java run-time system, which is called the Java Virtual Machine (JVM).
The JVM is an interpreter for bytecode.
However, the fact that a Java program is executed by the JVM helps solve the major problems associated with downloading programs over the Internet.
Translating a Java program into bytecode helps makes it much easier to run a program in a wide variety of environments. The reason is straightforward: only the JVM needs to be implemented for each platform. Once the run-time package exists for a given system, any Java program can run on it.
The fact that a Java program is interpreted also helps to make it secure. Because the execution of every Java program is under the control of the JVM, the JVM can contain the program and prevent it from generating side effects outside of the system..
classes
The General Form of a Class
When you define a class, you declare its exact form and nature. You do this by specifying
the data that it contains and the code that operates on that data. While very simple classes
may contain only code or only data, most real-world classes contain both. As you will
see, a class’ code defines the interface to its data.
A class is declared by use of the class keyword. The classes that have been used up
to this point are actually very limited examples of its complete form. Classes can (and
usually do) get much more complex. The general form of a class definition is shown here