what methods would you overwrite in java.lang.object class?
interface X{ void m1(); void m2(); } class Child2 extends Object implements X { public void m1(){ System.out.println("Child2 M1"); } public void m2(){ System.out.println("Child2 M2"); } } public class ParentChildInfterfaceDemo { public static void main(String[] args){ X x = new Child2(); X x1 = new Child2(); x.m1(); x.m2(); x.equals(x1); } } Will the above code work? If yes? Can you please explain why the code x.equals(x1) will work as the equals method is called on interface reference vaiable?
How do I convert a numeric ip address like 192.18.97.39 into a hostname like java.sun.com?
Can we clone singleton object?
What do you mean by constructor?
What is the catch or declare rule for method declarations?
diff b/w sleep(1000) and wait(1000)?
What is a private class in java?
What languages are pass by reference?
How do you do math powers in java?
What are reference variables in java?
Can you extend singleton class?
What is ascii format?