How can we make a class virtual?
No Answer is Posted For this Question
Be the First to Post Answer
What are mutable classes?
Can you declare an interface method static?
what is struts-config-xml?and its use?
What are the advantages of defining packages in java?
How to sort array of 0 and 1 in java?
Explain the difference between throw and throws in java?
What is the difference between error and exception and explain in simple words not whatever is given in the book.
What is difference between “==” and equals()?
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?
Define iterator and methods in iterator?
What is a method declaration?
can two class in a code be public??if yes then how??