Languages-Java [3i Infotech Placement]: Sample Questions 121 - 123 of 141

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 121

Edit

Describe in Detail

Essay▾

What is the main functionality of the remote reference layer?

Explanation

Define RMI Logical View
  • Remote reference layer is a part of JAVA՚s remote method invocation (RMI) protocol.
  • Used in both the RMI client and server and by the stub or skeleton protocol layer.
  • It uses the transport layer.
  • Handles the creation and management of remote object references.
  • Responsible for transport independent functioning of RMI, as a connection manager for object invocation.
  • Acts an interface between the skeleton layer and transport layer protocols.

Question 122

Edit

Write in Short

Short Answer▾

What are streams?

Explanation

  • Basically two types of streams in java are input and output streams, and java 8 stream.
Two Types of Streams in Java
  • Used to perform input and output of 8-bit bytes.
  • There are many classes related to byte streams but the most frequently used classes are File Input Stream and File Output Stream.

Question 123

Edit

Describe in Detail

Essay▾

How would you obtain the current time and difference between two times?

Explanation

Date class in java. util can be used for this purpose

Ex:

java. util. Date d1 = new java. util. Date () ;

System. out. println (d1. getTime () ) ;

statement 1;

statement 2;

statement 3;

java. util. Date d2 = new java. util. Date () ;

System. out. println (d2. getTime () ) ;

Developed by: