Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

help please

Name: Anonymous 2011-01-13 20:48

trying to finish this lab and keep getting these odd runtime errors, here's my errors
--------------------Configuration: <Default>--------------------
Exception in thread "main" java.lang.NullPointerException
    at Words.setWords(Words.java:32)
    at Words.<init>(Words.java:23)
    at Lab16c.main(Lab16c.java:16)

Process completed.


MAIN CODE

//© A+ Computer Science  -  www.apluscompsci.com
//Name -
//Date -
//Lab  -

import java.util.Scanner;
import java.util.ArrayList;
import java.util.Collections;
import static java.lang.System.*;

public class Lab16c
{
    public static void main( String args[] )
    {
        String wordList = "one, two, three, four, five, six, seven, alligator";
        Words test = new Words(wordList);
        out.println(test);
        out.println("word with 2 vowels = "+test.countWordsWithXVowels(2));
        out.println("word with 3 vowels = "+test.countWordsWithXVowels(3));
        out.println("word with 4 vowels = "+test.countWordsWithXVowels(4));
        out.println("word with 2 chars = "+test.countWordsWithXChars(2));
        out.println("word with 4 chars = "+test.countWordsWithXChars(4));
        out.println("word with 5 chars = "+test.countWordsWithXChars(5));
        test.removeWordsWithXChars(3);
        out.println("\nafter removing words with 3 chars \n"+test);
        out.println("\n\n");
        System.out.printLn(test.setWords);


        //more test cases

    }
}

Name: Anonymous 2011-01-14 5:25

>>4
Not in space.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List