hi i tried this
public class B {
public static
String toString()
{
return "HI";
}
public static void main(String s[])
{
System.out.println(new B());
}
} //B class ends
when comiled::::::::::::::::
B.java:4: Instance methods can't be overridden by a static method.
Method java.lang.String toString() is an instance method in class java.lang.Obje
ct.
public static String toString()
^
1 error
can anyone explain me this
Thanks in advance....
------------------
Sachin,
****************************************************
Learn from others mistakes. Life is too short to make all yourself.
****************************************************