we have a 100 classes at that time which class we have to write main method? pls help me
6 Core Java 6257class A { public void disp(int a,int b) { System.out.println("hai"); } } class B { public void disp(int a,int b,int c) { System.out.println("hai"); } } above program is overloading or overriding?
9 Core Java 11322where to use join method and explain with real time senario?and programatical explenation also..
TCS,
1 Core Java 4047how many rounds in ibm helpdesk interview process for freshers? If u know plz help me
IBM,
2 Call Centre AllOther 12974
Question { 4849 }
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?
Answer
Is This Answer Correct ? | 4 Yes | 0 No |