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()

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different types of ways where you can iterate over a list? : java collections

949


Which server-side script takes the input from JavaScript, can access the database if it needs to, and processes the data.

2041


who will give req's to u?. how they send req's to u? . what design documents contains?. when bugs raised on other developer code how to report to them?.(throgh mail or ........). how to retrive 100 recods from dao layer to presentation layer.using which collection?. what is sequence diagram.?.

2274


what is mean by hasing and maping in java platform and advantage?

2316


What are the different types of features of the java collections framework? : java collections

1050


my interviewer asked me what technical specification you used how to answer that question

2322


Hi Friends , am newbie to ajax. For example just consider one account registration - A form contains 8 text fields with submit button. In this form second texbox contains "username " . On right side of text box there is a label box . On clilck action i need to determine user is available or not. Is it possible on clicking label or should i click submit button.

1999


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

977


What are the types of interface used in the java collections? : java collections

996


What are the considerations to be made in case of loops in java ?

983


How do I find jre path in windows?

963


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

2986


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

1006


Which sorting algorithm is used by collections.sort() in java ?

874


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

969