M

Mr. Dubey • 53.56K Points
Coach

Q. An array of objects, which may have_______ type of different classes.

  • (A) different.
  • (B) same.
  • (C) mixed mode.
  • (D) common.
  • Correct Answer - Option(A)
  • Views: 95
  • 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 will be the output of the following Java program? class A { public int i; public int j; A() { i = 1; j = 2; } } class B extends A { int a; B() { super(); } } class super_use { public static void main(String args[]) { B obj = new B(); System.out.println(obj.i + " " + obj.j) } }

Q. All methods must be implemented of an interface.

Q. Which one of the following contains date information?

Q. Which of the following is true about inheritance in Java. 1) In Java all classes inherit from the Object class directly or indirectly. The Object class is root of all classes. 2) Multiple inheritance is not allowed in Java. 3) Unlike C++, there is nothing like type of inheritance in Java where we can specify whether the inheritance is protected, public or private.

Q. Java uses UTF-16 Unicode format to represent characters. What is UTF?

Q. What does the following string do to given string str1.

Q. Which Map is synchronized?

Q. In Java, can a subclass inherit private constructors from its superclass?

Q. Which object stores references to the request and response objects?

Q. What will be the output of the following Java program? import java.io.*; class Chararrayinput { public static void main(String[] args) { String obj = "abcdef"; int length = obj.length(); char c[] = new char[length]; obj.getChars(0, length, c, 0); CharArrayReader input1 = new CharArrayReader(c); CharArrayReader input2 = new CharArrayReader(c, 0, 3); int i; try { while ((i = input2.read()) != -1) { System.out.print((char)i); } } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }

Learn All JAVA MCQs


Question analytics