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
Good Post! Thank you so much for sharing the post, it was so good to read and useful to improve
ReplyDeleteJava Training in Electronic City