Showing posts with label Java Developer Interview Questions. Show all posts
Showing posts with label Java Developer Interview Questions. Show all posts

Tuesday, 10 May 2016

Java Annotations

Annotations were a feature introduces in Java 5. By the way the current version of java is 8.

Annotations tell the compiler about additional information.

Annotations commonly used are :

@Entity
@RequestMapping



Annotations can be applied to class, method, method parameter and instance variable

Wednesday, 13 April 2016

JAVA and OOPS multiple choice questions Test with answeres

Since now a days the number of candidates appearing for a job has increased, companies have started keeping screening process. This screening process consist of objective questions which can be answered online. Only those candidates which score good marks in Objective questions are called for personal interviews.

This blog has multiple choice OOPS and Java  questions. It is a mix of topics like Inheritance, overriding, static, constructor etc.

Read the question and try to solve it yourself. Then you can click on the Answer button to verify your answer.


Core Java Test 1 >> Core Java Test 2 >> Exception Handling Test 3


Thursday, 10 December 2015

Java Interview Questions for 2 to 5 yrs - Java Developer

Hello All,
This blog lists the interview questions that you are likely to face in an Interview if you are Java developer between 2 to 5 years.
When you reach experience level of more than 2 years it is assumed by the interviewer that you have good hand on experience in Java stack.
Sometimes the interviews are for a specific project. Like a project may require candidate to have experience in Spring or Struts or Hibernate. Or sometimes the interview is not for a specific project and is for a open requirement.
Sometimes specific skills are looked for, like the candidate should have experience in SOAP and REST Web-services.

The interviewer is not expecting the candidate to know the designing or high level architecture of the project. What he is expecting is the candidate should be aware of the Project, the technologies used and should be aware of the role he played in the project. As this is not a fresher interview the questions would start with basics and then go in deep.

Below here are the list of questions.

Monday, 1 June 2015

Java Singleton Pattern

Singleton pattern is the most common types of patterns used in Java. It is also very common that interviewers ask questions to explain and implement singleton pattern

Lets first define Singleton
Singleton is a class whose only one object can be created.
There are couple of ways to implement Singleton class. Lets see the simplest one first.

Wednesday, 19 March 2014

Java Custom ArrayList

This blog explains how internally a ArrayList stores data. To simplify the actual ArrayList implementation I have created a custom ArrayList class with minimum methods to add and get the elements. The ArrayList here uses generics and can also be instantiated without the generic parameter as allowed for java.util.ArrayList class.

Tuesday, 27 August 2013

Java Collections : Internal Working

Java Collections:

Going for an Job Interview? be prepared with Java Collections framework. Java Collection framework is the most preferred topic by interviewers. It gives them the idea of how much effort the interviewee as taken to understand this framework and clear the interview.

And guess what, similar questions are now also asked in US for H1B visa holders, or MS post graduates looking for job.

This blog explains internal working of the Collection framework. For Interview Question on Collection refer Java Collection Interview Questions. 

For Java Interview questions for 2 to 5 years Senior Developer refer this blog.

Recently Blockchain has also made place in Java Interviews. Blockchain internally is also a Data Structure. To know more click here : Implementing Blockchain using Java

Click Here for Core Java Objective Questions and Answers

Custom implementation of Collections and Data Structure:

Java Collection internally uses the primitive and core elements like Arrays and datastructures like  Linked List, Tree etc. So if you are asked a question to explain the internal working of any of the Collection classes, don't be surprised. Be it an interview for an Junior Java developer or even for an Architect, Java Collection is always something that you will have on you plate.

Java provides many collection classes that can be used to store data. Knowing which collection class to use for best performance and optimum result is the key.

First the basics.
Below two image shows the complete hierarchy of interfaces and classes present in the Collection framework.

The Collections come in basic four flavors:
Lists : List of things ( Classes that implement List Interface)
Sets : Unique things ( Classes that implement Set Interface)
Maps : Things with unique id ( Classes that implement Map Interface)
Queues : Things arranged in order ( Classes that implement Queue Interface)

The blue ones are the Interfaces and the red ones are the implementation classes

Below is Map. A map is a special type of collection.



          Below table shows the different concrete classes implementing these interfaces



Maps
Sets
Lists
Queues
Utilities
HashMap
HashSet
PriorityQueue
Collections
Hashtable
LinkedHashSet
Vector
Arrays
TreeMap
TreeSet
LinkedList
LinkedHashMap

Share the post