How tooutprint the statements added to a list ?
Hi all
I want to out print the statements added to wordlist
but the output result the word 'null' why?
and how to outprint them?
thanks
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
publicclass WordData{
publicstatic StringwordList="donk";
{
List wordList =new ArrayList ();
wordList.add("cat");
wordList.add("dog");
wordList.add("bird");
//blah blah
}
publicstaticvoid main( String[ ]args)
{System.out.println(WordData.wordList);
}}

