Integer.parse Int(bf.readLine(System.out.println("enter value for n["+m+"]:"))); can it run under this
1 3069interface 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 5767
What happens when I use / and % with a negative numerator?
How to check if a list is sorted in java?
Can list have duplicates in java?
Can a variable be local and static at the same time?
What is use of a abstract variable?
Can we use string in switch case in java?
What is data type in java?
Can we override private method in java?
What is hash code collision?
What is the lifetime and scope of a variable?
In multi-threading how can we ensure that a resource isn't used by multiple threads simultaneously?
Why is method overloading not possible by changing the return type in java?
What is string and its types?
What is java developer skills?
How is a structure different from array ?