Interview Questions

Q:

What is Constructor?

Answer

Constructor is not a special method.


Constructor is block of code that is executed automatically whenever object of the class is created.

Report Error

View answer Workspace Report Error Discuss

Subject: Java

0 2039
Q:

What is the use of overloading ? or why overloading?

Answer

By using overloading we can add new functionality to the sub class.

Report Error

View answer Workspace Report Error Discuss

Subject: Java

0 2038
Q:

What are wrapped classes ?

Answer

Wrapped classes are classes that allow primitive types to be accessed as objects.

Report Error

View answer Workspace Report Error Discuss

Subject: Java

0 2038
Q:

Which cost is an example of a variable cost?

A) raw materials B) raw materials
C) labor D) All of the above
 
Answer & Explanation Answer: D) All of the above

Explanation:

Variable costs are expenses that vary in proportion to the amount of goods or services that a business produces. 

Examples of variable cost include labor, packaging and raw materials.

Report Error

View Answer Report Error Discuss

Filed Under: Finance
Exam Prep: Bank Exams , CAT
Job Role: Analyst , Bank Clerk , Bank PO

1 2036
Q:

In which of the following cases will total revenue increase?

A) Price rises and demand is inelastic B) Price falls and supply is inelastic
C) Price rises and demand is elastic D) Price falls and demand is inelastic
 
Answer & Explanation Answer: A) Price rises and demand is inelastic

Explanation:

In the case of, "Price rises and demand is inelastic", the total revenue increases.

Report Error

View Answer Report Error Discuss

Filed Under: Bank Interview
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Analyst , Bank Clerk , Bank PO

1 2036
Q:

Explain how garbage collection manages the reclamation of unused memory?

Answer

The garbage collector assumes that all objects in the managed heap are garbage. It starts walking the roots and builds a graph of all objects reachable from the roots recursively. It stops when it attempts to add an object to the graph that it previously added. The graph contains the set of all objects that are reachable from the application's roots. Any object/s that is not in the graph is not accessible by the application, and is considered garbage. Collection only occurs when the heap is full. In such a case, each and every garbage object calls the Finalize method and reclaims the unused memory

Report Error

View answer Workspace Report Error Discuss

Subject: .NET
Job Role: Software Architect

0 2036
Q:

What is polymorphism?

Answer

It is the ability of an object to behave differently on different situations for the same message.

Report Error

View answer Workspace Report Error Discuss

Subject: Java

0 2035
Q:

How to get last modified date of a file?

Answer

long lastModified();


we can give this return value to a date object and we can get data to be displayed.

Report Error

View answer Workspace Report Error Discuss

Subject: Java

0 2033