Java / Strings
How to create our own immutable class in Java?
- Do not provide any setters.
- Mark all fields as private.
- Make the class final.
More Related questions...
More Related questions...
instanceof
Cloneable is checked?
What is the default implementation of equals method in Object class.
Interviews Questions |
About Javapedia.net Javapedia.net is for Java and J2EE developers, technologist and college students who prepare of interview. Also this site includes many practical examples. This site is developed using J2EE technologies by Steve Antony, a senior Developer/lead at one of the logistics based company. |
||
contact: javatutorials2016[at]gmail[dot]com | |||
Kindly consider donating for maintaining this website. Thanks. |
|||
Copyright © 2020, javapedia.net, all rights reserved. privacy policy. ![]() |