![]() |
Java Question need help fast
I have a program that i need to make that takes input and then checks it for vowels and deletes the vowels then reoutputs the word with no vowels.. This is what I have so far:
Quote:
|
make a string. if the letter DOESN'T fit those checks, add it to the new string. otherwise don't. :)
|
make a StringBuffer sb, use sb.append( letter) when its done use sb.ToString() to output it.
|
Whoa...slow down guys. Look at the existing code. First of all, you wanted to return something...so a void return is incorrect, and you wanted to take something in initially, so a parameter of nothing is also incorrect. Work on those things first. Then, cheerios' idea works perfectly.
|
Poster asked what was needed inside the if, not input/output
It has input already, take your own adivce without the code in the if, theres nothing to return, also they didnt say how the data is returned, only thats its output so a println maybe all thats needed, so a void type is fine. Also a StringBuffer will be much better than a String. |
Code:
public class StringThing |
thx for all the help guys
|
so how'd you do it, Scape?
|
don't you hate it when that happens cheerios ?
*on edge of seat* :) |
charliex, I completely missed that input there. Whoops! My mistake.
Scape, how'd it go? What'd you end up going with? |
All times are GMT -8. The time now is 11:45 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project