2. Write a interface "Car" with the following methods
void setName(String)
String getName()
void setColor(String)
String getColor()
void setModel(long)
long getModel()
Answer / suresh sa
interface car{
void setName(String s);
String getName();
void setColor(String color);
String getColor();
void setModel(long model);
long getModel();
}
I Think u r trying to create getter and setter fields for
the above parameters better go for POJO, rather than going
for interface
Is This Answer Correct ? | 1 Yes | 0 No |
what is hibernate ceteria ?
Explain JSP life cycle?
What is the difference between comparable and comparator in java.util pkg?
Should we create system software ( e.g operating system ) in java ?
what is the diffrence between insurance and telecom domain?
How to call the m1() method of Base class in below snippet ? class Base { public void m1() { System.out.println("Base m1 "); } public void m2() { System.out.println("Base m1 "); } } ====================== class Derived extends Base { public void m1() { System.out.println("Derived m1"); } public void m3() { System.out.println("Derived m3"); } public static void main(String[] args) { Base ob=new Derived(); ob.m1(); //System.out.println("Hello World!"+ob.m1()); } }
waht are architecture of web application?
What is the Spring2.5 MVC Navigation flow?
How many controlers are there in spring? Plz send me ans
what debugging tool that can be used to debug the java programs?
can u draw class/object diagram for ATM
0 Answers HCL, Zycus Infotech,
VSS Objectives