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

Edit

Write in Short

Short Answer▾

What is user defined exception?

Explanation

Understanding of Java Exception Parts
  • User defines an exception or custom exception by creating an exception class. This exception is thrown using throw keyword.
  • Exceptions are already set to trigger on pre-defined conditions such as “divide by zero” triggers Arithmetic Exception.

Question 29

Edit

Describe in Detail

Essay▾

What is the functionality stubs and skeleton?

Explanation

Stubs

  • A stub is a proxy for a remote object that runs on the client computer.
  • Forwords a client՚s remote method invocations to skeleton.
  • It forwords them on to the appropriate server objects.
The Functionality Stubs

Skeleton

  • A skeleton is a proxy for a remote object that runs on the server.
  • Retuns the results of server method invocations to clients via stubs.
The Functionality Skeleton

Question 30

Edit

Describe in Detail

Essay▾

What is the difference between process and threads?

Explanation

Difference between Process and Thread
ProcessThread
Processes are heavy weight operationsThreads are light weight operations
Every process has its own memory space.Threads use the memory of the process they being to.
Program in executionSeparate path of execution of one or more threads is called a process.
Context switching the process is more expensive.Context switching between threads of the same process is less expensive
Processes do not share the memory with other processes.Threads share the memory with other thread of the same process.

Developed by: