wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Doubts on core java concepts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Doubts on core java concepts" Watch "Doubts on core java concepts" New topic
Author

Doubts on core java concepts

Padma priya Gururajan
Ranch Hand

Joined: Oct 05, 2006
Posts: 437
Hi,

1) Can you tell the difference between mutable and i mmutable class?
2) When you we go for abtract classes?


Thanks


Padma priya N.G.
Be the change you want to be - Mahatma Gandhi
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

1. You can not change internal state of immutable object, where as its possible to modify object if its mutable one.

2. If you found a set of objects sharing some common behavior and you want to encapsulate this common logic to one place, you can create a base _abstract_ class and let those classes to extend it.


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
 
 
subject: Doubts on core java concepts