Friday, 10 May 2013
Constructor - 11 -
What is the result of executing the following code: Select the one right answer.
package net.dharmaraj;
public class Test
{
public static void main(String[] args)
{
Test t = new Test();
t.test(1.0, 2L, 3);
}
void test(double a, double b, /* float */short c)
{
System.out.println("1");
}
void test(float a, byte b, byte c)
{
System.out.println("2");
}
void test(double a, double b, double c)
{
System.out.println("3");
}
void test(int a, long b, int c)
{
System.out.println("4");
}
void test(long a, long b, long c)
{
System.out.println("5");
}
}
a) 1
b) 2
c) 3
d) 4
e) 5
Answer :-- C
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment