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

How to make class immutable

Answer Posted / atul

If declare class as final that means can not Inherited
in subclass.if declare final data members then must be
initializing at randomly or inside constructor otherwise
generate error

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we assign the reference to this variable?

955


Difference between static synchronization vs. Instance synchronization?

1094


Explain the difference between static and dynamic binding in java?

1053


What does int argc char * argv [] mean?

986


What is a nullable field?

1027


Where are variables stored?

956


what is the messsage u r going to get from an objectoriented programing?

2085


What is difference between static and abstract class?

992


What is meant by data hiding/encapsulation?

1090


What is static block?

1108


How to perform binary search in java?

984


What is the difference between an argument and a parameter?

980


What is instance example?

935


How can we make a class singleton?

1055


What is the use of beaninfo?

1021