Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Using arrays more efficiently in Java?

  1. #1
    Junior Member
    Join Date
    Nov 2011
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Using arrays more efficiently in Java?

    if I needed to run a program 4 times and wanted to store each of the values I got through previous runs of the program to arrays, would I need to make 4 different arrays or is there another way of doing this more efficiently?


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Using arrays more efficiently in Java?

    To have 4 copies of the data will require 4 separate storage places (arrays or disk files). If the data is too large to keep in memory, you might need to write it to a file.

Similar Threads

  1. Please help! Java ARRAYS
    By Score11 in forum Object Oriented Programming
    Replies: 11
    Last Post: January 15th, 2012, 05:45 AM
  2. Replies: 2
    Last Post: January 6th, 2012, 10:50 PM
  3. issue with arrays in Java
    By Sei783 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: October 9th, 2011, 01:19 AM
  4. New To Java (Help with arrays)
    By SilentPirate in forum What's Wrong With My Code?
    Replies: 6
    Last Post: September 16th, 2010, 05:48 AM
  5. Details about 'CopyTo' of Arrays in Java
    By Fendaril in forum Collections and Generics
    Replies: 18
    Last Post: November 13th, 2008, 08:31 AM