Hum... what is the interface problem then?
Why there should be a compilation problem on line 3?
how can a class change parameter type of a method of interface
Well, it can't. The interface can just be implemented and its contract should be respected by the implementing classes. In your example, the Device interface is implemented by the Electronic class, so there should be no problems.
Cheers, Roberto Perillo
SCJP, SCWCD, SCJD, SCBCD