Java Flashcards

1
Q

Why use Java

A

It’s a rich api, portable, simple and fast to use.

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

What are the JDK, JRE, and the JVM.

A

JDK: Within the JRE. It’s the Java Development Kit and it holds the compiler.
JRE: Within the JDK. It’s the Java Runtime Environment. This holds the class library.
JVM: This is the Java Virtual Machine and it is where the code actually runs.

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

What’s a class?

A

Blueprint of an object which is an instance of a class

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

What ae the access modifiers and what they can access

A

Public
Private
Protected
Default

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

What are the non access modifiers

A

Abstract, Final, Transient, and Volatile

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

The types and scopes of variables in Java

A

Types: Static, Instance and Local
Scope: Class, Block, Instance

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

The data members and their sizes.

A
Byte - 1
Char - 2
Short - 2
Int - 4
Float - 4
Long - 8
Double - 8 
Boolean - Varies
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Class members in Java

A

Fields, Methods, constructors, inner class, interface, block

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

Is Java 100% OOP?

A

No, because of the 8 primitives

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

Why is the string pool necessary?

A

Strings are Immutable. The string pool holds all the data for the strings in a place in the heap memory so that whenever you call that string or you create a string with the same value, it won’t create more, it will merely point to that one.

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