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: Output String Handling in Java

  1. #1
    Junior Member
    Join Date
    Feb 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Output String Handling in Java

    Hi, guys...............
    How can I format my output I have a long text formula which consist of alot of "()","{ }" "[ ]" and some other special char. I want to see in a readable format. This output formula is approximately you can say 1 or 2 pages but there is no any space or a break line e.g. [sdsadadfdfsdffwesdfsdfsdf{sdsdddsd^afasdfadfsdfasd fasdfasdf(asdfaf(asfasdfbvdcbyrey)eyydfhghghshgfgh fg)fghfghfg}hfg]hfg$sdfsdfsdfsdg[fsdgdfhd{[dsfassd{sdfsgsggdfbergdfvgg}dfgdfgdfgdfg]gdfgdfgdfgdfgdg(hfghfghsdfhgasdfasdffdghdfhbdfgd^s dfgasdfgdfgdfgdfbsd|dfsdggdfgdfhdgh)dfhdfh}dfhdfhv nbvbnmghmjyky] and so on.....upto more than 1 page. so how can I control my string. which is readable for me.
    kind regards
    for replying
    merry


  2. #2
    Junior Member
    Join Date
    Feb 2010
    Posts
    10
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Re: Output String Handling in Java

    You could try splitting the strings at specific location (ie. "[ ]" ).

    See: Split a string using String.split() - Real's Java How-to
    and String (Java 2 Platform SE v1.4.2)

Similar Threads

  1. File handling in java
    By srikanth in forum File I/O & Other I/O Streams
    Replies: 2
    Last Post: February 22nd, 2010, 02:11 AM
  2. Replies: 2
    Last Post: November 3rd, 2009, 06:28 AM
  3. Event handling
    By subhvi in forum AWT / Java Swing
    Replies: 3
    Last Post: August 26th, 2009, 11:20 AM
  4. Redirect error and output stream using java program
    By leenabora in forum File I/O & Other I/O Streams
    Replies: 5
    Last Post: June 16th, 2009, 04:12 AM
  5. Exception handling
    By AnithaBabu1 in forum Exceptions
    Replies: 6
    Last Post: August 27th, 2008, 09:37 AM