TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Serializable Singleton Program in Java
Alagunila Meganathan
Aug 02
2016
Code
442
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
SerializableSingleto
import
java.io.*;
public
class
SerializableSingleton
implements
java.io.Serializable
{
static
SerializableSingleton singleton;
protected
SerializableSingleton()
{
// Exists only to thwart instantiation.
}
private
Object readResolve()
{
return
instancd;
}
public
static
void
main(String args[])
{
singleton =
new
SerializableSingleton();
singleton.readResolve();
}
}
Java