Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > Java Basics
Java Basics General beginning Java language questions that don't fit in one of the more specific forums. Please specify what version.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old June 20th, 2012, 02:42 AM
Registered User
Join Date: Jun 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to avoid another instance of Singleton using reflection?

Hello Guys,

I was doing some interview questions from site http://javarevisited.blogspot.com/20...singleton.html
and I stuck with this question
"How do you prevent for creating another instance of Singleton using reflection?"
I understand Singleton has private instance but I heard we can access private member using Reflection as well.


Similar Threads
Thread Thread Starter Forum Replies Last Post
Share a non-remotable singleton object lok_tan .NET Framework 2.0 4 March 17th, 2008 04:00 AM
provider class singleton not thread safe trystanc BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 7 October 25th, 2007 12:32 AM
Reflection ffbalota C# 2 January 8th, 2004 03:07 PM
Singleton Usage in Clustering and EJB argupta BOOK: Expert One-on-One J2EE Design and Development 0 December 17th, 2003 12:44 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.