0% found this document useful (0 votes)
56 views2 pages

Advanced Java Programming Exam 2011

This document contains exam questions for an Advanced Java Programming course. It includes multiple choice and long answer questions covering topics like: - Multithreading - Final, final, and finalize keywords - Remote Method Invocation (RMI) - Servlets - Java Database Connectivity (JDBC) - Mobile applications The questions are divided into two parts: Part A contains 10 short multiple choice questions and Part B contains longer answer questions requiring explanations and code examples.

Uploaded by

Bizuayehu Mamuye
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views2 pages

Advanced Java Programming Exam 2011

This document contains exam questions for an Advanced Java Programming course. It includes multiple choice and long answer questions covering topics like: - Multithreading - Final, final, and finalize keywords - Remote Method Invocation (RMI) - Servlets - Java Database Connectivity (JDBC) - Mobile applications The questions are divided into two parts: Part A contains 10 short multiple choice questions and Part B contains longer answer questions requiring explanations and code examples.

Uploaded by

Bizuayehu Mamuye
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

B.E/B.

Tech D E G R E E END S E M E S T E R EXAMINATIONS, NOV/DEC 2011


F I F T H S E M E S T E R - ( R E G U L A T I O N S 2004)
Information Technology
IT503 Advanced Java Programming

Time: Three hours Maximum: 100 marks


Answer A L L Questions.
P a r t - A (10*2 = 20)

1. What is Multithreading?
2. Differentiate final, finally and Finalize with reference to java.
3. State about HOP protocol.
4. What are the uses of RMI Registry and Security Manager?
5. What is meant by Naming services?
6. What are the differences between java bean and EJB?
7. What is a cookie?
8. What is the difference between doGet() and doPost() methods used in servlet?
9. What are Midlets?
10. How do you deploy Mobile Objects?

Part B - (16*5 =80)

11 i) Describe the importance of byte code to get platform independence of java


program. (10)

ii) Write a Java program to copy one file to another file with the help of byte stream
classes. (6)

12 a) i) Write a program to implement socket programming using DataGram class (10)

12 a) ii) Describe about Java Messaging Services. (6)

(OR)

12 b) i) Explain the content handler and protocol handler with corresponding


classes, methods and examples. (10)

12 b) ii) Write a program to retrieve and display port number and host name of an
URL. (6)

13 a) i) What is Distributed application architecture? What is RMI? List the steps for

building distributed applications using RMI. (10)

13 a) ii) Describe about Object Serialization. (6)

(OR)
13 b) i) What are the applications CORBA? How is it related to RMI? What are the
differences between CORBA and RMI? (10)

13 b) ii) How to create a JAR file? Explain the jar command with it's all option in
detail with suitable example. (6)

14 a) i) Explain session management with the help of an example program. (10)

14 a) ii) Explain the life cycle of a Servlet with the help of an example. (6)

(OR)

14 b) i) Write a program to display a database file containing customer_id,name and


address using JDBC. (It))

14 b) ii) Discuss about JINI Technology. (6)

15 a) i) Discuss about (16)


o Mobile Devices Profiles
o Mobile Software

(OR)

15 a) i) Explain about how to develop Mobile Networking Applications. (16)

Common questions

Powered by AI

The servlet life cycle consists of loading and instantiation, initialization with the init() method, request handling through the service() method, and finally, destruction using the destroy() method. Each stage contributes to handling client requests efficiently: init() sets up resources, service() processes requests, and destroy() cleans up resources .

Developing a distributed application using RMI involves creating interfaces for remote objects, implementing these interfaces, compiling source files and generating stubs, starting the RMI registry, and executing the server and client applications. RMI supports client-server communication by allowing methods to be called from remote servers as if they were local methods, thus simplifying network interactions .

The HOP protocol facilitates communication by providing a lightweight, efficient protocol that ensures message delivery and data integrity across distributed systems. It is most effective in environments requiring fast, reliable messaging and minimal overhead .

The 'final' keyword is used to declare constants, prevent inheritance of classes, or prevent method overriding. 'Finally' is a block used to execute important code such as closing a connection, regardless of exception handling. 'Finalize' is a method in the Object class for garbage collection before an object is destroyed .

A JavaBean is a reusable software component that follows specific conventions, such as having a no-argument constructor and providing getter/setter methods. An Enterprise JavaBean (EJB) is a more complex, server-side component that supports distributed, transactional, secure applications. EJBs provide built-in services like transaction management and dependency injection, whereas JavaBeans are primarily used for client-side code without these additional services .

JINI technology simplifies network connectivity by enabling devices and services to dynamically discover, join, and communicate within a network. It provides a robust infrastructure for creating service-oriented architectures where services can advertise themselves and clients can discover them easily, reducing the configuration overhead and enhancing scalability .

doGet() is used for sending requests with a limited amount of data appended to the URL, suitable for non-sensitive data that can be cached. In contrast, doPost() allows sending a larger body of data through the request, suitable for sensitive information and operations that modify data, thus avoiding storing data in browser history .

Both CORBA and RMI facilitate communication in distributed systems. RMI is specific to Java applications, emphasizing ease of use and seamless JVM integration. CORBA, however, supports interoperability between applications written in different programming languages, offering wider language support. CORBA often requires more complex setup and management but provides broader cross-language integration .

Mobile Device Profiles determine the APIs and features available for a device, affecting the app's compatibility and performance. Mobile Software includes the operating system and application frameworks which provide the underlying environment for mobile apps. Together, they impact user experience and app capabilities .

The RMI Registry plays a critical role in managing the namespace for services, allowing remote objects to be registered and looked up. The Security Manager ensures that the Java runtime enforces a security policy that can prevent unsafe operations, which is crucial in a distributed context where code may run on different machines .

You might also like