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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:43:40+00:00 2026-06-15T10:43:40+00:00

I have a Java int[][][] object in a separate class. The first dimension of

  • 0

I have a Java int[][][] object in a separate class.

The first dimension of the array has about 1000 elements, but I only need to access one at a time.

My question is: If I want to access only one element at a time, like this:

int[][] some2DInt = SomeClass.some3DInt[5];

Would this be effective? I mean, would Java load the entire 1000 elements or just the one I really want?

  • 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-15T10:43:41+00:00Added an answer on June 15, 2026 at 10:43 am

    There is no loading here. int[][] is an address so when you do something like :

    int[][] some2DInt = SomeClass.some3DInt[5];
    

    You just assign to some2DInt the address of the fifth 2 dimensional array in memory. So no copying or “loading” is done.

    The loading (which is actually memory allocation) is done when you initialize your 3 dimensional array using the new operator. (or if you statically initialize this array which might be a cumbersome task especially with 1000 2d arrays)

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

Sidebar

Related Questions

I have an array, for example (in Java) int[] a = new int[N]; I
I have this class public class wordObject implements java.io.Serializable { String wordName; int occCount;
Suppose that I have a 2D array (matrix) in Java like this... int[][] MyMat
I have an entity class: Cabbage.java package womble; public class Cabbage { private int
I've only started learning Java about 3 months ago and this is my first
Is there a replacement in Scala for Java's int Arrays.binarySearch(Object[] array, object) ? The
I have a Java class called Term holding polynomials like below public Term(int c,
If I have the following Java code: int[][] readAPuzzle() { Scanner input = new
I have this Java code which is used for JSF pagination: public List<ActiveSessionObj> list(int
I have the following piece of pseudo-C/Java/C# code: int a[]= { 30, 20 };

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.