Using an array in Java - have a list of keywords from a web service and have to print out the list of keywords on the screen with one keyword on each line. This is my code:
System.out.println("Keywords \t :\n" +result.getHeadlines().get(i).getKeywords());
for (int k = 0; k < result.getHeadlines().get(i).getKeywords().size(); k++) {
System.out.println( result.getHeadlines().get(i).getKeywords());
}
Example - Need it to printout like below
Keyword :
cat
dog
rabbit