aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRossTheRoss <msattr@gmail.com>2019-12-11 16:21:16 -0600
committerRossTheRoss <msattr@gmail.com>2019-12-11 16:21:16 -0600
commit7e74cf47a39b0dfa6a5502aa24a8f55529c315bd (patch)
tree70fbe558eeee1e1e902f32587c0f37ed176c80b0
parentGet rid of kludge try-catch and replace with if (diff)
downloadhomework-7e74cf47a39b0dfa6a5502aa24a8f55529c315bd.tar
homework-7e74cf47a39b0dfa6a5502aa24a8f55529c315bd.tar.gz
homework-7e74cf47a39b0dfa6a5502aa24a8f55529c315bd.tar.bz2
homework-7e74cf47a39b0dfa6a5502aa24a8f55529c315bd.tar.lz
homework-7e74cf47a39b0dfa6a5502aa24a8f55529c315bd.tar.xz
homework-7e74cf47a39b0dfa6a5502aa24a8f55529c315bd.tar.zst
homework-7e74cf47a39b0dfa6a5502aa24a8f55529c315bd.zip
e
-rw-r--r--csci1913/Java/project3/project3_strap012.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/csci1913/Java/project3/project3_strap012.java b/csci1913/Java/project3/project3_strap012.java
index 0bed110..ff4ce3a 100644
--- a/csci1913/Java/project3/project3_strap012.java
+++ b/csci1913/Java/project3/project3_strap012.java
@@ -46,8 +46,10 @@ class AnagramTree {
boolean wordExists = false;
while (badNode != null) {
//Traverse word list to find already added entries
- if (badNode.word.equals(word))
+ if (badNode.word.equals(word)) {
wordExists = true;
+ break;
+ }
badNode = badNode.next;
}
if (!wordExists)