Basics Flashcards

1
Q

What is the difference between an absolute path and a relative path?

A

An absolute path starts from the root element(which is the operating system).
ex. C:\Windows\calc.exe
A relative path is the path that is relative to whatever directory you are currently in.
ex.calc.exe

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

What is Git?

A

Git is distributive version control system that records changes to a file over time so that you can go back and recall those specific changes.

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

What is the relationship between java and javaScript?

A

There is no relationship. They are two different languages.

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

What is a method signature?

A

A method signature is what you write to declare a method. It consists of the modifier(depending on if it’s a class, interface, etc.), the return datatype, the name of the method, and the parameters that will be passed in the method.

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

What is the difference between a constructor and a method?

A

Constructors only get called when the object is created, while methods can be called anytime after the method is created?

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

What is the difference between a checked exception and an unchecked exception?

A
  • Checked exceptions are checked at compile time.
    ex. FileNotFound, IOException
  • Unchecked exceptions are checked at runtime.
    ex. ArrayIndexOutOfBounds
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the difference between a compiler error and a runtime error?

A

A compiler error prevents the program from compiling like a syntax error.

A runtime error is an error that happens while the program is running.

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

What is the difference between the JDK and the JRE?

A

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 for dev use
  • Used only by developers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is overloading and overriding?

A

Overloading occurs when two or more methods in one class have the same method name but different parameters. Overriding occurs when two methods have the same method name and parameters.

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

What is the JVM?

A

The Java Virtual Machine is a program whose purpose is to execute other programs.

The JVM has two primary functions: to allow Java programs to run on any device or operating system (known as the “Write once, run anywhere” principle), and to manage and optimize program memory.

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