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

  • SEARCH
  • Home
  • 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 6337055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T19:10:38+00:00 2026-05-24T19:10:38+00:00

I am currently going through one of the Android Tutorials . I found an

  • 0

I am currently going through one of the Android Tutorials. I found an expression like:

Bundle bundle = getIntent().getExtras();
Long longVariable = bundle.getLong(someId);
if( longVariable != null )
{
  //doSomething
}

After looking at Bundle.getLong in the API I saw that it returns a long (primitive).
Now, I didn’t write Java for quite a while, only C# in the meanwhile, but how can the object Long longVariable variable ever be null?

  • 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-05-24T19:10:41+00:00Added an answer on May 24, 2026 at 7:10 pm

    If getLong() really has return type long it can’t be, i.e. l will never be null. Probably the programmer didn’t look up the return type, but inferred from the method name a Long would be returned.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We are currently going through the long process of writing some coding standards for
I'm currently going through a few tutorials to get myself up and running on
I'm currently building a toy assembler in c# (going through The Elements Of Computing
I'm currently going through K.N. King's C Programming: A Modern Approach . I've made
I am currently going through the tutorial examples on http://code.google.com/p/stanford-cs193g-sp2010/ to learn CUDA. The
I'm currently writing a little toy assembler in c# (going through the elements of
I'm currently working through the excercises in 'The C Programming Language'. Here's one of
After going through so many documents and online content like: http://stackoverflow.com/questions/4066167/sencha-touch-or-jquery-mobile http://stackoverflow.com/questions/5093691/sencha-touch-vs-jqtouch-vs-gwt-mobile-vs-xui-vs-jquery-mobile-vs http://www.quora.com/Were-deciding-between-jQuery-Mobile-currently-in-alpha-and-Sencha-Touch-What-are-the-pros-and-cons-for-each http://interfacethis.com/2011/adventures-in-html5-part-one/
i'm trying to make the following routes .. and currently i'm going about this
We currently use VSS 6, this is not going to change I am afraid.

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.