OCA Java SE 8 Building Blocks - OCA Mock Question Building Block 13
Question
Which of the following are true? (Choose all that apply)
- javac compiles a .class file into a .java file.
- javac compiles a .java file into a .bytecode file.
- javac compiles a .java file into a .class file.
- Java takes the name of the class as a parameter.
- Java takes the name of the .bytecode file as a parameter.
- Java takes the name of the .class file as a parameter.
Answer
Note
Java puts source code in .java files and bytecode in .class files.
Java does not use .bytecode as file extension name for compiled source code.
When running a Java program, you pass just the name of the class
without the .class
extension.