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

How is Object Oriented Programming different from Procedure Oriented Programming?

985


how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? Or extending thread class or implementing runnable interface. Which is better? : Java thread

984


How do you clear a method in java?

953


What is indexof?

913


What is a class instance variable?

1057


Which browsers work with java?

1018


Why can't we make a class private in java?

975


What do you mean by object?

913


What will be the default values of all the elements of an array defined as an instance variable?

984


What is the meaning of nullable?

968


Do I need to import java.lang package any time? Why?

1309


What are meta-annotations?

931


What is string pool?

1024


How does enum work in java?

960


Is null a value?

970