Inheritance in Java

Inheritance in Java

Inheritance is one of the core concepts of an object-oriented language such as Java. Inheritance allows a new class to extend from an existing class known as the parent class. So when do we use inheritance? Consider a scenario where a vehicle describes a very general transportation model, then comes a car, bicycle, and truck.

How to install Java SE Development Kit on Windows

How to install Java SE Development Kit on Windows

Java development SE kit is important to develop applications, applets, and components using Java programming language. The JDK includes also includes the tools useful for testing programs written in Java and running on the Java platform. In this tutorial, we shall loom into the step-by-step process of installing JDK on the Windows system, and also look at the method of setting an environment variable that lets you run Java using the command-line.

What are Generics in Java

What are Generics in Java

A generic class is a special class that generates one or more non-specific java types upon instantiation. This helps remove the runtime exception risk “ClassCastException” when we need to cast between different types. With these generic classes, one has the capability to create classes that work with different java data types. Generics help to improve the quality and efficiency of the code.

What is an Enum and how to use it in Java

What is an Enum and how to use it in Java

Like many things in our daily lives, the initial impression often matters, and programming is not exempted. Programming essentially signifies a list of termed constants. Apart from Java, nearly all other known programming terms have enumeration features. Although Java has the final keyword to signify constants, enumerations were incorporated as an opportuneness to encounter the computer programmer’s several streamlined desires.

Java for loop with examples

Java for loop with examples

Is it right to say that a good programmer must have a deep understanding of loops? That might be a yes or no question but also lacks meaning without justification. In short, what are loops? A loop is a program that Iterates/ repeats several times until a specific condition is met. Loops remain the same no matter the programming language you are using.

How to parse JSON in Java

How to parse JSON in Java

Before we dig into how to parse JSON in Java, let’s first briefly understand what JSON is and what is java. First, Java is an object-oriented programming language. It can be used to develop desktop, android, and web applications. JSON is (Javascript Object Notation). It depends on a subset of Javascript.JSON is language-independent, text-based, and lightweight. It’s used for humans and machines to read and write; hence JSON is essential when transmitting data over the web.

How to Compare Strings in Java

How to Compare Strings in Java

Java is an object-oriented programming language that can be used to develop desktop applications, web applications, android applications, games, database connections, etc. In this article, we are going to study how to compare strings in Java. In java, a String is a data type or an object that is used to store text. The string object contains characters that are enclosed by double-quotes.