Finding the longest word (Java)

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Viper

Thread Starter
Joined
Nov 5, 1999
Messages
366
HI again

I'm a bit new to Java programming and was wondering how i would find the longest word. (In this context a word is taken to mean any sequence of characters which does not contain a space).

So, if a string object had the following state :

This is a test_string (to illustrate) a line containing several words.

The state of the string object is created from the contents of a file.

I'm absolutely stumped as to how to create the code for this :(
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Top