Home » Core Java (page 5)

Core Java

Java Thread sleep Example

In this article we are going to get an in depth understanding of: What is a thread in java?What is the use of sleep() in java thread based execution?Important points to remember while using Thread.sleep().How Thread.sleep() works. 1. What is a thread in Java Lets start with what the thread exactly is and how it is supported in Java. Thread ...

Read More »

Java String vs StringBuffer vs StringBuilder Example

1. Introduction In this post, we feature a comprehensive article on Java String vs StringBuffer vs StringBuilder. In an in-depth analysis we will feature how to create Strings and modify string objects using String class, StringBuffer class and StringBuilder class. 2. Java String vs StringBuffer vs StringBuilder 2.1 Prerequisites Java 7 or 8 is required on the linux, windows or ...

Read More »

Printf Java Example

1. Introduction In this post, we feature a comprehensive printf Java Example. Java PrintStream class has provided the printf method to write a formatted string to the PrintStream object since version 5. Here are the method’s signatures: public PrintStream printf(Locale l, String format, Object... args) public PrintStream printf(String format, Object... args) l – a locale to apply during formattingformat – ...

Read More »

Java 8 Lambda Expressions Introduction Example

Hello readers! In this tutorial, we feature a comprehensive article on Java 8 Lambda Expressions.  1. Introduction To achieve the benefits of functional programming in Java, JDK developers introduced Lambda Expressions in Java 8 programming. A lambda expression is a nameless function which does not have the name, return type, and access modifiers A lambda expression instance can be assigned ...

Read More »

SQL Clone Database Example

Welcome readers, in this tutorial, we feature a comprehensive article in SQL clone database. Specifically we will understand how to clone an existing database and its content. 1. Introduction In SQL, Database Cloning represents a feature of ensuring backup of all or specific databases. The feature is implemented for purposes, Data restore that was mistakenly modified or deleted For application ...

Read More »

Java List Example

1. List Interface In this post, we feature a comprehensive article on Java List. We are going to check in depth the java.lang.List in java. 2. List in Collection Hierarchy There are four concrete implementation classes in for List interface in java. List interface extends the Collection interface for some common operation to be supported by all implementation classes with ...

Read More »

SQL Primary Key Example

Welcome readers, in this tutorial, we will understand the SQL Primary Key column that uniquely identifies a tuple in the database table. 1. Introduction SQL Primary Key is a column or multiple columns that uniquely identify a tuple in the database table. It contains unique values but cannot have null or duplicate It consists of multiple columns known as a ...

Read More »

Java Interfaces Example

1. Introduction In this post, we feature a comprehensive article on Java Interfaces. Java interface is an abstract type that defines methods that classes must implement. It can contain constants, abstract method signatures, default methods along with an implementation body, static methods along with an implementation body, and nested types. Java Interface defines the “contracts” and represents the IS-A relationship. ...

Read More »

Java Date Format Example

In this article, we will check the options available on Java Date Format. 1. Introduction Java has multiple packages providing various utility functions to make developer’s job easier. One such is the java.text package which includes utility classes for parsing and formatting numbers and dates, along with utility classes for building other kinds of parsers. The java.text.DateFormatclass and its concrete ...

Read More »