2. Write a interface "Car" with the following methods
void setName(String)
String getName()
void setColor(String)
String getColor()
void setModel(long)
long getModel()



2. Write a interface "Car" with the following methods void setName(String) Str..

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

Post New Answer

More Java J2EE AllOther Interview Questions

What is markup language?

1 Answers  


whats the relation ship between LDAP and JNDI?

1 Answers  


what is difference between business deligate and session facade ?

2 Answers   Fidelity,


What is need of DAO? Write one simple DAO example?

2 Answers   IBM,


which book is the best for preparing for SCWCD 1.5

4 Answers   Google,






what is class/object diagram

3 Answers   Zycus Infotech,


How do I find jre path in windows?

0 Answers  


Hi frnds how to lock an user when he enter wrong credentials more than 3 time using java or j2ee tech take username and password in a bean no need to connect DB and validate give me some sample application code or links its urgent for me thanks in advance

0 Answers   NSN,


Which is the better framework for web applications, struts or spring, and why?

1 Answers   IBM, TATA,


what is acl(access control list)?

1 Answers   Athena, HCL,


What is an algorithm in java collection framework? : java collections

0 Answers  


What is Visual Source Safe(source control Tool)?

1 Answers  


Categories