Answer Posted / sudhakar sahoo
1.Mark the class as final to avoid subclass, So subclass
can't change any thing in super class.
2. When ever you are chaning any property of that class
make a new instance of that calss.
e.g public modify(Object obj0)
{
ClassName a =new ClassName ();
a.modify()// modification logioc
}
Is This Answer Correct ? | 3 Yes | 5 No |
Post New Answer View All Answers
Can you override static methods?
What is prefix of a string?
What is a string what operation can be performed out with the help of a string?
How many types of parsers are there?
What is implicit object in java?
Why is core java important?
what r advatages of websphere? & how to deploy?
What is the primary benefit of encapsulation?
Why java is call by value?
What is visibility mode?
What is ternary operator in java?
What is the use of keywords in java?
Why java is platform independent? Explain.
How infinite loop is declared?
Why java is secure? Explain.