Interview Questions

Q:

An algorithm written once which can be used in many places is called

A) Block B) Function
C) Datatype D) None
 
Answer & Explanation Answer: B) Function

Explanation:

Function is an algorithm which can be used any where in the program when required

Report Error

View Answer Report Error Discuss

Filed Under: Java

0 2337
Q:

What are the 3main tasks of JVM?

Answer

The JVM performs three main tasks:


• Loads code


• Verifies code


• Executes code

Report Error

View answer Workspace Report Error Discuss

Subject: Java

0 1531
Q:

By whom will the unallocated memory that is no longer needed will be cleared in java?

A) Java Virtual Machine B) Garebage collector
C) Both A and B D) None
 
Answer & Explanation Answer: B) Garebage collector

Explanation:

The Java programming language provides a system-level thread to track memory allocation.

Garbage collection has the following characteristics:

• Checks for and frees memory no longer needed

• Is done automatically

• Can vary dramatically across JVM implementations

Report Error

View Answer Report Error Discuss

Filed Under: Java

0 2468
Q:

Which of the following are the debugging windows in .NET?

A) Breakpoints B) Output
C) Immediate D) All the above
 
Answer & Explanation Answer: D) All the above

Explanation:

All the above listed are debugging windows in .NET

Report Error

View Answer Report Error Discuss

Filed Under: .NET

0 2694
Q:

What are type safe function pointers?

A) Delegates B) Break points
C) Both A and B D) None
 
Answer & Explanation Answer: A) Delegates

Explanation:

A delegate declares a ref type that references a named of anonymous method. Delegates are secure and type-safe.

Report Error

View Answer Report Error Discuss

Filed Under: .NET

1 3641
Q:

Explain how garbage collection deals with circular referrences?

Answer

The .Net runtime knows about all the references between the objects. It can identify all the circular references that are reachable from the root and hence finalize them to free them all at once if and when needed

Report Error

View answer Workspace Report Error Discuss

Subject: .NET

0 1689
Q:

Keeping the actoins and attributes together under a single unit is called 

A) Encapsulation B) Information Hiding
C) Polymorphism D) Inheritance
 
Answer & Explanation Answer: A) Encapsulation

Explanation:

Encapsulation is a process of binding the data objects together under a single unit.It is one ofthe elements of oops

Report Error

View Answer Report Error Discuss

Filed Under: Java

0 2591
Q:

Explain the difference between value types and reference types

Answer

Value type :


 



  • Stores the data

  • The value of value types is stored on the managed stack

  • They are lighter objects 

  • One variable can have only one value


Reference Type :



  • Stores the reference to the data

  • A reference type is allocated on the heap

  • They are heavier objects

  • Several variables can reference the same data


 

Report Error

View answer Workspace Report Error Discuss

Subject: .NET

0 1931