aboutsummaryrefslogtreecommitdiffstats
path: root/csci1913/Java
diff options
context:
space:
mode:
authorRossTheRoss <msattr@gmail.com>2019-12-11 10:37:30 -0600
committerRossTheRoss <msattr@gmail.com>2019-12-11 10:37:30 -0600
commitce18b653623b14a6b67cfa3f63cfb7596c796f4a (patch)
treea388a12fd923f949e6f6140b8c29cc819644bcca /csci1913/Java
parentFIXING A HOLE WHERE THE RAIN GETS IN (diff)
downloadhomework-ce18b653623b14a6b67cfa3f63cfb7596c796f4a.tar
homework-ce18b653623b14a6b67cfa3f63cfb7596c796f4a.tar.gz
homework-ce18b653623b14a6b67cfa3f63cfb7596c796f4a.tar.bz2
homework-ce18b653623b14a6b67cfa3f63cfb7596c796f4a.tar.lz
homework-ce18b653623b14a6b67cfa3f63cfb7596c796f4a.tar.xz
homework-ce18b653623b14a6b67cfa3f63cfb7596c796f4a.tar.zst
homework-ce18b653623b14a6b67cfa3f63cfb7596c796f4a.zip
Change hash function to also correct one
Diffstat (limited to '')
-rw-r--r--csci1913/Java/lab13_strap012.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/csci1913/Java/lab13_strap012.java b/csci1913/Java/lab13_strap012.java
index e5ce45d..8645a98 100644
--- a/csci1913/Java/lab13_strap012.java
+++ b/csci1913/Java/lab13_strap012.java
@@ -16,7 +16,7 @@ class Test
private static int hash(String name)
{
- return (name.charAt(0) + name.charAt(name.length()-1)) * name.length() % 1023;
+ return ((name.charAt(0) + name.charAt(name.length()-1)) * name.length()) % 255;
}
public static void main(String [] args)