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 a class immutable?

Answer Posted / rahul

create a class , having some private variables and setter
method for that variable , In constructor pass the
arguments to set this variable.

Is This Answer Correct ?    7 Yes 33 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the role of the java.rmi.naming class?

1143


What is java util concurrentmodificationexception?

958


How do you sort a set in java?

967


What do you mean by append?

1135


Can you have two constructors in java?

1047


Is a class an object?

1074


Does string isempty check for null?

1085


What about member inner classes?

1159


When will we use them?

1102


Where is the singleton class used?

1080


What does a void function return?

1064


how can you catch multiple exceptions in java?

1066


Are static members inherited to sub classes?

1186


What is java literals?

1203


Which is easier netbeans or eclipse?

1106