Advertisement

12.19.2004 at 11:32PM PST, ID: 21248115
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

4.4

Singleton class

Asked by sathyaarul in Miscellaneous Programming, New to Java Programming, Delphi Components

Tags: , ,

Hi
    This is property file.
Here static method -we dont create instance and access the method through Class.Object.
Now What i need this class should be singleton-that is i dont want create Object of this class -how?

This is my code -can u update and reply?


import java.util.*;
import java.io.*;

class PropertyManager
 {
   private static final Properties prop = new Properties();
private static  FileInputStream fin = null;
   public static void getInstance()
    {

     try
      {
        fin = new FileInputStream("PBCQueryproperties.properties");
        prop.load(fin);
        fin.close();
           }
          catch(IOException e)
          {
        System.out.println("The error is:"+e);
     }
   }

public static String getProperties(String querykey)
   {
     String str = null;

     try
      {
              System.out.println("this is inside of getProperty try block before:"+str);
              if( fin != null)

              str = prop.getProperty(querykey,"No Value found");
              System.out.println("This is inside of getProperty try block After:"+str);

    }
     catch(Exception e)
      {
          System.out.println("This is get property exception:"+e);
        }
   return str;

 }



public static void main(String args[])
  {
       String str = null;
       //PropertyManager pm = new PropertyManager();
       //Properties prop1 = new Properties();
     PropertyManager.getInstance();
     str = PropertyManager.getProperties("pbc.features.ai.fetchempid");
     System.out.println("The String value of Query is :"+str);
  }

}

Thanks

Arulkumar R





Start Free Trial
 
Loading Advertisement...
 
[+][-]12.20.2004 at 01:36AM PST, ID: 12865108

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Miscellaneous Programming, New to Java Programming, Delphi Components
Tags: arulkumar, fileinputstream, properties
Sign Up Now!
Solution Provided By: murugesandins
Participating Experts: 1
Solution Grade: B
 
 
[+][-]12.20.2004 at 02:32AM PST, ID: 12865425

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.20.2004 at 04:16AM PST, ID: 12865810

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.20.2004 at 05:13AM PST, ID: 12866047

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.20.2004 at 09:08PM PST, ID: 12873340

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.22.2004 at 10:36PM PST, ID: 12890472

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.22.2004 at 10:38PM PST, ID: 12890479

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.22.2004 at 10:44PM PST, ID: 12890485

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.22.2004 at 10:45PM PST, ID: 12890491

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.22.2004 at 11:14PM PST, ID: 12890551

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.22.2004 at 11:27PM PST, ID: 12890593

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.22.2004 at 11:39PM PST, ID: 12890623

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.23.2004 at 12:31AM PST, ID: 12890773

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.23.2004 at 12:56AM PST, ID: 12890858

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.23.2004 at 01:33AM PST, ID: 12890983

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.23.2004 at 01:50AM PST, ID: 12891039

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.23.2004 at 01:52AM PST, ID: 12891050

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.23.2004 at 02:05AM PST, ID: 12891105

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.23.2004 at 02:31AM PST, ID: 12891196

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.23.2004 at 02:49AM PST, ID: 12891264

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32