More homeworks... (but one cool universal reusable linkedlist in pure C)
[mirrors/Programs.git] / java / textstats.java
diff --git a/java/textstats.java b/java/textstats.java
new file mode 100644 (file)
index 0000000..cda4e52
--- /dev/null
@@ -0,0 +1,29 @@
+import java.io.*;
+import java.util.*;
+
+public class textstats {
+
+       public static void main(String[] Args) {
+               File file = new File("lipsum.txt");
+
+               try {
+
+                       FileInputStream fis = new FileInputStream(file);
+                       BufferedInputStream bis = new BufferedInputStream(fis);
+                       //DataInputStream dis = new DataInputStream(bis);
+                       Scanner sc = new Scanner(bis);
+
+                       while (sc.hasNext()) {
+        //System.out.println(dis.readLine());
+        System.out.println(sc.next());
+      }
+
+                       fis.close();
+      bis.close();
+      //dis.close();
+
+               } catch(Exception e) {
+                       e.printStackTrace();
+               }
+       }
+}
This page took 0.120915 seconds and 4 git commands to generate.