Y

Yatendra Sir • 5.66K Points
Tutor III

Q. The object cloning is a way to create exact copy of an object

  • (A) True
  • (B) False
  • (C) ---
  • (D) ---
  • Correct Answer - Option(A)
  • Views: 118
  • Filed under category JAVA

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.

Related MCQs on JAVA

Q. What is the output of the Java code snippet?

Q. What is the output of this program?

Q. Choose the correct way of creating an object of the below class.

Q. What will be the output of the following Java program? public class BoxDemo { public static <U> void addBox(U u, java.util.List<Box<U>> boxes) { Box<U> box = new Box<>(); box.set(u); boxes.add(box); } public static <U> void outputBoxes(java.util.List<Box<U>> boxes) { int counter = 0; for (Box<U> box: boxes) { U boxContents = box.get(); System.out.println("Box #" + counter + " contains [" + boxContents.toString() + "]"); counter++; } } public static void main(String[] args) { java.util.ArrayList<Box<Integer>> listOfIntegerBoxes = new java.util.ArrayList<>(); BoxDemo.<Integer>addBox(Integer.valueOf(10), listOfIntegerBoxes); BoxDemo.outputBoxes(listOfIntegerBoxes); } }

Q. Which of the following statements are true?

Q. What will be the output of following Java code?

Q. Which method is called during method overriding in Java if the superclass method is invoked using the "super" keyword?

Q. What will be the output of the following Java program? interface calculate { void cal(int item); } class displayA implements calculate { int x; public void cal(int item) { x = item * item; } } class displayB implements calculate { int x; public void cal(int item) { x = item / item; } } class interfaces { public static void main(String args[]) { displayA arr1 = new displayA; displayB arr2 = new displayB; arr1.x = 0; arr2.x = 0; arr1.cal(2); arr2.cal(2); System.out.print(arr1.x + " " + arr2.x); } }

Q. What is the output of this program?

Q. In RMI program the following example shows the, import java.rmi.*; public interface Adder extends Remote{ public int add(int x,int y)throws RemoteException; }

Learn All JAVA MCQs


Question analytics