Question 1s Flashcards

1
Q

Three advantages of using a a java IDE compared to a text editor

A

IDE comes with preinstalled libraries. It has syntax highlight features. IDE provides you with error detail in the console.

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

Explain return, throw and final

A

The return statement in Java is used to explicitly return from a method. Java is used to explicitly throw an exception from a method or any block of code.
he final keyword is used in several contexts to define an entity that can only be assigned once

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

Outline the function of two javadoc tags used in javadoc commenting.

A

Info that the user of a class needs to know should go into a Javadoc comment.

Info that a developer modifying a class needs to know go into a normal comment (block or line).

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

Describe the effects of assisting a class feature to the default access modifier

A

2

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

Explain static and package

A

the variable or function is shared between all instances of that class as it belongs to the type, not the actual objects themselves. Package in Java is a mechanism to encapsulate a group of classes, sub packages and interfaces

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

Two advantages of a JARFILE

A

Decreased download time, since the archive is compressed it takes less time to download than it would to download each individual file. Compression: efficient storage

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

two advantages of javadoc commenting when compared to regular java commenting

A

Info that the user of a class needs to know should go into a Javadoc comment.

Info that a developer modifying a class needs to know go into a normal comment (block or line).

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

define the term utility class

A

which contains just static methods, it is stateless and cannot be instantiated

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

Four access modifiers

A

private.
default (package)
protected.
public

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