> JAVA CODE WRITING HELP!?

JAVA CODE WRITING HELP!?

Posted at: 2014-12-18 
Change:

if (item.toLowerCase().startsWith("p")) {

change it to:

if (item.startsWith("P")) {

...and your import statements should read:

import java.util.*;

import java.io.*;

I need to write a code for a class and i have no clue where to even start. please help!

Build a program that repeatedly asks the user to input possible male names for a dog. While the user is entering possible names one by one, the code should be outputting those names to a text file (having a .txt extension) if and only if the inputted name starts with the letter P. In accordance with naming pets, the names input must start with a capital letter. test at least 10 names which do not start with the letter P and 10 names which do. you should only contain the names that start with P