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: Java.util.Arrays

  1. #1
    Member
    Join Date
    Apr 2020
    Posts
    147
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default Java.util.Arrays

    Hey folks! I have this program I need to code and im kinda stuck on it.So bassicly i need to read in an array(1 2 3 4 5...) and i need to reverse it.So the catch is i need to use the recursive int [] reverse method, as well as the copySubArray and appendToArray methods. Im kind of confused on how to do this, the description of the problem says to only use these 3 methods and that is it.So if anyone could give me some guidelines on how to solve this, that would be great.

    Thanks!

  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Java.util.Arrays

    My suggestion is to create an array, use one of the methods and print out the results using the Arrays class's toString method:
       System.out.println("an ID "+ java.util.Arrays.toString(theArrayName)); // show array's contents
    That will allow you to see what the method does.

    If you have any questions, Post your code (wrapped in code tags) and its output.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. How to Sort an Array using the java.util.Arrays class
    By JavaPF in forum Java SE API Tutorials
    Replies: 2
    Last Post: May 17th, 2014, 01:16 AM
  2. Replies: 4
    Last Post: April 16th, 2013, 06:50 AM
  3. Replies: 1
    Last Post: December 22nd, 2011, 09:55 AM
  4. Program to populate all array values using the java.util.Arrays class
    By JavaPF in forum Java Code Snippets and Tutorials
    Replies: 0
    Last Post: April 7th, 2009, 05:31 AM
  5. How to Sort an Array using the java.util.Arrays class
    By JavaPF in forum Java Code Snippets and Tutorials
    Replies: 0
    Last Post: December 1st, 2008, 09:02 AM