Nolan Lefler

Greenhorn
+ Follow
since Mar 23, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Nolan Lefler

Thanks for the suggestions. I haven't encountered HashMaps yet, but I'll look into them.

But I've never heard the main method should only being one line of code. That's quite new to me.
11 years ago

Mr Tuah wrote:How about this? it will show all words that found in sentences



That looks nice to me Mr Tuah, but my code requires the number of times a word occurs in a string to be counted.
11 years ago

Ryan Sykes wrote:I'll let someone more experienced comment on elegance, but I wanted to point out that your code fails to identify words that are adjacent to punctuation marks. The presence of a period, comma or question mark next to a word will give you faulty results.



I've fixed that issue. However, if somebody enters a word that has punctuation in the middle of the word, such as 'it's' or 'jack-in-the-box' it will make these words 'its' and 'jackinthebox'

11 years ago
Can you tell me how elegant this solution is for the problem? I tried using as little code as required. This is basically listing how many times a word appears in a line of text. I have converted the text to a string array.

11 years ago
I have just started with HF Java, and this is the code I wrote. It works for me.

11 years ago
Hi Alexander,

Welcome to the wonderful world of Android!

I would suggest getting the updated software for Eclipse, the Android SDK, and also the ADT plug-in. These are required tools. The following link provides you everything you need to know:

http://developer.android.com/sdk/installing.html#InstallingADT

As for being restricted to a specific platform, you can use whichever platform you like as long as you download the required components.

Enjoy!
Jay
11 years ago