Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7910179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T12:46:07+00:00 2026-06-03T12:46:07+00:00

When to use the getInstance() method in java and what is the meaning of

  • 0

When to use the getInstance() method in java and what is the meaning of getInstance(null)?

locationProvider = LocationProvider.getInstance(null); 

can anyone tell me the meaning of the above line?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T12:46:09+00:00Added an answer on June 3, 2026 at 12:46 pm

    The following code will give you the latitude and longitude. getInstance() will give back the instance of that particular class.

        Criteria myCriteria = new Criteria();
        myCriteria.setCostAllowed(false);
        LocationProvider myLocationProvider = LocationProvider.getInstance(myCriteria);
        Location myLocation = myLocationProvider.getLocation(300);
        latitude  = myLocation.getQualifiedCoordinates().getLatitude();
        longitude = myLocation.getQualifiedCoordinates().getLongitude();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While trying to use XMLWorkerHelper.GetInstance().ParseXHTML() i find that it is really strict. Any wrong
Some places in my flex app, I use ResourceManager.getInstance().getString, and other places I use
I use next code to print current time Calendar cal = Calendar.getInstance(); System.out.println(cal.getTime()); I
I'm tring to use com.google.android.apps.analytics.GoogleAnalyticsTracker but got NoClassDefFoundError when GoogleAnalyticsTracker.getInstance(); I'm sure that libGoogleAnalytics.jar
I use Launch4j as a wrapper for my Java application under Windows 7, which,
I use java.text.NumberFormat simply to convert numbers into more readable Strings, with commas separating
I am trying to understand the most suitable (Java) design pattern to use to
Can I safely use XStream to process XML coming from outside of my system
I want to use java standard library, and as much as I know, its
The most common way of implementing a singleton in java is to use a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.