java - Output the first letter of each string in an array list? -


This is for my homework assignment, so I do not want any code to give only an explanation about how to proceed. .

I have installed a program that takes user input and adds them to an array list.

I can output the list using System.out.println (list); But I need to print only the first letter of each word.

How should I go about doing this?

Cheers ...

The basic idea is your list There will be a loop on each string , and for each it takes the first character (see for it) and then print it in your normal way (I think that system.out println () ).

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -