Core Java Interview preparation

How to create Threads by Implementing Runnable Interface

How to create Threads by Implementing Runnable Interface in Java In this tutorial, we will discuss, What are threads? Difference between Thread and Process. How to create Threads by Implementing Runnable Interface? Video Tutorial: What are Threads…? Thread is a tiny program running continuously. It is sometimes called a lightweight process. But there lie differences …

How to create Threads by Implementing Runnable Interface Read More »

Implementing multiple inheritances using interfaces in Java

Implementing multiple inheritances using interfaces in Java Write a Java program to demonstrate the role of interfaces while implementing multiple inheritances in Java. Video Tutorial: Before we understand, how to use an interface to implement multiple inheritances, we will discuss the types of inheritance supported by Java. There are four types of Inheritance: 1. Single …

Implementing multiple inheritances using interfaces in Java Read More »

Java program to find area of rectangle triangle Interface

Java program to find the area of rectangle and triangle using Interface Write a Java program to define an interface called Area which contains a  method called Compute() and calculate areas of the rectangle(I*b) and triangle(1/2*b*h) using classes Rectangle and Triangle.   Video Tutorial: Step1: Create an interface in Java as shown below: public interface …

Java program to find area of rectangle triangle Interface Read More »

Difference between Class & Interface Extend Implement Interface

In this article, I will cover, What are Interfaces in Java? Difference between Class & Interface. How to Extend and Implement Java Interface? Video Tutorial – Difference between Class & Interface Extend Implement Interface: Definition of Java Interface: An interface is similar to a class but there lies some difference between the two. Difference between …

Difference between Class & Interface Extend Implement Interface Read More »