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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T04:03:40+00:00 2026-05-29T04:03:40+00:00

how can I possibly add a value to a 2 dimensional dynamic arrays? String

  • 0

how can I possibly add a value to a 2 dimensional dynamic arrays?

String emp[][] = {
{"001","Superman","Manda","123-1233","02-14-1970","Male","Manager","20,000","Regular"},
{"002","Batman","Manda","33-1233","07-14-2007","Male","Clerk","20,000","Regular"},
};

I try this code

int arrLen = emp.lenght;
emp[arrLen][0] = "003"
emp[arrLen][1] = "Superwoman"
emp[arrLen][2] = "QC"
emp[arrLen][3] = "123-1233"
emp[arrLen][4] = "03-12-2012"
emp[arrLen][5] = "Female"
emp[arrLen][6] = "Supervisor"
emp[arrLen][7] = "10,000"
emp[arrLen][8] = "Regular"

but it doesnt work

can anyone help me?

thanks

  • 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-29T04:03:40+00:00Added an answer on May 29, 2026 at 4:03 am

    Java arrays have fixed length. If you want resizable array use ArrayList.

    Example:

    ArrayList<String[]> list = new ArrayList<String[]>();
    list.add(new String[]{"Superman","Manda","..."});
    list.add(new String[]{"Superwoman","Manda","..."});
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

is it possible to add custom data to the results so it can be
The following event can possibly get called hundreds of times a frame. public bool
I can't possibly be the first person to do this, it seems like it
I've created a custom UITypeEditor. Can I possibly insert an attribute that also attaches
Can anybody please explain how this could possibly happen? I am completely aware of
How can I retrieve the full directory tree using SPL , possibly using RecursiveDirectoryIterator
Can every possible value of a float variable can be represented exactly in a
What is the most efficient way of setting values in C# multi-dimensional arrays using
Possible Duplicate: Add a field and insert an increment value I have this table
I create a Jtree in java, I would like to add 2 value to

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.