Short Core Java Interview Questions ?


1. Primitive data types are passed by reference or pass by value ?
Ans. Primitive data types are passed by value.

2. How to create custom exceptions ?
Ans. Your class should extend class Exception, or some more specific type thereof.

3. What is the List interface?
Ans. The List interface provides support for ordered collections of objects.

4. What is the typical use of Hashtable?
Ans. Whenever a program wants to store a key value pair, one can use Hashtable.

5. I am trying to store an object using a key in a Hashtable. And some other object already exists in that location, then what will happen? The existing object will be overwritten? Or the new object will be stored elsewhere?
Ans. The existing object will be overwritten and thus it will be lost.

6. Can a vector contain heterogenous objects?
Ans. Yes a Vector can contain heterogenous objects. Because a Vector stores everything in terms of Object.

7. Can a ArrayList contain heterogenous objects?
Ans. Yes a ArrayList can contain heterogenous objects. Because a ArrayList stores everything in terms of Object.

8. Can a vector contain heterogenous objects?
Ans. Yes a Vector can contain heterogenous objects. Because a Vector stores everything in terms of Object.



Explore posts in the same categories: Java Interview Questions


BOOKMARK THIS : del.icio.us | Digg it | Furl | reddit |


Related Questions :

  • Questions to ask during an Interview …
  • Usually you will be given the opportunity to ask questions at the end of your interview. You should at least...
  • Facing the Interview : Techniques
  • There are several interview technique s one can use during the actual interview Attention Aware Interview technique : Limit you amount of...
  • Have you any questions for us?
  • It is important that you do have questions for the following ...
  • Be Prepared for the Interview Questions …
  • Your job interview preparation can give you a lot of insights on how to answer interview questions. The job description...
  • One to One Job Interview Tips
  • The most common interview is the one to one. The interviewer with the interviewee. The One to One Job Interview...
  • Short C# Interview Questions.
  • 1.    What’s the .NET datatype that allows the retrieval of data by a unique key? Ans.  HashTable. 2.    What’s class SortedList underneath? Ans. ...
  • What is a Job Interview ?
  • A job interview is the final step in convincing potential employers about what you bring to the table. Preparing for...
  • Must Ask Interview Questions
  • The interview is a two-way process. The company interviewing you will want to find out whether you are suitable to...
  • Phone Interview Tips - Part 2
  • During phone interviewHere are the some points for successful phone interviewing. Follow these simple rules and you should achieve success...
  • Group Interview Tips
  • Group Interviews are used to see how you react in a group. An observer is there for watching to see...

    Comments are closed.