View Single Post
  #10 (permalink)  
Old 07-06-2009, 03:38 AM
PureAwesomeness PureAwesomeness is offline
Member
 
Join Date: Jan 2009
Posts: 90
Rep Power: 0
PureAwesomeness is on a distinguished road
Default
Code:
		while(input.hasNext())
			{
				String s1 = input.nextLine();
        // WHAT? what are you trying to do?
			    chars = s1.toCharArray(s1.split(" "));
			}

			for(int i=0; i<chars.length; i++)
			{
        // err... no you can't compare a char to a string.
				if(chars[i] == "John")
        // no such method for chars
				chars[i].replaceAll(chars[i],"");
			}
WHAT? what are you trying to do?
im trying to put each word in an array, i guess that is not a correct way.

// err... no you can't compare a char to a string.
If i successfully puting each word in an array i would comparing a string to string. i guess that failed too.

// no such method for chars
thanks! now i know =]
Reply With Quote