Class and Object in Java
Class and Object in Java A Class is a factory which helps us to generate an Object. To request a class to generate an object we use “new” keyword followed by class name with paranthesis.
Class and Object in Java Read More »
Class and Object in Java A Class is a factory which helps us to generate an Object. To request a class to generate an object we use “new” keyword followed by class name with paranthesis.
Class and Object in Java Read More »
Difference between Interface and Abstract class in Java Difference between interface and Abstract class in Java is one of the most important interview question for freshers as well as for experienced candidate. and also one more question – when to use Interface and when to use Abstract class, explain with real life example.Here, you will
Difference between Interface and Abstract class in Java Read More »
Static and Non-Static Variable Non-Static Non-static variable is created outside method but inside class without using static keyword. Without creating object, non-static variable can not be accessed. Hence below program will give an error. public class Test { int x = 10; public static void main(String[] args) { System.out.println(x); // This line will give error
Static and Non-Static Variable Read More »
N+1 Problem in Hibernate If you’re working with Hibernate/JPA in your Java projects, you’ve definitely heard about the N+1 problem. It might be sound like a math equation, but it’s actually a performance issue that can slow down your application performance. What is the N+1 Problem? Let’s suppose you want to fetch a list of
N+1 Problem in Hibernate Read More »
Singleton Class in Java – Spring Boot A Singleton class in Java is a class that allows only one instance of itself to be created and provides a global point of access to that instance. A Singleton class allows only one instance of the class to be created during the lifetime of an application. Used
Singleton Class In Java – Spring Boot Read More »
Java Code to find out factorial of any Number Write a Java Code to find factorial of any Number? is most important coding question for freshers. We can find out the factorial of any number by using simple method and also by recursion method. We can use Scanner class as well to take input from
Java code to find factorial of number Read More »
Externalizable Interface in Java Just like Serializable Interface, Externalizable Interface is also used to serialize and deserialize the object. In serialization, it is always possible to save the total object to file, it is not possible to save a part of object, which may create performance problem. So, to overcome these problem Externalizable Interface was
Externalizable Interface : Important Interview Question Read More »
CopyOnWriteArrayList in Java CopyOnWiteArrayList is implementation class of List Interface which is a thread safe version of ArrayList. Hence more than one thread can happily operate on this. While Iterating the List we can do the modification at the same time and we will not get any exception. It implements Serializable, Clonable & RandomAccess Interface. In
CopyOnWriteArrayList Read More »