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: question about copying and flipping arrays

  1. #1
    Member
    Join Date
    Aug 2013
    Posts
    101
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cool question about copying and flipping arrays

    Once again, this is for school. Here are my instructions:

    In the following code fragment, s is a four-element array of Strings and w is a String. Write code that stores in w the String that results from writing all four elements of s in order from last to first, separated by spaces. For example, when s is the array with elements "go", "west", "young", "man" (in that order), then after executing your code the String "man young west go" should be stored in w.

     
    String[] s = { "", "", "", "" }; 
        String w; 
     
        // Enter your code here 
     
    w = s.toString();
    System.out.println(w);

    All help appreciated. Thanks.


  2. #2
    Member
    Join Date
    Sep 2013
    Posts
    70
    Thanks
    1
    Thanked 13 Times in 13 Posts

    Default Re: question about copying and flipping arrays

    So what have you tried and what issues are you getting?

Similar Threads

  1. Copying arrays from one class to another
    By hannah87 in forum What's Wrong With My Code?
    Replies: 7
    Last Post: May 8th, 2024, 03:52 AM
  2. Flipping a picture 180 degrees
    By antnas in forum Object Oriented Programming
    Replies: 1
    Last Post: November 8th, 2012, 06:01 AM
  3. Flipping mechanism bug
    By CaliforniaCoder1984 in forum What's Wrong With My Code?
    Replies: 4
    Last Post: October 28th, 2011, 09:40 AM
  4. Copying Arrays
    By AnnexTrunks in forum What's Wrong With My Code?
    Replies: 30
    Last Post: October 24th, 2011, 10:04 PM
  5. Flipping a coin
    By jimboslice in forum Loops & Control Statements
    Replies: 2
    Last Post: October 18th, 2010, 11:13 AM

Tags for this Thread