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

What is the difference between dom and sax parser in java?

974


What is an iterator java?

1103


What is the meaning of nullable?

1010


What is the generic function?

984


Can we nested try statements in java?

1097


What is dynamic array in java?

1023


Explain about varargs in java?

1130


How many functional interfaces does java 8 have?

1026


Name and explain the types of ways which are used to pass arguments in any function in java.

1077


What are the different types of sorting in java?

976


How do you reverse a string in java?

1116


What is the differences between heap and stack memory in java? Explain

982


What is a dynamic array in java?

1174


Explain about the main() method in java?

1100


What is the order of arraylist in java?

1132