Home » Core Java (page 3)

Core Java

How to Fix Java Error Code 1618

Most of us would have faced the Java Error Code 1618 while installing or updating Java. The issue is commonly noticed during installation of Java versions 7 and 8. The error indicates that another installation is in progress. It may be a java version or any other installation that uses Windows installer. In this article we shall see some possible ...

Read More »

Math.round Java Example

The Math.round Java – java.lang.math – library contains the static methods to perform basic numeric mathematical operations. Math.round is one such method, which returns the nearest whole number to the argument. In this article, we will dig deeper into this method. 1. What does rounding mean? Rounding is the mathematical process of making the number up or down to the ...

Read More »

Java Math Operators and Math Class Tutorial

In this tutorial, I will demonstrate how to perform the mathematic operations via the build-in Math operators and the Java Math class. Table Of Contents 1. Introduction 2. Technologies Used 3. Maven Project 3.1 Dependency 3.2 Java Object 3.3 Java Object Has Equals Method 4. Arithmetic Operators 4.1 Addition Operator 4.2 Subtraction Operator 4.3 Increment Operator 4.4 Decrement Operator 4.5 ...

Read More »

Java vs C++: The Most Important Differences

In this post, we feature a comprehensive article about Java vs C++ and their most important differences. Java and C++ are the object-oriented programming languages. C++ is platform dependent and Java is platform independent language. In this tutorial, we see the features of Java and C++ to see the differences. Table Of Contents 1. Overview 2. Java vs C++ 2.1. ...

Read More »

Java Max Int Example

1. Introduction Int is one of the most popular primitive data types of java and we use it almost everywhere. This article explains technical specs about max int. 2. Java Max Int According to java, int data type is 32-bit signed two’s complement integer, which has a range from [ -2^31,2^31-1].  Create a new class with name MaxIntegerExample1 and copy-paste the following code : ...

Read More »

Java Modulus Example

In this post, we feature a comprehensive article about Java Modulus. 1. Introduction This article will show the usage of the modulo operation that computes the remainder after division of 2 numbers. Java use a specific arithmetic operator the Remainder Operator with the symbol %. 2. Java Modulus – Use Cases In this section we show same useful use cases ...

Read More »

Java char Primitive Type Example

1. What are Primitive Types in Java? The Java programming language is statically-typed, which means that all variables must first be declared before they can be used. This involves stating the variable’s type and name, as you’ve already seen: char gear = '1'; Above code tell the Java Compiler that a field named “gear” exists, holds character data, and has ...

Read More »

Java Extends Keyword Example

Hello readers, in this tutorial, we will learn the Java extends keyword. 1. Introduction In Java, a subclass can extend the properties of its parent class by using the extends keyword. In Java, java.lang.Object is the parent class of all classes. Do note, this is implicit and does not require to be specified explicitly A class can only extend a ...

Read More »

Java CSV Parsing Example

In this post, we feature a comprehensive Java CSV Parsing Example. CSV stands for Comma Separated Values. As Java developers, we frequently see the need to process CSV files. They are the most commonly used file format for the data interchange. CSV is the simple file format that organizes data in a tabular form and each value is delimited by ...

Read More »

Java Input Example

This article will feature a comprehensive Example on Java Input. We will look into various ways of obtaining user input in Java with relevant code examples. 1. Introduction User Input refers to the data that is sent to computer application for processing using an input device like keyboard. Computer application receives the keyboard device input in the form of an ...

Read More »