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 8624263
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T07:28:51+00:00 2026-06-12T07:28:51+00:00

I making a dynamic array that using normal array and mimic arraylist. So…. Please

  • 0

I making a dynamic array that using normal array and mimic arraylist. So…. Please help me check if the method is correct. rangeCheck is a boolean method checking if the array is out of bound.
rangeCheck contains an outofbound exception.

 public int get(int position)
{
    rangeCheck(position);
    int valuePosition =0;
    for(int count=0;count == position;count++)
    {
        valuePosition = storage[count] ;
    }
    return valuePosition; 
}

For some idiotic reason, I keep thinking inorder to get to some value at some specific index, I have to go in a loop to do it….

  • 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-12T07:28:52+00:00Added an answer on June 12, 2026 at 7:28 am

    how about

    public int get(int position)
    {
        boolean ok = rangeCheck(position);
        if(! ok)        
            throw new IndexOutOfBoundsException("Your error message");
        return storage[position];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay, so I'm making a dynamic 2D array in Java that implements the java.util.Collection
I'm having difficulty making a dynamic AJAX form submition method for .NET WebServices. The
I am making use of dynamic queries in mongoDB, by using them this way:
I am making a dynamic web page that allows people to post their favorite
I am making a simple Dynamic Website using PHP, where i allow the user
I'm making a dynamic call using NSInvocation: NSInvocation *lNSInvocation = [NSInvocation invocationWithMethodSignature: [lListener methodSignatureForSelector:lSelector]];
With respect to the following code snippet for making a dynamic array template <class
I am making a dynamic form using table. My table was like below. <table
I'm planning on making some dynamic PHP websites and I need a free Authentication
I'm totally familiar in making static and dynamic websites. However, I have never dealt

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.