Variables and DataTypes Flashcards
What is the relationship between Java and JavaScript?
There is no relationship
Source Code
Code created by a programmer and saved as a .java file
Byte Code
Is a compiled code that can be read by the JVM independent of the Operating System (Windows, Mac OS, Linux, etc.). Stored in .class files
Machine Code
Is a compiled code that can be read by a specific operating system. Created by the JVM when running.
Java Architecture
A programmer writes Source Code in .java files ---> javac compiles the source code into Byte Code in .class files ---> Java Virtual Machine (JVM) interprets Byte Code into Machine Code that can be understood by the computer’s operating system
Java Version Check
In terminal: java -version
Java JDK (Java Development Kit) Version Check
In terminal: javac -version
Java Runtime Environment (JRE)
Allows execution of Java applications. Installed by default on most OSs Contains the JVM Does not contain libraries and tools for development Used by home users
Java Development Kit (JDK)
Includes development library and tools
Includes the javac compiler
Includes the JRE and JVM
Used only by developers
Workspace
A folder or a directory on the harddrive where Eclipse stores preferences, configurations, and project information about the projects added to the workspace.
Eclipse is an IDE (Integrated Development Environment)
Organizes code into projects and workspaces
Provides immediate feedback on syntax errors
Assists in code with Intellisense
Allows us to suspend a program and step through using a Debugger
Variables
A storage container paired with a name. It holds some known or unknown amount of information, called the value.
Parts of variables
Data Type
Name
Value
Data Type
Defines the type of data stored in a variable and how it’s represented
Name
A label that defines what the variable represents