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 5 of 5

Thread: ArrayList Report

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

    Lightbulb ArrayList Report

    Dear all

    I have a arraylist like this.

    ArrayList<String> strlist = new ArrayList<String>();
    strlist.add("2012@12.00@12.0");
    strlist.add("2013@13.00@13.0");
    strlist.add("2014@14.00@14.0");
    strlist.add("2015@15.00@15.0");
    strlist.add("2016@16.00@16.0");

    My requirement is that i have to create three list by splitting list item with @.

    pls help


  2. #2
    Senior Member PhHein's Avatar
    Join Date
    Mar 2013
    Location
    Germany
    Posts
    609
    My Mood
    Sleepy
    Thanks
    10
    Thanked 93 Times in 86 Posts

    Default Re: ArrayList Report

    What isyour problem? Don't expect ready made code.

  3. #3
    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: ArrayList Report

    You'll have to modify the statements you've posted - creating three Lists for one, but check out the String.split() method to see how that can be helpful.

  4. #4
    Junior Member
    Join Date
    Aug 2013
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: ArrayList Report

    Dear all

    I have a arraylist like this.

    ArrayList<String> strlist = new ArrayList<String>();
    strlist.add("2012@12.00@12.0");
    strlist.add("2013@13.00@13.0");
    strlist.add("2014@14.00@14.0");
    strlist.add("2015@15.00@15.0");
    strlist.add("2016@16.00@16.0");

    list items like 2012@12.00@12.0 may be sometime 2012@12 or 2012@12@14 or 2013@124@41@32
    My requirement is that i have to create dynamic list by splitting list item with @.


    pls help

  5. #5
    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: ArrayList Report

    So what have you tried after reading the documentation for String.split()?

Similar Threads

  1. report problem
    By oslo in forum What's Wrong With My Code?
    Replies: 0
    Last Post: February 21st, 2013, 04:31 AM
  2. Replies: 0
    Last Post: May 8th, 2012, 10:51 PM
  3. Report Viewing Problem
    By chronoz13 in forum AWT / Java Swing
    Replies: 2
    Last Post: October 25th, 2011, 07:33 AM
  4. [SOLVED] Excel Report
    By banny7 in forum Java Theory & Questions
    Replies: 4
    Last Post: October 18th, 2011, 10:27 AM
  5. Jasper Report
    By zurich91 in forum AWT / Java Swing
    Replies: 0
    Last Post: September 25th, 2011, 01:35 PM

Tags for this Thread