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

What is the difference between Eclipse and MyEclipse?

7 Answers   IBM, Wavex,


Should we create system software ( e.g operating system ) in java ?

0 Answers  


What is the Spring2.5 MVC Navigation flow?

1 Answers   IBM,


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

1 Answers   IBM, TATA,


Which java collection class can be used to maintain the entries in the order in which they were last accessed?

0 Answers  


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

0 Answers  


What are the different types of classes implemented in the set interfaces? : java collections

0 Answers  


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

0 Answers  


Write a postfix expression to (a*(b+c/d)*d-e)

4 Answers   Adobe,


what is filter ?

2 Answers   SolutionNET,


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

0 Answers  


What is a constructor?

4 Answers  


Categories