class Test
{
Test(int a, double l)
{
System.out.println("First");
}
Test(int a, float l)
{
System.out.println("Second");
}
public static void main(String [] rk)
{
Test t = new Test(4, 5);
}
}
---------------------------------------------------------------------
class Test
{
Test(int a, long l)
{
System.out.println("First");
}
Test(int a, float l)
{
System.out.println("Second");
}
public static void main(String [] rk)
{
Test t = new Test(4, 5);
}
}
{
Test(int a, double l)
{
System.out.println("First");
}
Test(int a, float l)
{
System.out.println("Second");
}
public static void main(String [] rk)
{
Test t = new Test(4, 5);
}
}
---------------------------------------------------------------------
class Test
{
Test(int a, long l)
{
System.out.println("First");
}
Test(int a, float l)
{
System.out.println("Second");
}
public static void main(String [] rk)
{
Test t = new Test(4, 5);
}
}
1.error(run time error)
ReplyDelete2.first
second
ReplyDeletefirst