Thanks & Regards,
shaad
Thanks & Regards,
shaad
Life is easy because we write the source code.....
Thanks & Regards,
shaad
mohammad shaid wrote:Thanks navin.. that was helpfull and thanks pramod... the sub class has both the methods as its not overriding over here... cool..
SCJP6, SCWCD5, SCMAD
SCJP6, SCWCD5, SCMAD
class A {
public void foo(String... a) {
System.out.print("its A");
}
}
class Drag extends A{
public void foo(String a) {
System.out.print("its Troy");
}
public static void main(String[] args) {
A t=new Drag();
t.foo("test");
}
}
Nivin Kumar wrote:
compile time:
At compile time the compiler checks whether the parent class has any method which is compatible with single argument String as it is allows you to compile.
Thanks & Regards
Sumit Kothalikar
Chanakya Gupta wrote:
mohammad shaid wrote:Thanks navin.. that was helpfull and thanks pramod... the sub class has both the methods as its not overriding over here... cool..
this is about var-args,
In the Animal constructor, is the Array syntax for the var-args ok ?
How to assign the var-args ?
Chanakya Gupta wrote:
mohammad shaid wrote:Thanks navin.. that was helpfull and thanks pramod... the sub class has both the methods as its not overriding over here... cool..
this is about var-args,
In the Animal constructor, is the Array syntax for the var-args ok ?
How to assign the var-args ?
|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
Chanakya Gupta wrote:
In the Animal constructor, is the Array syntax for the var-args ok ?
How to assign the var-args ?
|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
M Srinivasan wrote:
can someone please explain this..
.
.
but since the constructor of ANIMAL class has only an int...x as argument type..what happens next ??
thanks
|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
M Srinivasan wrote:thanks :) :thumbup:
Consider Paul's rocket mass heater. |