java

java

Java program to find the third largest number in an unsorted array

Java program to find the third largest number in an unsorted array. Our program will pass one unsorted array to a function, it will find the third largest number and return it.

Read
java

What is a copy constructor in Java - Explanation with example

Learn about copy constructor in Java. Copy constructor works in a similar way to other constructors. The only difference is that it takes one object of the same class and then assign values to the variables of the class.

Read
java

Java program to calculate electricity bill

In this tutorial, we will learn how to find the electricity bill using Java. I will show you different ways to solve this problem. Actually, the algorithm to solve that problem is the same but different ways to write the code.

Read
java

Java Math decrementExact explanation with example

Java decrementExact is a utility method defined in java.lang.Math class. We can pass one argument and it returns the argument decremented by one. This method is available for integer and long argument types.

Read
java

Java Math incrementExact explanation with example

incrementExact is used to increment the value of an integer or double. This method is defined for both integer and doubles. Following are the definitions of this method :.

Read
java

How to use addExact and subtractExact in Java 8

In this tutorial, we will learn two new methods added in Java 8 - addExact and subtractExact. These methods are used for addition and subtraction. I will show you how to use these methods with examples.

Read
java

Java program to subtract one matrix from another

In this Java programming tutorial, we will learn how to subtract one matrix from another matrix. The program will ask the user to enter values for both of the matrices and it will calculate the subtraction result. Finally, the program will print out the result matrix.

Read
java

Write a love calculator program in Java

In this tutorial, we will learn how to create one love calculator program. This program will take two names as inputs, calculates the percentage and prints it out. How the program is calculating the percentage, I am explaining below.

Read
java

Introduction to Java JShell or Java Shell tool

Java JShell was introduced in Java 9. It is an interactive tool for learning Java. It is a Read-Evaluate-Print Loop (REPL) that can be used to evaluate different Java expressions on the terminal.

Read
java

Java example program to left shift an array

In this tutorial, we will learn how to left shift an array in Java . Left shifting by one means the array elements will be moved by one position to left and the leftmost element will be moved to end.

Read