Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

waht are architecture of web application?

2 Answers  


What are the different types of collections views being provided by the map interface? : java collections

0 Answers  


How to implement or use the singleton class in java?

3 Answers  


What are the classes in the java collection framework? : java collections

0 Answers  


What is the Spring2.5 MVC Navigation flow?

1 Answers   IBM,


Explain the OOPS concept in Realtime Scenarion ? Take example as CAR. Please explain indetail ?

0 Answers   Cap Gemini,


which book is the best for preparing for SCWCD 1.5

4 Answers   Google,


Difference b/w >> and >>> ?

1 Answers   Adobe, Infosys,


How do you create UserTransaction Object? How do you rollback a transaction in a method?

1 Answers   HCL,


What are the main classes of the list interfaces? : java collections

0 Answers  


what is difference between struts1.2 and struts2.0

1 Answers  


Is it possible to create Userdefined Unchecked Exception also?If Yes, give an example?

1 Answers   HCL,


Categories