Jump to content

Java class file

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Harikishore~enwiki (talk | contribs) at 04:51, 17 June 2004 (A stub about .class file). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

The java source files(.java files) gets compiled into .class files. Since Java is a platform-independent language, it compiles its sources into bytecode, which it stores in a .class file. If the source code has more than one class, each class is compiled ino a separate .class file. These .class files can be loaded by any Java Virtual Machine.

Since JVMs are available for many platforms, the .class file compiled in one platform will execute in a JVM of another platform. This makes Java platform-independent.