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...


Why should we create an object? what is a need of it?
Apart from access members of a class i want what is a need
of object what does it contain??
In normal class to access any member of thaht class we
create object where as for static class we access its
members using class name. what is a difference between them...
thanks in advance.



Why should we create an object? what is a need of it? Apart from access members of a class i want w..

Answer / suresh

we may or maynot create object is our wish as per the application requirement
class = our body
methods=works ie; walk,,talk,think......
objects=body parts ie; hands ,legs,eyes....

we have to do any work like walking(method) with legs(object) which connected to ourbody(class)
so object is necessary if we do work ourself

wecall method without using objects that is by using classname followed by methodname
ie we do our works with others just mention our name

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More Core Java Interview Questions

How can we pass argument to a function by reference instead of pass by value?

0 Answers  


How many unicode characters are there?

0 Answers  


What do you mean by constant time complexity?

0 Answers   Amazon,


What are the different data types in java?

0 Answers  


What is consumer in java?

0 Answers  


What are library required to connect to excel sheet.

2 Answers   Cap Gemini,


What is the difference between panel and frame ?

7 Answers   HCL, IBM, Raim Techno Solutions,


Can an interface have a constructor?

0 Answers  


what is mean by String and StringBuffer? What is mean by Methooverriding and Overloading?

2 Answers   Satyam,


Can you create an object of an abstract class?

0 Answers  


Is integer passed by reference in java?

0 Answers  


what should do when using multiple catch() block & what should never do for the same?

1 Answers  


Categories