Class LongestWord

java.lang.Object
  extended byLongestWord

public class LongestWord
extends java.lang.Object

TIE120 Programming 2, Exam 17.3.2004, Question 3, Example solution.

Version:
1.0, 31.03.2004
Author:
Heikki Kainulainen

Constructor Summary
LongestWord()
           
 
Method Summary
static java.lang.String getLongestWord(java.lang.String fileName)
          Return the longest word of the text file.
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LongestWord

public LongestWord()
Method Detail

getLongestWord

public static java.lang.String getLongestWord(java.lang.String fileName)
                                       throws java.io.IOException
Return the longest word of the text file.

Parameters:
fileName - the name of the file to read from.
Returns:
the longest word.
Throws:
java.io.IOException - if an I/O error occurs.

main

public static void main(java.lang.String[] args)