General Knowledge Flashcards

1
Q

What does @author mean?

A

Use to specify an author

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

What does @version mean?

A

Used to specify a version number

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

What does @param mean?

A

Used to describe a parameter

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

What does @return mean?

A

Used to describe the value or object returned by the method

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

What does @see mean?

A

Use to refer reader to relevant websites or class memebers

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

True or False?
Wrapper classes are immutable.

A

True

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

Automatic type conversion consists of what 2 things?

A
  1. 2 data types are compatible
  2. The value of the SMALLER tyoe is assigned to a BIGGER data type
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

An attempt to store anything other than a String in a generic type already specified will throw what type of error?

A

Compile-time error

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

True or false you can only parametrize reference types NOT primitive types.

A

True

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

If an attribute can have a naming conflict with a local variable, how do we differentiate the two.

A

Use the this keyword

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

When should one use final?

A

Use final on any attribute which you want to be a constant

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

True or False.
Will you get a compile time error if you initialize a final variable outside the constructor

A

True

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

What happens if in the constructor we do not use the key word this?

A

If we do not use this it refers to the parameter, not the instance

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

If there is a run-time error than it is most likely caused by…

A

An exception

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

What is the difference between the == and equals() method?

A

== means if the variable is true on both sides of the operator for primitive types (int, char)

equals() means to check for the content or value of the actual objects

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

True or false interfaces can be instantiated.

A

False

17
Q

Can void have a return method?

A

Yes it can have a return method but can not return a value