Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
Firstly, these forums are not meant for us to plainly write out solutions for you, they are here to guide you.
Second, you are using an array of Strings, which I don't think is the data type you are looking for since this would contain multiple strings, not characters. Without more information it's hard to know.
Thirdly, your code won't compile which suggests you might be missing some basic fundamental parts of the Java language.
If you have questions, go ahead and ask, but again we are not here to just give you a solution.
Unless they plan on the array containing one character long Strings.
But it would be nice if OP provided better/more information. It can be achieved with a single call to substring but it seems there is a recursion requirement to the assignment.String[] word = {"h", "e", "l", "l", "o"};
Improving the world one idiot at a time!
Originally, I didn't have anything within the brackets. I'm supposed to put something in there. I think though, that since I'm filling in the blank, do I have to put in another "public static?" I mean, what sort of thing do I put in the brackets exactly? Is it a for-loop, if-statement, array...? I think the whole thing involves an array. Basially, if a = {"meat", "flat", "flukes"}, then it should be a = {"eat", "lat", "lukes"}.
So yes, I'm using strings. I tried "substring()" but I couldn't get to the bottom of how to use it. Do I need to use "substring()" here? That's the conclusion I come to, but I don't think I'm doing it right.
My idea (which I don't know how to implement) is, for each string in the array, to find the first letter of each string imputed and delete it automatically. Then it would print it.
Which fundamentals am I missing?
Hope that helps.
Thanks, ghostheadx
Take a look at the API doc for the String class. Remember that Strings can't be changed. methods that operate on the contents return a new String with the changes"substring()" but I couldn't get to the bottom of how to use it.
Then write a short simple program that uses it.
Print out the results.
If you don't understand my answer, don't ignore it, ask a question.