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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:44:38+00:00 2026-06-09T22:44:38+00:00

new T[7] creates an array of 7 T s. If we replace T with

  • 0

new T[7] creates an array of 7 Ts. If we replace T with int[5], we get new int[5][7] which should create an array of 7 arrays of 5 integers. However, it creates an array of 5 arrays of 7 integers instead. Is there any good reason for this? Wouldn’t it make more sense if it was the other way around?

  • 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-09T22:44:40+00:00Added an answer on June 9, 2026 at 10:44 pm

    I think of it as dimensions:

       height width depth
    int[5]    [7]   [8]
    

    Or

       rows  cols
    int[5]   [7]
    

    That’s why it makes sense for it to be 5 arrays of 7 ints to me. There is a kind of natural order.

    I think your example also makes sense and is very logical. So I guess it’s just a matter of opinion 😛

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

Sidebar

Related Questions

When I use new[] to create an array of my classes: int count =
I have the following three arrays and need to create a new two-dimensional array
I create array: TextBox[] textarray = new TextBox[100]; Then in cycle set this params,
I need an advice about how to create new string array from 4 different
I'm new to Java. I want to create Java Array and insert data into
I need to create a new line of data within an array where the
Hello i'm using map() jquery to create a new object array DEMO but this
My problem is that I have a class, which should take a long int
I'm trying to create a form which will add a new text box every
I have an array created with this code: var widthRange = new Array(); widthRange[46]

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.