Results 1 to 2 of 2
  1. #1
    alpha100 is offline Member
    Join Date
    Oct 2013
    Posts
    1
    Rep Power
    0

    Default Align my output as follows:

    ___1234
    _*3456
    ----------------
    ___7404
    __6170
    _4936
    3702
    -----------------
    4201004

    where ___ represents space and * represents multiplication sign
    Last edited by alpha100; 10-05-2013 at 07:14 AM.

  2. #2
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    3,526
    Rep Power
    5

    Default Re: Align my output as follows:

    Check out the Formatter class. And please, ask a question next time.

    Regards,
    Jim
    Last edited by jim829; 10-05-2013 at 02:31 PM.
    The Java™ Tutorial | SSCCE | Java Naming Conventions
    Poor planning our your part does not constitute an emergency on my part.

Similar Threads

  1. How to right align numbers?
    By Valerie10b in forum New To Java
    Replies: 16
    Last Post: 03-14-2013, 06:20 PM
  2. Component align
    By tnrh1 in forum AWT / Swing
    Replies: 6
    Last Post: 05-23-2012, 06:43 AM
  3. How to align in java
    By deemu in forum New To Java
    Replies: 2
    Last Post: 02-06-2012, 08:50 PM
  4. Align Row to Right in JTable
    By shomid in forum AWT / Swing
    Replies: 2
    Last Post: 11-25-2011, 10:23 PM
  5. How to align the output on console?
    By sfe23 in forum New To Java
    Replies: 5
    Last Post: 03-30-2009, 03:28 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •