Discuss Forum

1.  In a crime , three suspects X, Y, and Z were caught and questioned . Each person said, "One of the other two stole it . I did not do it. " Later on the police found out that Z was lying and these was only one thief . Who was the thief?

  • A. X
  • B. X
  • C. X
  • D. X

Answer: Option C

Explanation:

In Java, you create an object by creating an instance of a class or, in other words, instantiating a class. To create a new object, use Java's new operator. Here's an example using the new operator to create a Rectangle object (Rectangle is a class in the java. awt package).

Post your comments here:

Name:
Mobile:
Email:(Optional)

» Your comments will be displayed only after manual approval.