V

Vishal Gupta • 7.73K Points
Tutor III

Q. What is the advantage of Method Overloading?

  • (A) Method overloading increases the readability of the program
  • (B) Method overloading does not increases the readability of the program
  • (C) Method overloading does not increases the reliability of the program
  • (D) None of the above
  • Correct Answer - Option(A)
  • Views: 81
  • 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. Which is the correct way of knowing Array Size in Java?

Q. What is the output of the below Java program with method overloading?

Q. What will be the output of the following Java program? class Output { public static void main(String args[]) { char a[] = {'a', '5', 'A', ' '}; System.out.print(Character.isDigit(a[0])+ " "); System.out.print(Character.isWhitespace(a[3])+ " "); System.out.print(Character.isUpperCase(a[2])); } }

Q. Determine output: public class Test{ public static void main(String args[]){ MyClass obj = new MyClass(); obj.val = 1; obj.call(obj); System.out.println(obj.val); } } class MyClass{ public int val; public void call(MyClass ref){ ref.val++; } }

Q. Which Java method is used to add all of the specified elements to the specified collection?

Q. Which of these is not a correct statement?

Q. Which of the following is FALSE about arrays on Java

Q. If class Dog has a subclass Retriever, which of the following is true?

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 = input1.read()) != -1) { System.out.print((char)i); } } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }

Q. What will be the output of the above fraction of code ?

Learn All JAVA MCQs


Question analytics