Interview Questions

Q:

How many types of classes are there in Java?

Answer

Two types of classes:


1) Top Level Class


2) Classes within Class


       i) member classes


             a) static member class


             b) non static member class


      ii) local classes


      iii) anonymous classes

Report Error

View answer Workspace Report Error Discuss

Subject: Java

0 1938
Q:

What is Shift() method in Javascript?

Answer

-The shift() method is similar as the pop() method but the difference is that Shift method works at the beginning of the array. 


-The shift() method take the first element off of the given array and returns it. The array on which is called is then altered.


For example


var myarray = ["apple ", "banana ", "mango "]; 


console.log(myarray.shift());


console.log(myarray);


we get the following console output:


apple


["banana ", "mango "];


 


When we call shift() on an empty array, it will return an undefined value.

Report Error

View answer Workspace Report Error Discuss

Subject: Web Technology

0 1938
Q:

What is the purpose of the wait(), notify(), and notifyAll() methods ?

Answer

The wait(), notify(), and notifyAll() methods are used to provide an efficient way for threads to wait for a shared resource. When a thread executes an object's wait() method, it enters the waiting state. It only enters the ready state after another thread invokes the object's notify() or notifyAll() methods..

Report Error

View answer Workspace Report Error Discuss

Subject: Java

0 1938
Q:

In a DB2-CICS program which acts as co-ordinator and which is the participant?

Answer

DB2 acts as the participant and CICS acts as a co-ordinator


 

Report Error

View answer Workspace Report Error Discuss

0 1937
Q:

How to Estimate Testing effort ?

Answer

Time Estimation method for Testing Process:


 


Step 1 : count number of use cases (NUC) of system 


Step 2 : Set Avg. Time Test Cases(ATTC) as per test plan 


Step 3 : Estimate total number of test cases (NTC) 


Total number of test cases = Number of Use Cases X Avg. Test Cases per a use case 


Step 4 : Set Avg. Execution Time (AET) per a test case 


Step 5 : Calculate Total Execution Time (TET) 


TET = Total number of test cases * AET 


Step 6 : Calculate Test Case Creation Time (TCCT)


usually we will take 1.5 times of TET as TCCT


TCCT = 1.5 * TET


Step 7 : Time for Re-Test Case Execution (RTCE) this is for retesting


usually we take 0.5 times of TET


RTCE = 0.5 * TET


Step 8 : Set Report generation Time (RGT


usually we take 0.2 times of TET


RGT = 0.2 * TET


Step 9 : Set Test Environment Setup Time (TEST)


it also depends on test plan


Step 10 : Total Estimation time = TET + TCCT+ RTCE + RGT + TEST + some buffer.


 

Report Error

View answer Workspace Report Error Discuss

Subject: QA Testing

0 1934
Q:

How to insert Javascript in HTML?

Answer

We can insert JavaScript in HTML using <Script tag>. JavaScript can be enclosed in <script type = text/javascript> and ending with </script>.


Example: 


<html> 


  <body> 


        <script type="text/javascript"> 


               ...JavaScript….


         </script> 


   </body> 


</html>

Report Error

View answer Workspace Report Error Discuss

Subject: Web Technology

0 1934
Q:

What is local class?

Answer

Local class is class defined inside method


EX;


class A { // top level class


  public static void main(string[] args) {


   class B { // local class


   }


}


}

Report Error

View answer Workspace Report Error Discuss

Subject: Java

0 1930
Q:

What are the various elements of OOPS?

Answer

Various elements of OOP are:


• Object


• Class


• Method


• Encapsulation


• Information Hiding


• Inheritance


• Polymorphism

Report Error

View answer Workspace Report Error Discuss

Subject: Java

0 1930