Home » Core Java (page 2)

Core Java

Interface vs Abstract Class Java Example

In this post, we feature an Interface vs Abstract Class Java Example. One of the most discussed topics in Java for newbies is the Interface and Abstract class. I will give insights into the Java Interfaces and abstract classes. I will also provide some examples and practical use cases. 1. Introduction Abstraction, Encapsulation, and Inheritance are the basic ingredients of ...

Read More »

Scanner hasNext() Java Example

This article will feature a comprehensive Example on Java Scanner hasNext method. We will also understand the hasNext method of Iterator interface with suitable example. 1. Introduction In Java, Scanner is a simple text reader which can parse primitive types and strings using regular expressions. It has been added to JDK 1.5. It breaks its input into tokens using a ...

Read More »

Array methods Java Tutorial

In this post, we feature a comprehensive Array methods Java Tutorial. 1. Introduction to Arrays in Java In java Arrays can be think of the sequential collection of objects. An array can contain a number of items which are all located next to each other in memory. If the number of items in an array is zero, then the array ...

Read More »

Java Cheat Sheet

In this post, we feature a Java cheat sheet. In this tutorial, we will see the Java features and the API classes of Java in detail. 1. Overview We look at the features of Java in this article. Java is used for developing software and executing the code. Java code is converted into bytecode after compilation. The java interpreter runs ...

Read More »

Java Constant Example

A Java constant is used to represent a value that cannot be changed after assignment. Constants make a program more readable and can take the modifiers static and final. Let us look into some examples for Java constants and their best practices in this article. 1. Java constant examples and best practices 1.1 Usage of final The final modifier indicates ...

Read More »

SQL ALTER Table Example

Welcome readers, in this tutorial, we will learn how to ALTER an existing table in the database. 1. Introduction SQL ALTER command is used to modify the structure of a table in the database. This command allows a developer, To add a new column or a constraint to an existing column To drop an existing column or a constraint from ...

Read More »

Java Scheduling Example

This article will feature a comprehensive Example on Java scheduling. We will look into various ways of scheduling a task in Java with relevant code examples. 1. Introduction In Computer Software, Scheduling is a paradigm of planning for an execution of a task at a certain point in time and it can be broadly classified into two types 1. One ...

Read More »

Java Set to List Example

This article is about a Java Set To List Example. Here, we introduce Set & List interfaces and demonstrate a few examples on how implementations of Set in Java can be converted to List in JDK 8. 1. Introduction Java Collection Framework – Interfaces Java Collections Framework provides data structures to store and manipulate a group of Objects. The group ...

Read More »

Int to char Java Example

This article deals with the int to char Java conversion. We will start with the basics of data types and then we will see the conversion of int to char with some examples. 1. Data types in Java Java is a strong statically typed language. This means that every variable and every expression has a type that is known at ...

Read More »

Java System.out.println() Example

Hello readers, in this tutorial we will learn the Java System.out.println() statement. 1. Introduction In Java, System.out.println() is a statement that prints the output to the console. In Java, this complete statement is divided into three parts, System is a final class in the java.lang package. This class is responsible to provide input/output streams, access to the environment variables etc ...

Read More »