Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2010
    Posts
    1
    Rep Power
    0

    Default Need help in java some implemting logic

    Hi,
    I have a list of list as shown below :

    FS1[[T1, 5][T2, 5]]
    FS2[[T1, 7][T2, 7]]
    ...
    ..
    ..

    I need the sum of FS's
    FS2[[T1, 12][T2, 12]]

    More details.....
    List<List> fs1List = new ArrayList<List>();
    List<Object> t1List = new ArrayList<Object>();
    List<Object> t2List = new ArrayList<Object>();

    t1List.add(0,"T1");
    t1List.add(1,new Double(5));



    t2List.add(0,"T2");
    t2List.add(1,new Double(5));

    fs1List.add(t1List);
    fs1List.add(t2List);
    // fs 2
    List<List> fs2List = new ArrayList<List>();
    t1List = new ArrayList<Object>();
    t2List = new ArrayList<Object>();
    t1List.add(0,"T1");
    t1List.add(1,new Double(7));

    t2List.add(0,"T2");
    t2List.add(1, new Double(7));

    fs2List.add(t1List);
    fs2List.add(t2List);

    List<List> allFSList = new ArrayList<List>();

    allFSList.add(fs1List);
    allFSList.add(fs2List);


    resultFS should be FS2[[T1, 12][T2, 12]]

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,457
    Rep Power
    20

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,457
    Rep Power
    20

Similar Threads

  1. Logic not working
    By Prajin in forum AWT / Swing
    Replies: 1
    Last Post: 07-19-2010, 08:54 PM
  2. need a logic for this
    By rajivjoshi in forum New To Java
    Replies: 4
    Last Post: 06-12-2010, 03:18 PM
  3. help with a logic error
    By ShinTec in forum Advanced Java
    Replies: 11
    Last Post: 05-02-2010, 11:19 PM
  4. Java + OOP + Logic Gates = HELP!
    By sev51 in forum New To Java
    Replies: 3
    Last Post: 01-26-2009, 09:42 PM
  5. Cant get the logic right
    By jermaindefoe in forum New To Java
    Replies: 4
    Last Post: 03-11-2008, 01:22 AM

Posting Permissions

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