what methods would you overwrite in java.lang.object class?


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More Core Java Interview Questions

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?

2 Answers  


How do I convert a numeric ip address like 192.18.97.39 into a hostname like java.sun.com?

0 Answers  


Can we clone singleton object?

0 Answers  


What do you mean by constructor?

0 Answers  


What is the catch or declare rule for method declarations?

1 Answers  


diff b/w sleep(1000) and wait(1000)?

4 Answers   Huawei,


What is a private class in java?

0 Answers  


What languages are pass by reference?

0 Answers  


How do you do math powers in java?

0 Answers  


What are reference variables in java?

0 Answers  


Can you extend singleton class?

0 Answers  


What is ascii format?

0 Answers  


Categories