Joined
Last Seen
0 Reputation Points
Unknown Quality Score
No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
0 Endorsements
Ranked #107.55K
1 Posted Topic
Re: It is printing out the whole thing because args[i] != "the" is not comparing the string contents, it is comparing the string objects themselves (by comparing thier hash codes). The comparison you want is: if(!args[i].equals("the")) output+= args[i]; An easier method of replacement, as noted above would be: output = args.replaceAll("the","") … |
The End.