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 need of DAO? Write one simple DAO example?
What are the differences between the java collection and the java list? : java collections
What are the types of interface used in the java collections? : java collections
What is the use of hashcode in java ?
VSS Objectives
What is the Spring2.5 MVC Navigation flow?
What do you understand by synchronization? Why is it important?
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 deque in the java collections framework? : java collections
What are maps interfaces in the java collections? : java collections
what is diff string and stringbuffer
What are the types of java collections? : java collections