Question 1s Flashcards
Three advantages of using a a java IDE compared to a text editor
IDE comes with preinstalled libraries. It has syntax highlight features. IDE provides you with error detail in the console.
Explain return, throw and final
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
Outline the function of two javadoc tags used in javadoc commenting.
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).
Describe the effects of assisting a class feature to the default access modifier
2
Explain static and package
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
Two advantages of a JARFILE
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
two advantages of javadoc commenting when compared to regular java commenting
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).
define the term utility class
which contains just static methods, it is stateless and cannot be instantiated
Four access modifiers
private.
default (package)
protected.
public