How to make a read-only class in java?



How to make a read-only class in java?..

Answer / Archana Jain

In Java, a class can be made read-only by declaring all its methods as final and providing no setter methods.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is java instanceof operator?

1 Answers  


what is meant by string pooling?

12 Answers   Oracle, Polaris, Tribal Fusion, Wipro,


What is methods and methodology?

1 Answers  


In which JDK version event-delegation model is introduced?

1 Answers  


What design pattern you have used in your project? I answered Factory pattern, how it is implemented? What are its advantage? Do know about Abstract Factory?

1 Answers   Bravura Solutions,


What is return type in java?

1 Answers  


What is the lifetime and scope of a variable?

1 Answers  


What advantage do java's layout managers provide over traditional windowing systems?

1 Answers  


What is the main purpose of serialization in java?

1 Answers  


How do you take thread dump in java?

1 Answers  


What is JVM and is it platform independent?

1 Answers  


can rmi and corba based applications interact ?

1 Answers  


Categories