Interview Questions

Q:

What is session storage and how can you create one?

Answer

Session storage is same like local storage but the data is valid for a session. In simple words the data is deleted as soon as you close the browser.


To create a session storage you need to use “sessionStorage.variablename” . In the below code we have a created a variable called as “clickcount”.


If you refresh the browser the count increases. But if you close the browser and start again the “clickcount” variable starts from zero.


if(sessionStorage.clickcount)


{


sessionStorage.clickcount=Number(sessionStorage.clickcount)+1;


}


else


{


sessionStorage.clickcount = 0;


Report Error

View answer Workspace Report Error Discuss

1 2145
Q:

How do you deal with authority?

Answer

By asking this the interviewer want to know how much will you obey and obedient to your respective authorities.


 


Example answer :


Say that you deal with authority as you deal with customers - with integrity, professionalism and politeness.

Report Error

View answer Workspace Report Error Discuss

17 2143
Q:

What is the Set interface ?

Answer

- The Set interface provides methods for accessing the elements of a finite mathematical set


- Sets do not allow duplicate elements


- Contains no methods other than those inherited from Collection


- It adds the restriction that duplicate elements are prohibited


- Two Set objects are equal if they contain the same elements

Report Error

View answer Workspace Report Error Discuss

Subject: Java

0 2143
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 2142
Q:

How to create a file on the hard disk by using File class object?

Answer

We can use the following method call:


boolean createNewFile();


This method creates a new file on the HD. 


 


If a file is already existing with the name given in the constructor then this method does not creates file on HD.


If file is successfully created then this method returns true.


If file is already existing on the HD then this method returns false.


This method may throw IOException whenever IO error is generated while creating file on HD.

Report Error

View answer Workspace Report Error Discuss

Subject: Java

0 2142
Q:

What are the things that you need to check in a retail market, as a first line supervisor?

Answer

Applicant should answer that as a first line supervisor, he/she should directly supervise sales workers in a retail department. He/She would get involved in management functions such as purchasing, budgeting, accounting and ensure quality of supply apart from his/her regular supervisor work.

Report Error

View answer Workspace Report Error Discuss

Subject: Retail

0 2139
Q:

What are pass by reference and passby value ?

Answer

Pass By Reference means the passing the address itself rather than passing the value. Passby Value means passing a copy of the value to be passed.

Report Error

View answer Workspace Report Error Discuss

Subject: Java

0 2138
Q:

Which of the following statements is true concerning subqueries?

A) Does not start with the word SELECT. B) Involves the use of an inner and outer query.
C) Cannot return the same result as a query that is not a subquery. D) All of the above
 
Answer & Explanation Answer: B) Involves the use of an inner and outer query.

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: SQL
Job Role: Analyst , Database Administration , IT Trainer

0 2136