Languages-Java [3i Infotech Placement]: Sample Questions 118 - 120 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 118

Edit

Appeared in Year: 2004

Write in Short

Short Answer▾

How can a EJB pass it՚s reference to another EJB?

Explanation

EJB has two client interfaces:

Client Interface

Remote interface:

  • Specifies business methods that the clients of the object can invoke.

Home interface:

  • Home interface defines EJB life cycle methods, a method to create and retrieve a reference to the object.

Question 119

Edit

Write in Short

Short Answer▾

What are the benefits of using swing over AWT?

Explanation

  • Provides both additional components and added functionality to AWT-replacement components.
  • Changes appearance based on the current “look and feel” of library being used.
  • Allows lightweight components- components are lightly dependent on underlying domain.
  • Better support for multi-threading.
  • Built on the MVC model- model-view-controller paradigm (MVC) can provide more flexible UI.

Question 120

Question

MCQ▾

Which of the following involves context switch?

Choices

Choice (4)

a.

Floating poitnt exception

b.

Privileged instruction

c.

System call

d.

Question does not provide sufficient data or is vague

Answer

c.

Explanation

Understanding of Context Switching
  • Context switch is starting execution of a new process from specified location.
  • System call calls a kernel mode procedure during the execution of another process.
  • When a program makes a system call, the mode is switched from user mode to kernel mode.
  • This is called a context switch.
  • Then the kernel provides the resource which the program requested.
  • Context switch changes the mode from kernel mode back to user mode.
  • System calls are made by the user programs in following situations:
    • Creating, opening, closing and deleting files in the file system.
    • Creating and managing new processes.
    • Creating a connection in the network, sending, and receiving packets.
    • Requesting access to a hardware device, like a mouse or a printer.

Developed by: