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 |
waht are architecture of web application?
What are the different types of collections views being provided by the map interface? : java collections
How to implement or use the singleton class in java?
What are the classes in the java collection framework? : java collections
What is the Spring2.5 MVC Navigation flow?
Explain the OOPS concept in Realtime Scenarion ? Take example as CAR. Please explain indetail ?
which book is the best for preparing for SCWCD 1.5
Difference b/w >> and >>> ?
How do you create UserTransaction Object? How do you rollback a transaction in a method?
What are the main classes of the list interfaces? : java collections
what is difference between struts1.2 and struts2.0
Is it possible to create Userdefined Unchecked Exception also?If Yes, give an example?