Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Static class vs Singleton class

  1. #1
    Member
    Join Date
    Mar 2011
    Posts
    114
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default Static class vs Singleton class

    What are the prons and cons of using the Static class inplace of Synchronized class and vice versa? googling this hasn't given the rite info.


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,166
    Thanks
    65
    Thanked 2,725 Times in 2,675 Posts

    Default Re: Static class vs Singleton class

    The two/three are not related other than they all start with the letter "s".

  3. #3
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: Static class vs Singleton class

    Quote Originally Posted by tcstcs View Post
    What are the prons and cons of using the Static class inplace of Synchronized class and vice versa? googling this hasn't given the rite info.
    Your first step is to define each. And you'll find that, as Norm said, you're comparing apples and oranges. Or Strawberries and Snakes?
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. [SOLVED] How to make a class be static if it's the main class.
    By javapenguin in forum What's Wrong With My Code?
    Replies: 18
    Last Post: January 10th, 2012, 05:14 AM
  2. Subclassing Singleton class
    By tcstcs in forum Java Theory & Questions
    Replies: 2
    Last Post: December 22nd, 2011, 12:42 AM
  3. Static class that reads from file -> performance issues?
    By rbk in forum File I/O & Other I/O Streams
    Replies: 5
    Last Post: April 18th, 2011, 09:59 AM
  4. Help setting a private static class variable
    By kyuss in forum What's Wrong With My Code?
    Replies: 4
    Last Post: January 26th, 2010, 08:09 AM
  5. Calling a void method into a static void main within same class
    By sketch_flygirl in forum Object Oriented Programming
    Replies: 3
    Last Post: November 15th, 2009, 05:24 PM