×

Discussion Board

Results 1 to 2 of 2

Thread: setLatitude()

  1. #1
    Registered User
    Join Date
    Mar 2009
    Posts
    4

    setLatitude()

    Hello,
    I have a problem with a piece of code.
    I am trying to initialize a variable Coordinates with Latitude and Longitude and all the time I'm getting NullPointerException error and I have no idea why.
    f.setLatitude(lat);
    f.setLongitude(lon);
    where lat and lon are 2 double values.
    Do you have any idea why?
    Thank you very much

  2. #2
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Re: setLatitude()

    Quote Originally Posted by catalindragos View Post
    Hello,
    I have a problem with a piece of code.
    I am trying to initialize a variable Coordinates with Latitude and Longitude and all the time I'm getting NullPointerException error and I have no idea why.
    f.setLatitude(lat);
    f.setLongitude(lon);
    where lat and lon are 2 double values.
    Do you have any idea why?
    Thank you very much
    Check
    1.f is not null,make sure
    2.lat and lon are not null,

    In addition to this can you make sure that only this is the code that giving the null pointer exception...if you had already make this sure than please make sure above two points..
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •