Build
Java Class Files
A Java class file is a file (with the .class filename extension) containing Java bytecode that can be executed on the Java Virtual Machine (JVM). A Java class file is usually produced by a Java compiler from Java programming language source files (.java files) containing Java classes (alternatively, other JVM languages can also be used to create class files). If a source file has more than one class, each class is compiled into a separate class file. Thus, it is called a .class file because it contains the bytecode for a single class.
JVMs are available for many platforms, and a class file compiled on one platform will execute on a JVM of another platform. This makes Java applications platform-independent.
Java - a compiled or interpreted language ?
Most compiled languages read a source code file, process it into native machine code (called object code) and then can also sometimes link the object code with system libraries to create machine-dependent native executable program files. C, C++, and many other languages work this way. Interpreted languages do not have directly executable files, but have a language interpreter that loads the source file and executes the statements therein. Python is an example of an interpreted language. JavaScript is a scripting language, and is closer to an interpreted language, but isn't quite, as it is not designed to be used on its own, but from within another environment equipped with a JavaScript scripting engine, such as a web browser.
Java is a little different yet. It is not interpreted, it is a compiled language. However, it is not compiled to native executable code like C or C++. Instead, it is compiled to a bytecode file that is used by the Java Virtual Machine to convert the bytecode into native executable code. It does this so that the Java program is platform agnostic and can run on any system that supports a JVM without needing modifications. You can compare this with running a game console emulator on your computer. The emulator creates a simulated gaming console that runs files containing compiled images of the games (ROM files) and converts that code to run on its host. The important takeaway is that the JVM is not an interpreter or translator; it creates an emulated environment that is always the same, regardless of its host machine or host operating system, so that it can be seemingly platform independent.
From a programmer's perspective, there is little difference working with an interpreted language, a compiled language, or a scripting language. The process is the same. You write human-readable code, and it gets executed on a machine. It is only the parts in-between those two that differ. Historically, languages that compile to native code allow the programmer the most flexibility because they can take advantage of every aspect of the machine they are programming. Interpreted languages strip away some of that flexibility in order to have a "least common denominator" approach to running the programs, and scripting languages are the most restrictive still, usually removing any ability whatsoever to directly access the host machine or its operating system and/or working with a limited set of features.