Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Quiz Questions
For Chapter 10


THIS PAGE CONTAINS A SAMPLE quiz on material from Chapter 10 of this on-line Java textbook. You should be able to answer these questions after studying that chapter. Sample answers to all the quiz questions can be found here.


Question 1: In Java, input/output is done using streams. Streams are an abstraction. Explain what this means and why it is important.

Question 2: Java has two types of streams: character streams and byte streams. Why? What is the difference between the two types of streams?

Question 3: What is a file? Why are files necessary?

Question 4: What is the point of the following statement?

      out = new PrintWriter( new FileWriter("data.dat") );

Why would you need a statement that involves two different stream classes, PrintWriter and FileWriter?

Question 5: The package java.io includes a class named URL. What does an object of type URL represent, and how is it used?

Question 6: Explain what is meant by the client / server model of network communication.

Question 7: What is a Socket?

Question 8: What is a ServerSocket and how is it used?

Question 9: Network server programs are often multithreaded. Explain what this means and why it is true.

Question 10: Write a complete program that will display the first ten lines from a text file. The lines should be written to standard output, System.out. The file name is given as the command-line argument args[0]. You can assume that the file contains at least ten lines. Don't bother to make the program robust.


[ Answers | Chapter Index | Main Index ]

 
 
  Published under free license. Design by Interspire