Java Basics Flashcards

1
Q

Java is similar with what language ?

A
  1. C++
  2. C#
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

The advantages of Java

A
  1. Platform Independence
    • Uses JVM
    • Uses bytecode to run on every devices
  2. Java API
    • Stands for Application Programming Interface
    • Functions that are commonly used
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

The interpretation of Java

A
  1. Code ( public class )
  2. javac ( compiled )
  3. bytecode ( generate )
  4. JVM ( execute )
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does the Java API do ?

A
  1. Do trigonometry
  2. Write data to files
  3. Retrieve information from database
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Features on Java

A
  1. Type Checking
    • Must use the data types ( String , int , float )
  2. Exception Handling
    • An unique approach to error handling
    • Handle by the JRE
  3. Java Version Insanity
    • Updates bring in many improvement
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Java Name

A
  1. JDK ( Java Development Kit )
  2. SDK ( Software Development Kit )
  3. JRE ( Java Runtime Environment )
  4. JVM ( Java Virtual Machine )
  5. Java SE ( Java Standard Edition )
  6. Java EE ( Java Enterprise Edition )
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Where to install the newest version of Java ?

A

https://www.oracle.com/java/technologies/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How to compile a file ?

A
  1. Windows + R ( Type cmd )
  2. Type drive name ( C: , D: )
  3. Locate the folder using cd + Folder Name
  4. Type javac name.java
  5. Type java name
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How to compile more than a file ?

A
  1. It it was in the same file , it will automatically compile it .
  2. Use cmd , then type in all the file
    • javac Trial.java Trial1.java
  3. Compile all file in the same folder
    • javac *.java
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Useful options in cmd

A
  1. -classpath / -cp
    • Program uses class file in other folder
  2. -deprecation
    • Let compiler warn us that we are using older Java API
  3. -source
    • Limit the compiler to previous version of Java
  4. -help
    • List the options that are available for javac command
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the uses of javap ?

A
  1. Tell us what is inside the class files
How well did you know this?
1
Not at all
2
3
4
5
Perfectly