Interview Questions

Q:

What is the difference between creating String as new() and literal ?

Answer

When we create string with new() Operator, it’s created in heap and not added into string pool while String created using literal are created in String pool itself which exists in PermGen area of heap.



String s = new String("Test");

does not put the object in String pool , we need to call String.intern() method which is used to put them into String pool explicitly. its only when you create String object as String literal e.g. String s = "Test" Java automatically put that into String pool.

Report Error

View answer Workspace Report Error Discuss

1 2547
Q:

Why Did You Leave Your Last Job?

Answer

The Best way to answer this question:


Be honest but stay positive.  Of course, your answer should be based on the real reason you left, but put a positive spin on it. That means, you should try to frame your honest answer in the most positive way possible.Do not lie, be truthful and honest but do not be harsh on a previous employer. So answer truthfully while at the same time NOT talking about the company or staff in a negative light. More info on why you left a job would help to give applicable suggestions. You TELL them why you left! .  Make it sound as positive as possible though. Put the reason you are no longer at your last job in your question. Unless you were laid off or the company had relocated you too far, just say "it's a career move." It's better not to go into the specifics. Always keep in mind that your  interviewer is looking for a positive, motivated, hard-working candidate. No potential employer wants to hear your gripe about a prior boss or talk poorly about a previous employer. She or he wants to hear about your potential as a superstar at the position you are seeking.

Report Error

View answer Workspace Report Error Discuss

6 2547
Q:

What exactly do you mean by UDP?

Answer

UDP (User Datagram Protocol) is a communications protocol that offers a limited amount of service when messages are exchanged between computers in a network that uses the Internet Protocol (IP).

Report Error

View answer Workspace Report Error Discuss

0 2546
Q:

What are Child Selectors ?

Answer

A child selector is used when you want to match an element that is the child of another specific element.
The parent and child selectors are separated by spaces.
The following selector locates an unordered list element within a paragraph element and makes a text within that element bold.


p > ul {font-weight: bold;}

Report Error

View answer Workspace Report Error Discuss

Subject: Web Technology

4 2544
Q:

What CICS command do you need to obtain the user logon-id?

Answer

You must code EXEC CICS ASSIGN with the OPENID option.


 

Report Error

View answer Workspace Report Error Discuss

0 2544
Q:

How does IDMS communicate with CICS?

Answer

They communicate via service MVS request calls.

Report Error

View answer Workspace Report Error Discuss

0 2543
Q:

What’s the difference between htmlentities() and htmlspecialchars()?

Answer

Htmlentities() converts all applicable characters to HTML entities. While htmlspecialcharacter()converts special characters to HTML entities. This means htmlentities( ) will check for non English language characters, such as French accents, the German umlaut, etc.

Report Error

View answer Workspace Report Error Discuss

Subject: PHP

7 2542
Q:

Is Java a pure object oriented language?

Answer

Java uses primitive data types and hence is not a pure object oriented language.

Report Error

View answer Workspace Report Error Discuss

Subject: Java

1 2541