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

How do you decide when to use arraylist and linkedlist?

942


How do you reverse a list?

949


How do you print array in java?

921


What is the purpose of assert keyword used in jdk1.4.x?

1009


Java.util.regex consists of which classes?

941


What is ordered map in java?

950


What is the difference between preemptive scheduling and time slicing?

1003


What is difference between hashset and hashmap?

1053


What does a method signature consist of?

924


How finally used under exception handling?

896


What is 16 bits called?

888


Give me an example of array and linked list? Where they can be used?

956


Can you have two constructors in java?

898


what is mena by object block any what is the use of that

2161


Write a java program to count the number of words present in a string?

938