Tuesday, 24 July 2012

examples of tricky and confusing java questions which asked in written test of java job interview ?(Right solution)

class A
{
public void m1(String str)
{
System.out.println("I am from String agrument method");
}

public void m1(Object obj)
{
System.out.println("I am from Object argument method");
}
public static void main(String args[])
{
A aobj=new A();
aobj.m1(null);
}
}


Solution : -
     "I am from String agrument method"

No comments:

Post a Comment

What is Map Collection?

A map collection refers to a set of maps that are compiled and organized for a specific purpose, such as research, education, or preservatio...