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: Flipping a Java Statement

  1. #1
    Junior Member
    Join Date
    Oct 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Flipping a Java Statement

    How would I change these statements so the outcome is upside down?
    Here's the code.

    for (int line = 1; line <= size; line++) {
    System.out.print("|");
    for (int j = size; j > line ; j--) {
    System.out.print(" ");
    }
    System.out.print("<>");

    for (int j = 1; j <= (line -1) * 4; j++) {
    System.out.print(".");
    }
    System.out.print("<>");
    for (int j = size; j > line ; j--) {
    System.out.print(" ");
    }
    System.out.println("|");
    }


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,520
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Flipping a Java Statement

    Welcome to the Forum! Please read this topic to learn how to post code correctly and other useful tips for newcomers.

    Please post your code correctly per the above link.

Similar Threads

  1. question about copying and flipping arrays
    By ghostheadx in forum What's Wrong With My Code?
    Replies: 1
    Last Post: September 7th, 2013, 07:32 PM
  2. [SOLVED] A Loop statement and a switch statement issue
    By sternfox in forum Loops & Control Statements
    Replies: 13
    Last Post: March 7th, 2013, 04:19 PM
  3. Flipping a picture 180 degrees
    By antnas in forum Object Oriented Programming
    Replies: 1
    Last Post: November 8th, 2012, 06:01 AM
  4. Flipping mechanism bug
    By CaliforniaCoder1984 in forum What's Wrong With My Code?
    Replies: 4
    Last Post: October 28th, 2011, 09:40 AM
  5. Flipping a coin
    By jimboslice in forum Loops & Control Statements
    Replies: 2
    Last Post: October 18th, 2010, 11:13 AM