Home Tutorial Java Scjp Part4 SCJP Module-4 Question-5


Share on Google+Share on Google+
SCJP Module-4 Question-5
Posted on: July 9, 2010 at 12:00 AM
The Program given below checks your concept of method overloading and method overriding and also helps in preparation for SCJP exams.

Given the following sample code:

public class Example5{
public float Twin(float a, float b) {...
public float Twin(float a1, float b1) { ...}


Is the method overloading correctly used(in the above code) ? Choose correct option :

1.Correct , method overloading is used

2.Correct ,method overriding is used.

3.Incorrect, same type of argument with exact number of arguments.

4.(1) &(2) both are correct.

Answer : 


Explanation :

Changing the parameter names is not sufficient to count as overloading.


Related Tags for SCJP Module-4 Question-5:

Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: July 9, 2010

Recommend the tutorial

Advertisements Advertisements