Misc. Trivia


Skyre
 Share

Recommended Posts

  • Replies 120
  • Created
  • Last Reply

Top Posters In This Topic

Yay. Thank you chemistry class.

In Java programming, if ("The number 56" + 3 + 9) was inputted into a string and then the string was displayed on the screen, what text would appear on the screen?

P.S. sorry it took me so long to post my question. I've been busy this week. If I ever take more than 2 days to post then somebody else can take my question.

Link to comment
Share on other sites

Since Zephyr was the closest I'll give the next question to him.

-edit- The answer was "The number 5639"

Since it is being put into a string, and there are no brackets, the plus sign simply puts the numbers at the end of the string instead of adding them first. I know it doesn't make sense(As well as most things in Java), but that's how strings work in Java.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.