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 the difference between Eclipse and MyEclipse?
Should we create system software ( e.g operating system ) in java ?
What is the Spring2.5 MVC Navigation flow?
Which is the better framework for web applications, struts or spring, and why?
Which java collection class can be used to maintain the entries in the order in which they were last accessed?
What are the classes in the java collection framework? : java collections
What are the different types of classes implemented in the set interfaces? : java collections
What are the different types of collections views being provided by the map interface? : java collections
Write a postfix expression to (a*(b+c/d)*d-e)
what is filter ?
Hi we have an urgent requirement for Java/J2ee technical lead position & also looking for "Java Guidewire claimcentre" experienced professional for Bangalore location if interested can reach srisanh@gmail.com
What is a constructor?