-
Notifications
You must be signed in to change notification settings - Fork 487
/
exam2-s09.java.html
27 lines (27 loc) · 4.25 KB
/
exam2-s09.java.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="GNU source-highlight 3.1.5
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite">
<title>exam2-s09.java</title>
</head>
<body bgcolor="white">
<pre><tt><b><font color="#0000FF">public</font></b> <b><font color="#0000FF">class</font></b> <font color="#008080">Exam2</font> <font color="#FF0000">{</font>
<b><font color="#0000FF">public</font></b> <b><font color="#0000FF">static</font></b> <font color="#009900">void</font> <b><font color="#000000">main</font></b> <font color="#990000">(</font>String<font color="#990000">[]</font> args<font color="#990000">)</font> <font color="#FF0000">{</font>
<font color="#009900">int</font> tableSize <font color="#990000">=</font> <font color="#993399">9</font><font color="#990000">;</font>
System<font color="#990000">.</font>out<font color="#990000">.</font><b><font color="#000000">println</font></b> <font color="#990000">(</font><font color="#FF0000">"Table size: "</font> <font color="#990000">+</font> tableSize<font color="#990000">);</font>
System<font color="#990000">.</font>out<font color="#990000">.</font><b><font color="#000000">println</font></b> <font color="#990000">(</font><font color="#FF0000">"Briana: "</font> <font color="#990000">+</font> <font color="#FF0000">"Briana"</font><font color="#990000">.</font><b><font color="#000000">hashCode</font></b><font color="#990000">()</font> <font color="#990000">%</font> tableSize<font color="#990000">);</font>
System<font color="#990000">.</font>out<font color="#990000">.</font><b><font color="#000000">println</font></b> <font color="#990000">(</font><font color="#FF0000">"Dan: "</font> <font color="#990000">+</font> <font color="#FF0000">"Dan"</font><font color="#990000">.</font><b><font color="#000000">hashCode</font></b><font color="#990000">()</font> <font color="#990000">%</font> tableSize<font color="#990000">);</font>
System<font color="#990000">.</font>out<font color="#990000">.</font><b><font color="#000000">println</font></b> <font color="#990000">(</font><font color="#FF0000">"Jeff: "</font> <font color="#990000">+</font> <font color="#FF0000">"Jeff"</font><font color="#990000">.</font><b><font color="#000000">hashCode</font></b><font color="#990000">()</font> <font color="#990000">%</font> tableSize<font color="#990000">);</font>
System<font color="#990000">.</font>out<font color="#990000">.</font><b><font color="#000000">println</font></b> <font color="#990000">(</font><font color="#FF0000">"John: "</font> <font color="#990000">+</font> <font color="#FF0000">"John"</font><font color="#990000">.</font><b><font color="#000000">hashCode</font></b><font color="#990000">()</font> <font color="#990000">%</font> tableSize<font color="#990000">);</font>
System<font color="#990000">.</font>out<font color="#990000">.</font><b><font color="#000000">println</font></b> <font color="#990000">(</font><font color="#FF0000">"Josh: "</font> <font color="#990000">+</font> <font color="#FF0000">"Josh"</font><font color="#990000">.</font><b><font color="#000000">hashCode</font></b><font color="#990000">()</font> <font color="#990000">%</font> tableSize<font color="#990000">);</font>
System<font color="#990000">.</font>out<font color="#990000">.</font><b><font color="#000000">println</font></b> <font color="#990000">(</font><font color="#FF0000">"Randolph: "</font> <font color="#990000">+</font> <font color="#FF0000">"Randolph"</font><font color="#990000">.</font><b><font color="#000000">hashCode</font></b><font color="#990000">()</font> <font color="#990000">%</font> tableSize<font color="#990000">);</font>
System<font color="#990000">.</font>out<font color="#990000">.</font><b><font color="#000000">println</font></b> <font color="#990000">(</font><font color="#FF0000">"Wil: "</font> <font color="#990000">+</font> <font color="#FF0000">"Wil"</font><font color="#990000">.</font><b><font color="#000000">hashCode</font></b><font color="#990000">()</font> <font color="#990000">%</font> tableSize<font color="#990000">);</font>
<font color="#FF0000">}</font>
<font color="#FF0000">}</font>
</tt></pre>
</body>
</html>