Write Java statements that compares Objects, O1 and O2, using the getClass() method.

What will be an ideal response?


```
if(O1.getClass() == O2.getClass())
System.out.println("Same class!");
else
System.out.println("Not the same class!");

```

Computer Science & Information Technology

You might also like to view...

A domain name is a unique text-based Internet address corresponding to a unique ____________.

a. IP address b. domain name c. URL d. user name

Computer Science & Information Technology

____ database management systems were introduced as the means by which programmers can store objects and complex datatypes within a database.

A. Flat B. Object-oriented C. Relational D. Network

Computer Science & Information Technology

Explain how to use the Formula Builder in the Toolbox to find the average of the values in a range of cells.

What will be an ideal response?

Computer Science & Information Technology

Microsoft's research indicates that two-thirds of people who open Word documents never, print them

Indicate whether the statement is true or false

Computer Science & Information Technology