sandhyar
Jul 6, 2011, 10:20 PM
public class OverloadTest {
public void computeMethod( int x, float y, byte z) {}
}
Which of the following is considered as overloaded computeMethod ?
private int computeMethod( int x, float y, byte z) {}
private int computeMethod( float x, int y, byte z) {return y;}
public float computeMethod( int x, float y, byte z) {return y;} //answer
public void computeMethod( int a, float b, byte c) {} //y this has become invalid...
public void computeMethod( int x, float y, byte z) {}
}
Which of the following is considered as overloaded computeMethod ?
private int computeMethod( int x, float y, byte z) {}
private int computeMethod( float x, int y, byte z) {return y;}
public float computeMethod( int x, float y, byte z) {return y;} //answer
public void computeMethod( int a, float b, byte c) {} //y this has become invalid...