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.

Computer Science & Information Technology

You might also like to view...

Match the following terms to their meanings:

I. Folder holds messages that you have not yet completed A. Shared folder II. Folder that can be accessed by more than one person B. Drafts folder III. Multiple lists of folders with varying message types C. newsgroup IV. Preview pane displays a single e-mail from this location D. Folders list V. Public meeting place for open discussion E. message list

Computer Science & Information Technology

By defining the ________, data consistency is ensured

Fill in the blank(s) with correct word

Computer Science & Information Technology