What is the Concept of Encapsulation in OOPS
No Answer is Posted For this Question
Be the First to Post Answer
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?
What are recursive functions?
what is difference between abstract and interface? can i give real time example for the two topics?
Difference between String & StringBuffer
16 Answers IBM, Infosys, Tech Mahindra, Wipro,
How Vector class is synchronized,How to build user defined class as synchronized?
How many types of the indexof method are there for strings?
Is it possible to instantiate the abstract class?
what is main difference between architecture,framework and design pattren
What is the independent variable in an experiment?
How do you compare values in java?
What is singleton math?
What is t in parametric equations?