Theory Flashcards

1
Q

What is void used for?

A

“Void” tells the compiler that the main method doesn’t return a value.

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

What are the “extends” statement used for?

A

The “extends” statement is used to create a subclass of the superclass. It can be used in as many interfaces as you would like but it can only be implemented once.

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

What is JOptionPane?

A

JOptionPane is a dialog box which allows users to enter input.
Importing the JOptionPane Library: javaxswing.JOptionPane;

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

What are the operators in Java?

A

The operators include: +; -; *; /; and %.

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

(esc sequences) ~ Horizontal tab

A

\t

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

(esc sequences) ~ backspace

A

\b

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

(esc sequences) ~new line

A

\n

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

(esc sequences) ~ carriage return

A

\r

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

(esc sequences) ~ form feed

A

\f

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

(esc sequences) ~ single quote

A

'

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

(esc sequences) ~ double quote

A

"

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

(esc sequences) ~ backslash

A

\

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

What is the size of a int variable?

A

32 bits

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

What is the size of a short variable?

A

16 bits

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

What is the size of a long variable?

A

64 bits

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

What is the default value of a char variable?

A

U00000

17
Q

What is the default value of a long variable?

A

0A