What is enum in java?
Enum in Java is a keyword, a feature which is used to represent fixed number of well-known values.
Continue reading What is Enum in Java
Shallow cloning (copy) and deep cloning (copy) is one of the most important question in core java, which is being asked in the interview.
Continue reading Shallow Copy vs Deep Copy in Java
This question generally ask in the interview to check the basic of core java. In real life purpose of all the type of creating object are different. Usually when we required a object to call their function/method , we use
new operator , it means , when we call
new Claszz() it invoke default constructor.
Continue reading Different Ways of Creating Object in java
There are so many questions arise in mind when we ask yourself best practices of JSP ( Java Server Page). Conceptually, a JSP page is converted to a servlet before it’s called on to serve requests. This means that a JSP page can do anything a servlet can do, but it doesn’t mean JSP is appropriate for all tasks.
Continue reading JSP ( Java Server Page) Best Practices
Servlet-based technologies designed to make web application development easier and more effective. The first area of innovation has been happening at the presentation layer. Technologies such as Spring Framework, Struts, JavaServer Pages (JSP), WebMacro, and Velocity give us more productive alternatives. I advise you to consider using a framework and provide some helpful tips in this section on selecting the right framework.
Continue reading Servlet Best Practices
Deadlock describes a situation where two or more threads are blocked forever, waiting for each other. You know , order of execution of threads are non-deterministic, so sometimes very difficult to reproduced deadlock situation , sometimes very hard to come out of deadlock situation, so be careful while locking order on multiple object by multiple threads.
There are series of question ask in the in interview from thread if you say , I have know and work in thread. I tried to put few of them to brush up you skill set in Java thread.
Continue reading Java Threads Interview Questions
Singleton Design pattern is very easy and straight forward with multiple variant of implementation. When a pattern have multiple way of implementation then it become tedious to understand all aspect of implementation. This is very popular pattern and used by almost all the developer.
Continue reading Singleton Design Pattern in Java
What is design principle? it is basically a set of guidline which solve non-functional requirement or functional requirement.
According to Robert Martin there are 3 important characteristics of a bad design that should be avoided:
- Rigidity: it is hard to change because every change affects too many other parts of the system.
- Fragility: when you make a change, unexpected parts of the system break.
- Immobility: Immobility is the inability to reuse software from other projects or from parts of the same project.