⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tij0172.html

📁 学习java的经典书籍
💻 HTML
字号:
<html><body>

<table width="100%"><tr>
<td>
<a href="http://www.bruceeckel.com/javabook.html">Bruce Eckel's Thinking in Java</a>
</td>
<td align="right">
<a href="tij_c.html">Contents</a> | <a href="tij0171.html">Prev</a> | <a href="tij0173.html">Next</a>
</td>
</tr></table>
<hr>

<H2 ALIGN=LEFT>
Exercises</H2>
<OL>
<LI><FONT FACE="Carmina Md BT" SIZE=5 COLOR="Black">	</FONT><FONT FACE="Carmina Md BT" SIZE=3 COLOR="Black">Compile
and run the 
</FONT><FONT FACE="Carmina Md BT" SIZE=3 COLOR="Black"><B>JabberServer</B></FONT><FONT FACE="Carmina Md BT" SIZE=3 COLOR="Black">
and 
</FONT><FONT FACE="Carmina Md BT" SIZE=3 COLOR="Black"><B>JabberClient</B></FONT><FONT FACE="Carmina Md BT" SIZE=3 COLOR="Black">
programs in this chapter. Now edit the files to remove all of the buffering for
the input and output, then compile and run them again to observe the results.
</FONT><LI><FONT FACE="Carmina Md BT" SIZE=5 COLOR="Black">	</FONT><FONT FACE="Carmina Md BT" SIZE=3 COLOR="Black">Create
a server that asks for a password, then opens a file and sends the file over
the network connection. Create a client that connects to this server, gives the
appropriate password, then captures and saves the file. Test the pair of
programs on your machine using the 
</FONT><FONT FACE="Carmina Md BT" SIZE=3 COLOR="Black"><B>localhost</B></FONT><FONT FACE="Carmina Md BT" SIZE=3 COLOR="Black">
(the local loopback IP address 
</FONT><FONT FACE="Carmina Md BT" SIZE=3 COLOR="Black"><B>127.0.0.1</B></FONT><FONT FACE="Carmina Md BT" SIZE=3 COLOR="Black">
produced by calling 
</FONT><FONT FACE="Carmina Md BT" SIZE=3 COLOR="Black"><B>InetAddress.getByName(null)</B></FONT><FONT FACE="Carmina Md BT" SIZE=3 COLOR="Black">).</FONT><LI><FONT FACE="Carmina Md BT" SIZE=5 COLOR="Black">	</FONT><FONT FACE="Carmina Md BT" SIZE=3 COLOR="Black">Modify
the server in Exercise 2 so that it uses multithreading to handle multiple
clients.
</FONT><LI><FONT FACE="Carmina Md BT" SIZE=5 COLOR="Black">	</FONT><FONT FACE="Carmina Md BT" SIZE=3 COLOR="Black">Modify
</FONT><FONT FACE="Carmina Md BT" SIZE=3 COLOR="Black"><B>JabberClient</B></FONT><FONT FACE="Carmina Md BT" SIZE=3 COLOR="Black">
so that output flushing doesn&#8217;t occur and observe the effect. 
</FONT><LI><FONT FACE="Carmina Md BT" SIZE=5 COLOR="Black">	</FONT><FONT FACE="Carmina Md BT" SIZE=3 COLOR="Black">Build
on 
</FONT><FONT FACE="Carmina Md BT" SIZE=3 COLOR="Black"><B>ShowHTML.java</B></FONT><FONT FACE="Carmina Md BT" SIZE=3 COLOR="Black">
to produce an applet that is a password-protected gateway to a particular
portion of your Web site.
</FONT><LI><FONT FACE="Carmina Md BT" SIZE=5 COLOR="Black">	</FONT><FONT FACE="Carmina Md BT" SIZE=3 COLOR="Black">(More
challenging) Create a client/server pair of programs that use datagrams to
transmit a file from one machine to the other. (See the description at the end
of the datagram section of this chapter.)
</FONT><LI><FONT FACE="Carmina Md BT" SIZE=5 COLOR="Black">	</FONT><FONT FACE="Carmina Md BT" SIZE=3 COLOR="Black">(More
challenging) Take the 
</FONT><FONT FACE="Carmina Md BT" SIZE=3 COLOR="Black"><B>VLookup.java</B></FONT><FONT FACE="Carmina Md BT" SIZE=3 COLOR="Black">
program and modify it so that when you click on the resulting name it
automatically takes that name and copies it to the clipboard (so you can simply
paste it into your email). You&#8217;ll need to look back at the IO stream
chapter to remember how to use the Java 1.1 clipboard.
</FONT></OL><DIV ALIGN=LEFT><FONT FACE="Da Vinci Extras" SIZE=39 COLOR="Black">ij</FONT><a name="Chapter_13"></a><a name="_Toc375545412"></a><a name="_Toc407441460"></a><a name="_Toc408018793"></a><P></DIV>

<div align="right">
<a href="tij_c.html">Contents</a> | <a href="tij0171.html">Prev</a> | <a href="tij0173.html">Next</a>
</div>
</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -