Jump to content

Java Code Help!


Jagst3r15

Recommended Posts

Hey ya'll,

I took my Comp Science exam earlier today and there was a question essentially asking what is the index of the 512,456,672th element of this array?

My answer was just one over, because 0 counts as an element, so the answer would be 512,456,673 correct?

I hope I got this one right, I was pretty confidant about my other answers.

Link to post
Share on other sites

Hello Jagst3r15,

It seems like an arbitrarily large index. A legitimate use for that many values would probably be better use with a database or c++. Java would probably throw IndexOutOfBoundsException.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
Back to top
×
×
  • Create New...

Important Information

This site uses cookies - We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.