Immutable objects.
1 posts in topic
Flat View  Flat View

Posted By:   Murali_Reddy
Posted On:   Tuesday, October 12, 2004 10:05 PM

can we define an object as immutable?, if so, how?

Re: Immutable objects.

Posted By:   Ranjith_Gopinath  
Posted On:   Thursday, October 14, 2004 02:20 PM

Define a static class, with the member variables preset to a value. Any objects of this class is immutable.

public static void ImmutableClass{

String Name = "Murali Reddy";

Integer age = 100 ;


About | Sitemap | Contact