BeginnersBook

  • Home
  • Java
    • Java OOPs
    • Java Collections
    • Java Examples
  • C
    • C Examples
  • C++
    • C++ Examples
  • DBMS
  • Computer Network
  • Python
    • Python Examples
  • More…
    • jQuery
    • Kotlin
    • WordPress
    • SEO
    • JSON
    • JSP
    • JSTL
    • Servlet
    • MongoDB
    • XML
    • Perl

How to round a number to two decimal places in Java

Last Updated: May 31, 2024 by Chaitanya Singh | Filed Under: java

In Java, you can round double and float numbers to two decimal places using several different approaches. Let’s see some java programs to see how… [Read More]

Tags: Java Math

Difference between rint() and round() method in Java

Last Updated: May 27, 2024 by Chaitanya Singh | Filed Under: java

In this guide, we will discuss the difference between rint() and round() method in Java. Both of these methods belong to the Math class of… [Read More]

Tags: Java Math

Java Math.ulp() Method

Last Updated: October 20, 2022 by Chaitanya Singh | Filed Under: java

Java Math.ulp() method returns distance between the number passed as argument and the next floating point number. An ulp (unit in the last place or… [Read More]

Tags: Java Math

Java Math.IEEEremainder() Method

Last Updated: October 19, 2022 by Chaitanya Singh | Filed Under: java

Java Math.IEEEremainder(double f1, double f2) method returns the remainder of f1/f2 based on the IEEE 754 standard. The remainder is equal to the f1 -… [Read More]

Tags: Java Math

Java Math.getExponent() Method

Last Updated: October 19, 2022 by Chaitanya Singh | Filed Under: java

Java Math.getExponent() method returns unbiased exponent used in the representation of the argument. This method can accept double and float arguments. public class JavaExample {… [Read More]

Tags: Java Math

Java Math.hypot() Method

Last Updated: October 19, 2022 by Chaitanya Singh | Filed Under: java

Java Math.hypot(double x, double y) method returns the sqrt(x2 + y2), where x is the first argument and y is the second argument. This method… [Read More]

Tags: Java Math

Java Math.rint() Method

Last Updated: May 27, 2024 by Chaitanya Singh | Filed Under: java

In this article, we will discuss the rint() method of Math class Java. We will see several programs with explanation to understand this method …. [Read More]

Tags: Java Math

Java Math.random() Method

Last Updated: October 19, 2022 by Chaitanya Singh | Filed Under: java

Java Math.random() method returns a random double number between 0.0 and 1.0, where 0.0 is inclusive and 1.0 is exclusive. Number is chosen from this… [Read More]

Tags: Java Math

Java Math.floorDiv() Method

Last Updated: October 19, 2022 by Chaitanya Singh | Filed Under: java

Java Math.floorDiv(int x, int y) method returns the integer quotient value after dividing argument x by argument y. This method divides the argument x by… [Read More]

Tags: Java Math

Java Math.floor() Method

Last Updated: October 19, 2022 by Chaitanya Singh | Filed Under: java

Java Math.floor(double x) method returns the largest integer that is less than or equal to the given argument x. public class JavaExample { public static… [Read More]

Tags: Java Math

Java Math.expm1() Method

Last Updated: October 19, 2022 by Chaitanya Singh | Filed Under: java

Java Math.expm1(double x) method returns ex – 1. Here, e is a Euler’s number, whose approximate value is 2.718281828459045. public class JavaExample { public static void main(String[]… [Read More]

Tags: Java Math

Java Math.toRadians() Method

Last Updated: October 19, 2022 by Chaitanya Singh | Filed Under: java

Java Math.toRadians() method converts the given angle in degrees to radians. This the approximate conversion and in most of the cases, it is inexact. public… [Read More]

Tags: Java Math

Java Math.toDegrees() Method

Last Updated: October 19, 2022 by Chaitanya Singh | Filed Under: java

Java Math.toDegrees() method converts the angle given in radians to degrees. This is the approximate conversion and result are not exactly what you would expect…. [Read More]

Tags: Java Math

Java Math.tanh() Method

Last Updated: October 18, 2022 by Chaitanya Singh | Filed Under: java

Java Math.tanh() method returns hyperbolic tangent of the given value. This method accepts double type value as an argument and returns the hyperbolic tangent of… [Read More]

Tags: Java Math

Java Math.cosh() Method

Last Updated: October 18, 2022 by Chaitanya Singh | Filed Under: java

Java Math.cosh() method returns hyperbolic cosine of the given value. This method accepts double type value as an argument and returns the hyperbolic cosine of… [Read More]

Tags: Java Math

  • 1
  • 2
  • 3
  • 4
  • Next Page »

Java Tutorial

Java Introduction

  • Java Index
  • Java Introduction
  • History of Java
  • Features of Java
  • C++ vs Java
  • JDK vs JRE vs JVM
  • JVM - Java Virtual Machine
  • First Java Program
  • Variables
  • Data Types
  • Operators

Java Flow Control

  • Java If-else
  • Java Switch-Case
  • Java For loop
  • Java while loop
  • Java do-while loop
  • Continue statement
  • break statement

Java Arrays

  • Java Arrays

OOPs Concepts

  • OOPs Concepts
  • Constructor
  • Java String
  • Static keyword
  • Inheritance
  • Types of inheritance
  • Aggregation
  • Association
  • Super Keyword
  • Method overloading
  • Method overriding
  • Overloading vs Overriding
  • Polymorphism
  • Types of polymorphism
  • Static and dynamic binding
  • Abstract class and methods
  • Interface
  • Abstract class vs interface
  • Encapsulation
  • Packages
  • Access modifiers
  • Garbage Collection
  • Inner classes
  • Static import
  • Static constructor

Java Exception Handling

  • Exception handling
  • Java try-catch
  • Java throw
  • Java throws
  • Checked and Unchecked Exceptions
  • Jav try catch finally
  • Exception Examples
  • Exception Propagation

Collections Framework

  • Collections in Java
  • Java ArrayList
  • Java LinkedList
  • Java Vector
  • Java HashSet
  • Java LinkedHashSet
  • Java TreeSet
  • Java HashMap
  • Java TreeMap
  • Java LinkedHashMap
  • Java Queue
  • Java PriorityQueue
  • Java Deque
  • Comparable interface
  • Comparator interface
  • Collections Interview Questions

MORE ...

  • Java Scanner Class
  • Java 8 Features
  • Java 9 Features
  • Java Conversion
  • Java Date
  • Java Multithreading
  • Java I/O
  • Java Serialization
  • Java Regex
  • Java AWT
  • Java Swing
  • Java Enum
  • Java Annotations
  • Java main method
  • Java Interview Q

Copyright © 2012 – 2025 BeginnersBook . Privacy Policy . Sitemap