1/18
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
What type of code is a .java file?
human-readable source code
What type of code is a .class file?
compiled java bytecode that contains machine instructions for the JVM to run the program
What is a .jar file?
a java archive that bundles class files and other resources including a manifest
When does a JAR become runnable?
when the Manifest specifies a Main-Class, which tells Java which class to execute
How do you run a JAR?
java -jar Program.jar
How do you compile a Java source?
javac
How do you run a class?
java ClassName
How do you get the number of arguments?
args.length
JDK
Java Development Kit
What does the JDK do?
it is the development toolkit that is used for developing/compiling Java programs
JRE
Java Runtime Environment
What does a JRE do?
this environment need to run .class Java files which includes runtime libraries and files
JVM
Java Virtual Machine
What does a JVM do?
executes the actual Java bytecode and interfaces with the underlying operating system as an implementation of a JRE
JIT
Just-In-Time compiler
What does the JIT do?
it is part of the JVM that translates specific JVM instructions to CPU instructions
Why is Java portable?
you compile Java into JVM bytecode rather than directly into instructions for one specific operating system/CPU and then the JVM handles the platform-specific execution
Java’s main idea
“Write once, run anywhere”
A main-class must have a…
public static void main(String[ ] ) method