Enums introduced in Java 5.0 are just compiled java classes with some extra behavior. So you can basically do whatever you can in a normal java class inside an enum as well. That includes adding methods , class level variables and constructors to an enum. Adding methods to an enum works just like adding methods …
What is transient keyword in Java?
Java Transient Keyword This article explains about the transient variable and when it will be used in the Java programming. Another important fact is that, this question is most frequently asked in the Java interviews for checking the basic knowledge of a programmer. Another point is that the Java transient keyword is not frequently used …
Ordering Queue Using Comparator Interface and PriorityQueue
The basic use of Queue class is to provide a data structure which allows storing objects in a First in First out(FIFO) format. But sometimes one wants to maintain the ordering, based on some other metric. This is exactly the purpose of PriorityQueue, another Queue implementation. You provide it a Comparator, and it does the …
RMI Interview Questions
1)Explain RMI Architecture? RMI uses a layered architecture, each of the layers could be enhanced or replaced without affecting the rest of the system. The details of layers can be summarised as follows: Application Layer: The client and server program Stub & Skeleton Layer: Intercepts method calls made by the client/redirects these calls to a …
JMS Interview Questions
1) What is JMS? Java Message Service is the new standard for interclient communication. It allows J2EE application components to create, send, receive, and read messages. It enables distributed communication that is loosely coupled, reliable, and asynchronous. 2) What type messaging is provided by JMS Both synchronous and asynchronous 3) How may messaging models do …
Java Interview Questions & Answers
This article lists over 200+ questions for the Java interview. These questions are most frequently asked by the Java interviewers. If you are preparing for the Core java interview, this questions will be much helpful to understand the nature of questions. Note that this preparations would be very much suitable for the beginners and the …
EJB Interview Questions
This article presents comprehensive guide for the EJB Interview Questions. The questions presented in this article are mos frequently asked in the Java interviews. If we have missed any of the important questions or there is mistake in the questions, please write it in the comments section. We are happy to improve this article based …
Design Patterns Interview Questions
1) What is a software design pattern? A design pattern is a solution to a general software problem within a particular context. Context : A recurring set of situations where the pattern applies. Problem : A system of forces (goals and constraints) that occur repeatedly in this context. Solution : A description of communicating objects …