diff options
-rw-r--r-- | bladictionary.java | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/bladictionary.java b/bladictionary.java index 9f177af..403c821 100644 --- a/bladictionary.java +++ b/bladictionary.java @@ -40,8 +40,7 @@ public class bladictionary { Boolean definition = false; Boolean definition2 = false; Boolean wn = false; - String[] defLines = new String[50]; - int i = 0; + String result = ""; //Read every line while ((line = br.readLine()) != null) { @@ -88,7 +87,14 @@ public class bladictionary { { parts = line.split("\\["); - System.out.println(parts[0]); + if (result.equals("")) + { + result = parts[0]; + } + else + { + result = result + "; "+ parts[0]; + } } else { @@ -100,6 +106,17 @@ public class bladictionary { } } } + + if(!result.equals("")) + { + System.out.println(result); + System.exit(0); + } + else + { + System.exit(1); + } + } }
\ No newline at end of file |