Home » Java

Tag Archives: Java

Java String Methods from Java 8 to Java 14

In this article, we will look at the new string methods added to the Java API from versions 8 to 14. 1. Java String Methods – Java 8 The newly added method in Java 8 is join for joining up the various strings. Let us see the methods with an example: public class StringDemo { public static void main(String[] args) ...

Read More »

Java Exercises

In this post, we feature an article with Java Exercises. In this tutorial, we will see the Java features in detail through code examples. 1. Overview We look at the features of Java in this article. Java is used for developing software and executing the code. The exercises help to demonstrate the java language concepts. Table Of Contents 1. Overview ...

Read More »

Java Pointers (References) Example

1. Overview In this article, we will take a look at the comparison of Java Pointers (References ) with C++ Pointers. Java has four types of references which are strong, weak, soft and phantom references. In C++, you can use references and pointers. 2. Java Pointers (References) 2.1 Prerequisites Java 8 is required on the Linux, windows or mac operating ...

Read More »

Java Tic Tac Toe Program

This post is about creating a simple elegant Java Tic Tac Toe game, with ability to play human vs human and computer vs human. We will build the game incrementally with each feature added to the design. 1. Java Tic Tac Toe: Introduction This entire program requires only Java and apart from it does not require any library etc. Listed ...

Read More »

Setting Up EhCache Without the XML Hassle

1. Introduction In this example, we will go over an easy way to set up EhCache without the XML hassle. This example utilizes the simplicity of Spring Boot and Spring’s Cache annotations. If you are on this page, I can assume you are likely familiar with EhCache. But, just in case, let’s do a short recap. EhCache is an open-source, ...

Read More »

Java Packages – How to use them

 1. Introduction We look at java packages in this article. If you want to learn java, java packages topic will be a great start. We look at code samples to present how to use the java packages. 2. Java Packages Java packages help in avoiding naming collisions, access control, and separation of modules.They help in making usage of interfaces, annotations, ...

Read More »

Float vs Double Java Example

Hello readers. In this tutorial we will learn about the float and double data types in the Java programming language. More specifically, we feature a comprehensive article about Float vs Double Java. 1. Introduction In Java programming, float and double data types both represent in floating-point numbers but a double data type is a little more precise than float. 1.1 ...

Read More »

How to write Java Doc

Hello readers, in this tutorial, we will learn how to write a Java Doc in Java programming language. 1. Introduction In Java programming, developers can use any JavaDoc tool of their preference or the ALT + SHIFT + J key for generating a standard HTML documentation. In this tutorial, we will primarily focus on the keyboard keys but before going ...

Read More »

Getters and Setters Java Example

Hello readers! In this tutorial, we feature a comprehensive Getters and Setters Java example. We will learn the Accessor and Mutator in Java programming language. 1. Introduction Java programming offers Accessor and Mutator or popularly called as Getter and Setter methods that are used to update the variable values and retrieve them. The following class illustrates the private variables and ...

Read More »

Basic Java Operators

In this post, we feature a comprehensive article about the basic Java Operators. Basic Java operators are Arithmetic, Bitwise, Assignment, Relational, Logical, Ternary, Unary, Shift, and Equality Operators. Table Of Contents 1. Overview 2. Basic Java Operators 2.1. Prerequisites 2.2. Download 2.3. Setup 2.4. IDE 2.5. Arithmetic Operators 2.6. Bitwise Operators 2.7. Assignment Operators 2.8. Relational Operators 2.9. Logical Operators ...

Read More »