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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:47:28+00:00 2026-05-23T12:47:28+00:00

SO for a project I am doing, I would like to be able to

  • 0

SO for a project I am doing, I would like to be able to create a multidimensional array which would look like:

private static String[][] docArray = new String[6][];

For that array I’d establish something like:

docArray[0].equals(headingValue);
.
.
.
docArray[5].equals(anotherValue);

Then say I want to do something like have index 3 point to a child array, logically I’d think you’d do something like the following (although I know it’s not the correct syntax)…

docArray[3][1] = new String[6][];

So am I correct in my logic thus far, and how do I continue about adding pointers to new arrays? Thanks in advance for any help.

  • 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-23T12:47:28+00:00Added an answer on May 23, 2026 at 12:47 pm

    The problem with this is that if docArray is a String[][], then docArray[3][1] should be a String, not a String[][].

    What you could do is type docArray as an Object[][]; this would allow you to do what you want since every String is an Object and a jagged String[][] array is also an Object.

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

Sidebar

Related Questions

As a project I would like to create a website that allows a user
So I have been trying to create a new RESTfull web application project in
I would like to create a filter that runs before the routing system does
I've never used Git before and would like to learn. I have a private
I use Visual C# 2008 Express Edition. I would like to be able to
I would like to clone a project from a Git server and then perform
I have two classes in my project that I would like to pass the
I'm doing a project for a class which focuses on storing a huge matrix
I'm on a project doing an iPhone application. We had a Cocoa consultant come
I am doing project euler question 33 and have divised a refactor to solve

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.