Java Basics Flashcards
1
Q
Java is similar with what language ?
A
- C++
- C#
2
Q
The advantages of Java
A
- Platform Independence
- Uses JVM
- Uses bytecode to run on every devices
- Java API
- Stands for Application Programming Interface
- Functions that are commonly used
3
Q
The interpretation of Java
A
- Code ( public class )
- javac ( compiled )
- bytecode ( generate )
- JVM ( execute )
4
Q
What does the Java API do ?
A
- Do trigonometry
- Write data to files
- Retrieve information from database
5
Q
Features on Java
A
- Type Checking
- Must use the data types ( String , int , float )
- Exception Handling
- An unique approach to error handling
- Handle by the JRE
- Java Version Insanity
- Updates bring in many improvement
6
Q
Java Name
A
- JDK ( Java Development Kit )
- SDK ( Software Development Kit )
- JRE ( Java Runtime Environment )
- JVM ( Java Virtual Machine )
- Java SE ( Java Standard Edition )
- Java EE ( Java Enterprise Edition )
7
Q
Where to install the newest version of Java ?
A
https://www.oracle.com/java/technologies/
8
Q
How to compile a file ?
A
- Windows + R ( Type cmd )
- Type drive name ( C: , D: )
- Locate the folder using cd + Folder Name
- Type javac name.java
- Type java name
9
Q
How to compile more than a file ?
A
- It it was in the same file , it will automatically compile it .
- Use cmd , then type in all the file
- javac Trial.java Trial1.java
- Compile all file in the same folder
- javac *.java
10
Q
Useful options in cmd
A
- -classpath / -cp
- Program uses class file in other folder
- -deprecation
- Let compiler warn us that we are using older Java API
- -source
- Limit the compiler to previous version of Java
- -help
- List the options that are available for javac command
11
Q
What are the uses of javap ?
A
- Tell us what is inside the class files