Promotion
CodeGym University
Learning
Courses
Tasks
Surveys & Quizzes
Games
Help
Schedule
Community
Users
Forum
Chat
Articles
Success stories
Activity
Reviews
Subscriptions
Light theme
Group
Reviews
About us
Start
Start learning
Start learning now
Articles
Authors
All groups
All Articles List
CodeGym
/
Java Blog
/
Java Math
Java Math
130 members
Leaderboard
Popular
New
Old
Artem Divertitto
Java Math
January 3, 2025 at 8:40 AM
Java Math abs() method
What is the absolute value function in Mathematics? In mathematics, the absolute value of a number is equal to the positive value of the number passed.The absolute value function ignores the sign and returns the value without it...
Vasyl Malik
Java Math
July 17, 2023 at 8:33 AM
Math.PI in Java
What is “pi” (π) in mathematics? “The ratio of a circle’s circumference to its diameter i-e; 22/7 is represented by a constant value of 3.14159 is called “pi” in mathematics.” What is Math.PI in Java? “Math.PI is a static final double constant in Java, equivalent to in Mathematics.”...
Pavlo Plynko
Java Math
February 14, 2025 at 7:33 AM
Math.sqrt Method - Square Root in Java
Although calculating a square root in Java isn’t such a common question for software development interviews, sometimes, an interview might ask you something like: “You have an integer x. Create a Java program that would calculate its square root”...
Jesse Haniel
Java Math
April 2, 2025 at 7:32 AM
Math round() method in Java
All programming languages and computers in general can't work with infinite numbers. Rounding and trimming of numbers follows us literally everywhere, because the nature of modern computers is like that. Java language has a special class...
Artem Divertitto
Java Math
September 11, 2023 at 11:54 AM
Math pow() Method in Java
The Java language is equipped with a comprehensive library for mathematical functions and operations. It is called the "Math" class, and it resides in the java.lang package. The Math library includes methods for fundamental numerical operations, trigonometry, finding min-max...
Oleksandr Miadelets
Java Math
October 20, 2023 at 12:09 PM
Java Math max() Method
Java Math class contains the methods required to do mathematical calculations. One of the very common calculations we need is finding the maximum of two numbers. For this task, java has introduced a java.lang.Math.max() method. There are a few key things to know about...
Vasyl Malik
Java Math
June 14, 2021 at 3:26 PM
Java Math.ceil() method
It’s good to familiarize yourself with the ceil function in mathematics before we move to the ceil method in Java. What is the ceil function in mathematics? “A ceil function converts a decimal number to the immediate largest integer.” If the number passed is already a whole number or an integer, then the same number...
Alex Vypirailenko
Java Math
September 27, 2021 at 11:17 AM
Math.exp() method in Java
The Math class contains methods to work with mathematical functions. In this article, we are going to talk about the Math.exp() method in Java. It returns the number e raised to the power of a double value. What is an exponential function: a very short math introduction...
Volodymyr Portianko
Java Math
May 25, 2021 at 9:16 AM
Java Math.min() method
How to find min() of two numbers in Java? Java provides a system library known as “java.lang.Math” for extensive handy operations. From trigonometry to logarithmic functions, you can find min/max or even absolute of a number using the methods provided by this library due to its diverse functionalities...
Pavlo Plynko
Java Math
August 13, 2023 at 8:43 AM
Java Math random() Method
What is Math.random() Method in Java? The java.lang.Math.random() method returns a pseudorandom, “double” type number ranging from 0.0 to 1.0. Hence, the random number generated with the built-in method by Java always lies between 0 and 1...
Volodymyr Portianko
Java Math
September 30, 2021 at 7:26 AM
Math.cos() method in Java
Math class in Java contains a lot of mathematical functions. Trigonometric functions are among the most important functions for programming. One of these functions is Math.cos()...
Oleksandr Miadelets
Java Math
February 18, 2025 at 11:17 AM
Generating random numbers in Java
Random numbers are frequently used in programming for various applications, such as simulations, games, and cryptography. It could be, for example, password generators on websites or world generators in games...
Please enable JavaScript to continue using this application.