REVISION QUESTIONS JAVA
REVISION QUESTIONS JAVA
a) Discuss exception handling and two categories of exception class provided by Java
programming language
b) Describe the three main components of Java and its features
c) Identify five network applications developed using Java programming language
a. With an aid of diagrams describe the differences between the OSI model and
the TCP model
b. Analyse how the communication takes place between layers of the OSI model
a. Based on the IPv4 model, describe all the parts and usage of each part in the IPv4
model structure
b. Write a program that can display 32 bit IP address and user domain name in the WAN
network
a. What do you understand by persistence of a java object.
Write code for a multi-threaded server that would echo system time to a telnet client on port
23
c. Why is stream concept essential for network programming
d. Describe two stream types and their stream family
e. Use the URL class and the openStream () method to read data exposed from
the following endpoint www.maps.com. Insert line comments on each line to
explain your code.
c. Write code for client application that is supposed to hack into to a remote server listening
for messages on port 2019 and download a file called secret.txt. Assume that the file is
streamed by the server upon connection.
a) Define UnknownHostException.
b) In which package do we find InetAddress. Comment on how we can create objects of
this class
c) Write a Java program that retrieves the ip address of a local computer
d) Write a Java program that retrieves the ip address of a remote computer
a. Describe five methods provided by Java to control threads
b. Develop threading application by using java.Lang.Thread class and implement
java.lang.Runnable
c. What do you understand about communication between threads? Explain how pipe
communication and waiting thread notification can be implemented.
a. Differentiate the three URL classes in Java
b. Explain the concept of URL and its formats
a. Write a program to create, read and write information from client to server using
URLConnection class
b. Explain the concept of a layered task with respect to the TCP model.
c. Explain in your own words, your understanding of persistent objects and serialised
Objects.