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 / vaibhav

1 Make the all variables of class final and private
2. Make only private constructor

Is This Answer Correct ?    5 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is optional in java 8?

1070


Difference between string, string builder, and string buffer?

1114


What is JFC?

1255


Is java owned by oracle?

1025


What is the use of set in java?

1129


How do you clear a method in java?

1014


What does void * mean?

1042


Why is multithreading important?

952


How to write custom exception in java?

1064


How many arguments can a method have java?

1037


What is multithreading and its advantages?

1075


What is outofmemoryerror in java?

1037


How do you remove all elements from an arraylist in java?

1038


What programs use java?

967


What is foreach loop in java?

1025