Home » Core Java

Core Java

Big O Notation Java Example

In this post, we feature a comprehensive Big O Notation Java Example. 1. Introduction Asymptotic notations are used to analyze an algorithm’s running time by identifying its behavior as the input size for the algorithm increases. There are six symbols used to characterize the relative growth rates of functions: SymbolSummary f = Θ(g) f grows at the same rate as ...

Read More »

Char Array to String Java Example

Hello readers! In this tutorial we feature a comprehensive Char Array to String Java Example. We will learn different ways for this convertion. Meanwhile, you can also check the String to Char Array Example . 1. Introduction Java programming offers possible ways to convert a character array (char []) to String. A new String is allocated that represents the sequence ...

Read More »

How to throw an exception in Java

In this article we will show How to throw an exception in Java. 1. What are Exceptions? Exceptions are events that occur during the execution of programs that disrupt the normal flow of instructions (e.g. divide by zero, array access out of bound, etc.). Exception objects can be thrown and caught. 2. Types of exceptions There are two types of exceptions in Java: checked ...

Read More »

Java Exceptions List Example

In this article we will discuss the Java exceptions list. We will discuss what are exceptions, when they occur and their types. 1. What is An Exception in Java? Exception is mechanism which Java uses to handle any unforeseen use-case/scenario. Basically an exception is thrown when either something unexpected happened during code execution which is not covered in any code ...

Read More »

String equalsIgnoreCase() Java Example

In this post, we feature a comprehensive article about the equalsignorecase Java ‘s String Method. 1. Introduction Java String class has provided the equalsIgnoreCase method to compare this String to another String by ignoring case since version 1. Here is the method’s signature: boolean equalsIgnoreCase​(String anotherString) The String class inherits the equals method from the Object class. It returns true if and only if the argument ...

Read More »

Remove element from an Array Java Example

Hello readers, in this tutorial, we will learn two different ways to remove an element from an array. 1. Introduction In Java programming, Arrays represent an index-based object that consists of the same data type elements. The array elements are stored in a common memory location and can store only a fixed number of elements. Arrays offer, Code Optimization Random ...

Read More »

What is null in Java

In this article, we will discuss the null in java. Java and null share a unique bond across the board, whether we are using it as a default or placeholder or being used as a filler for a variable intentionally. 1. What is null and why it is used? Recall what a variable is and what a value is. A ...

Read More »

SQL Temp Table Example

Welcome readers, in this tutorial, we will learn how to use the temporary tables in the database. 1. Introduction A temporary table is a table that, Is only visible to the current session Is automatically dropped when the current session is closed Is permanently not stored in a database; therefore, it is effective for the testing purpose Is only available ...

Read More »

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 »