This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static List wordCount(String fileName) { | |
| List list = new ArrayList(); | |
| String input = fileName; | |
| int words = 0; | |
| int totalchar = 0; | |
| int lines = 0; | |
| int longestWord = 0; | |
| int shortestWord = 99999; | |
| try{ | |
| //System.out.println("Reading from file: " + input); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class CommonDenominator { | |
| public static void main(String[] args) { | |
| System.out.println(GCD(64,40)+"..................."); | |
| System.out.println(LCM(24, 60)); | |
| } | |
| public static int GCD(int a, int b) { |