What are packages ?

Packages group related classes and interfaces together and thus avoiding any name conflicts. From OOP’s point of view packages are useful for grouping related classes together. Classes are group together in a package using “package” keyword. In Java, a package is a mechanism for organizing classes and interfaces into a hierarchical structure. It helps in … Read more

How can we implement polymorphism in Java ?

Polymorphism is the capability of an action or method to do different things based on the object that it is acting upon. There are two types of polymorphism:- Method Polymorphism through overloading. Object polymorphism by inheritance / interfaces. Polymorphism in Java can be implemented through method overriding and interfaces. Here are the two main ways … Read more

How do you implement inheritance in Java?

Inheritance is implemented by using “EXTEND” keyword. In Java, inheritance is implemented using the extends keyword. Here’s a brief explanation of how you implement inheritance in Java: java class ParentClass { // Members and methods of the parent class } class ChildClass extends ParentClass { // Members and methods of the child class } In … Read more

What is JIT (Just-in-Time) Compilation?

When JVM compiles the class file he does not compile the full class file in one shot. Compilation is done on function basis or file basis. Advantage gained from this is that heavy parsing of original source code is avoided. Depending on need basis the compilation is done. This typ of compilation is termed as … Read more

What is JVM (Java Virtual Machine) ?

JVM stands for Java Virtual Machine. It’s an abstract computer or virtual computer which runs the compiled java programs. Actually JVM is a software implementation which stands on the top of the real hardware platform and operating system. It provides abstraction between the compiled java program and the hardware and operating system. So the compiled … Read more