Sahi Papers: Sample Questions 5 - 6 of 7

Examrace Placement Series prepares you for the toughest placement exams to top companies.

Question number: 5

» Languages » Java

Short Answer Question▾

Write in Short

What is multithreading? (2009 - 10)

Explanation

  • Java is a multi threaded programming language which means we can develop multithreaded program using Java. A multithreaded program contains two or more parts that can run concurrently and each part can handle different task at the same time making optimal use of the available resources specially when your computer has multiple CPUs.
  • By definition multitasking is when multiple processes share common processing resources such as a CPU. Multithreading extends the idea of multitasking into applications where you can subdivide specific operations within a single application into individual threads. Each of the threads can run in parallel. The OS divides processing time not only among different applications, but also among each thread within an application.
  • Multithreading enables you to write in a way where multiple activities can proceed concurrently in the same program.

Question number: 6

» Languages » Java

Short Answer Question▾

Write in Short

What is interface? (2009/2010)

Explanation

An interface is a reference type in Java, it is similar to class, it is a collection of abstract methods. A class implements an interface, thereby inheriting the abstract methods of the interface. Interfaces have the following properties:

  • An interface is implicitly abstract. You do not need to use the abstract keyword while declaring an interface.

  • Each method in an interface is also implicitly abstract, so the abstract keyword is not needed.

  • Methods in an interface are implicitly public.