Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Help with Creating a String...

807588Apr 3 2009 — edited Apr 3 2009
    public String getScore()
    {
        scores = "Technical Scores";
        scores += "\n";
        for(int i = 0; i < technical.size(); i ++)
        {
            scores += technical.get(i).getJudgeName();
            scores += " : ";
            scores += technical.get(i).getRating();
            scores += "\n";
        }
        scores += "Artistic Scores";
        scores += "\n";
        for(int i = 0; i < technical.size(); i ++)
        {
            scores += artistic.get(i).getJudgeName();
            scores += " : ";
            scores += artistic.get(i).getRating();
            scores += "\n";
        }
        return scores;
    }
My code above is kinda self explanatory, but basically I need to grab a string and a Double from an object saved in an array list, and add them to a string... I am having a lot of trouble getting a string that is formatted and actually contains the data in the objects, Any help you might provide is appreciated... This is for a class, and I don't expect an answer (as I am doing the work) but I am lost here =\

Edited by: ActingRude on Apr 3, 2009 4:35 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 1 2009
Added on Apr 3 2009
7 comments
92 views