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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T21:05:15+00:00 2026-06-10T21:05:15+00:00

I am writing Java app. This is a sample of my code: int []

  • 0

I am writing Java app.

This is a sample of my code:

int [] digitPart_1 ={16,7,9,8,5,6,};
int [] digitPart_2 ={1,77,98,86,5,6,};
int [] digitPart_3 ={166,7,49,84,55,6,};

for(int i = 0; i < mfl.size(); i++){
 new DataProcessing(digitPart_+""+(i + 1));
}

In my design now each part (e.g. digitPart_1) shall be passed in, because 0 + 1 = 1, 1 + 1 = 2, i.e. digitPart_1 etc. But that causes compile error. It does not let me modify the name of array I pass in.
The ‘mfl’ is not important, it shall store number 3. I was just wondering whether I can modify the the name of data-structure I pass in dynamically like you can modify string you pass in to the output stream.

Any suggestion on how to overcome this issue?
Cheers

  • 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-10T21:05:16+00:00Added an answer on June 10, 2026 at 9:05 pm

    you cannot modify varaibles’ name dynamically. but you can use an array instead:

    int[][] digitPart = {{16,7,9,8,5,6}, {1,77,98,86,5,6}, {166,7,49,84,55,6}};
    
    for(int i = 0; i < mfl.size(); i++){
       new DataProcessing(digitPart[i]);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm quite new to Java Programming and am writing my first desktop app, this
I'm fairly new to Java and am writing an app that needs an XML
I'm currently writing a Java app that interfaces with a MySQL database. My problem
i am writing standalone java app for production monitoring. once it starts running the
I'm writing a Java servlet in Eclipse (to be hosted on Google App Engine)
I'm writing an app for Java ME, and I need a class for holding
i am writing a web proxy in java on google App engine.I figured out
Sometimes while writing Java in Eclipse, I write code that generates warnings. A common
I've been writing Java swing GUI code for several years but the following syntax
I am writing java code. which will work on windows and linux. some code

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.