Home » Core Java

Core Java

Java not equal Example

In this article, we will show you a Java not equal Example. Firstly we will talk about what is “not equal” in general and for what reason we use it. After that, we will do some examples of how we use it. 1. Introduction Java has a rich set of operators which is used to manipulate variables. This set we ...

Read More »

What does void mean in Java ?

In this post, we feature a comprehensive article explaining what Void means in Java. 1. What does void mean in Java ? In Java, void keyword is used with the method declaration to specify that this particular method is not going to return any value after completing its execution. We cant assign the return type of a void method to ...

Read More »

Instantiate Java Example

In this post, we feature a comprehensive article implementing an Instantiate Java example. The phrase “instantiating a class” means to create an object. A class provides the blueprint for objects, and we create an object from a class. For example, the statement – Animal doggy = new Animal(); has three parts to it. Declaration: Animal doggy declares a variable doggy ...

Read More »

Java Double Primitive Example

In this article, we will focus on examples in order to understand the Java double primitive type. 1. Introduction The double data type is a double-precision 64-bit IEEE 754 floating point. The double data type can store fractional numbers from 1.7e−308 to 1.7e+308. That range can also be positive or negative. Note that you should end the value of a double with a “d”. ...

Read More »

Java Matrix Example

In this article, we will discuss the Matrix in Java. We will cover what matrix are, how to create a Java matrix, how to traverse a matrix and some of the common operations on matrices. 1. What is a Matrix in Java? A Matrix is a rectangular array. The elements are arranged in rows and columns. Since there are two ...

Read More »

Linear Search Java Example

1. Introduction Linear search is a computer algorithm which finds an element from an array sequentially. The time complexity is O(n) in the worst case – meaning the element is the last element of the array or not in the array. The time complexity is O(1) in the best case – meaning the element is the first element of the ...

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 »

Basic Operators: ^ in Java

In this post, we feature a comprehensive article about the Bitwise Operator ^ in Java. 1. Introduction Bitwise XOR (exclusive or) is one of the bitwise operators which operate on individual bits. It is denoted by ^ symbol. ^ requires two arguments in order to work and it performs XOR operation between them in their binary form. XOR returns true ...

Read More »

Java Unsigned int Example

In this article, we will talk about the Java Unsigned int. Firstly, we will answer the question if java has unsigned int data type and then we will show you some Java Unsigned int Example on Guava library and JOOU library. 1. Introduction There are a lot of options if you want to store a number in Java. You can ...

Read More »

Java Struct Example

In this post, we feature a comprehensive article about structs in Java. 1. Introduction This article focuses on Structs but not Structs framework. Structs are similar to the class that holds different types of data and it is a value type. It is used to create lightweight objects and also when data is not modified after creation. Although it is ...

Read More »