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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:20:43+00:00 2026-05-22T20:20:43+00:00

Thanks for reading my question. I apologize if this seems like an easily searchable

  • 0

Thanks for reading my question. I apologize if this seems like an easily searchable question, but searching for anything with variable, object, and java turns up anything and everything.

Here is what I would like to do:

BankCheck = check(variable int here) = BankCheck(params here);

So that I can create check1000, then check1001, check1002 and so on.

Any suggestions?

Thank you!

EDIT:

Here is what I used:

ArrayList<Check> check = new ArrayList<Check>();

And the this to add each new object to the array.

check.add(checkNum, new Check(details, amount));

  • 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-22T20:20:44+00:00Added an answer on May 22, 2026 at 8:20 pm

    Not, that’s not possible but you have two options

    1.- Create and array to hold a variable number of checks:

    BankCheck[] checks = new BankCheck[100];
    

    That will let you store 100 checks. You can also use a list:

    List<BankCheck> checks = new ArrayList<BankCheck>();
    

    Which works almost the same, except you don’t have a fixed number of checks.

    2.- The other option is to create an small program to create this for you and then you just copy paste the output:

    ...
    public static void main( String ... args ) {
         for( int i = 0 ; i < 100 ; i++ ) {
             System.out.printf("BackCheck check%d = new BankCheck();%n");
         }
    }
    

    But unless you’re trying to do something really advanced ( or stupid ) you really will use option #1 most of the times.

    I hope this helps

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

Sidebar

Related Questions

I apologize if this is an obvious question, but I'm going through the Java
Thanks in Advance for reading and answer this question. I got button in asp
I apologize if this is a repeated question, but I can't seem to find
I apologize if this question was asked already before but I could not find
Apologies if this has been asked before but it seems an obvious question for
thanks for reading this question. Basically I am trying to do a code that
Thanks for reading my question. I have searched for and read similar questions, but
Thanks for reading my question. I saw Gizmodo & Lifehacker has this feature. Take
Hello and thanks to everyone for reading my question. I've been working on a
Thanks for reading this. I have no idea why this is throwing a NullReferenceException

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.