Posts tagged "Core Java "

Tag Archives: Core Java

Abstract Class vs Interface in Java

Let’s discuss Abstract Class vs Interface in Java. An  Interface in Java differs from an abstract class because an interface is not a class. An interface is essentially a type that can be satisfied by any class that implements the interface. An abstract class is a class and other classes need to extends an Abstract … Continue reading Abstract Class vs Interface in Java

Constructor Overloading in Java

Like Method overloading , we can overload Constructors as well. The Same constructor declared with different parameters in the same class is known as constructor overloading. Compiler differentiates which constructor is to be called depending upon the number of parameters and their sequence of data types but there are certain rules related to Constructor overloading which needs to be remembered … Continue reading Constructor Overloading in Java

Interface in Java with Example

Let’s learn about Interface in Java. An interface in Java is similar to the class but the only difference is, Interface can have only abstract methods and final static data variables mean constant. Java interface can’t contain the implementation of methods, you can declare the abstract methods only. Interface in Java The interface is used to achieve … Continue reading Interface in Java with Example

Can we create object of Abstract class in Java

This is a very confusing point for many of freshers in Java Programming. Java doesn’t allow to create Object of Abstract Class directly. You can see what is Abstract Class in Java.   Yes, We can create the Object of Abstract Class in Java but not directly. We can create the Object of Abstract Class indirectly with … Continue reading Can we create object of Abstract class in Java

Final Keyword in Java

Final keyword in Java is used to apply the restriction on the user.  In Java, you can declare the variable, method, and class with final keyword. Final keyword is very useful in Java, Final keyword in Java has three different uses: create constants, prevent inheritance and prevent methods from being overridden.   Final Variable Final is … Continue reading Final Keyword in Java

What is Java Heap

When a Java program started Java Virtual Machine gets some memory from Operating System. JVM uses this memory for all its need and part of this memory is call java heap memory. Heap in Java generally located at the bottom of address space and move upwards. Whenever we create the object using new operator or by any another means … Continue reading What is Java Heap

Class and Object in Java

Let’s learn about the class and Object in Java. Java is an object-Oriented programming language, In object-oriented programming technique, we design a program using objects and classes.   What is Objects in JAVA Objects have its own behavior and state. The object can be physical and logical. An object is an instance of a class. If we … Continue reading Class and Object in Java

Compile Time vs Run Time Polymorphism

Polymorphism is one thing in many forms or the capacity to take on different forms.  When it applied to object-oriented programming languages like Java, it describes the ability of language to process objects of various types and classes through a single, uniform interface. Polymorphism in Java is two types- Compile Time or Static Polymorphism Run Time of … Continue reading Compile Time vs Run Time Polymorphism

Polymorphism in Java with Example

You will learn about the Polymorphism in Java. Polymorphism means one thing many forms. Polymorphism is what allows actions to act differently based on the object performing the action. Polymorphism allows you define one interface and have multiple implementations. We can understand the concept of polymorphism with the help of following points– Polymorphism is used … Continue reading Polymorphism in Java with Example