The java.util.Date class is introduced in this section. Analyze the following code and choose the best answer:
Which of the following code in A or B, or both creates an object of the Date class:
```
A:
public class Test {
public Test() {
new java.util.Date();
}
}
B:
public class Test {
public Test() {
java.util.Date date = new java.util.Date();
}
}
```
a. A.
b. B.
c. Neither
a. A.
b. B.
Both (A) and (B) are fine. In A, an object is created without explicit reference. This is known as anonymous object.
You might also like to view...
To protect your computer from adware, you would purchase ________ software
A) antivirus B) anti-spam C) antispyware D) firewall
In the accompanying figure, what is item 1 pointing to?
A. color stop B. starting color stop C. ending color stop D. color diamond
When the condition is a question that can be answered with a true or false response, Excel calls this stated condition a(n) ____________________ test.
Fill in the blank(s) with the appropriate word(s).
Which of the following would be used to run an instance of a Layer 2 device within an application?
A. Virtual switch B. Virtual router C. Virtual PBX D. NaaS