About 16,500,000 results
Open links in new tab
  1. Java sqrt() method with Examples - GeeksforGeeks

    Apr 9, 2018 · The java.lang.Math.sqrt() returns the square root of a value of type double passed to it as argument. If the argument is NaN or negative, then the result is NaN. If the argument is positive infinity, then the result is positive infinity.

  2. Java How To Find the Square Root of a Number - W3Schools

    Square Root of a Number. You can use Math.sqrt() to find the square root of a number:

  3. Java Program to Find Square Root of a Number Without sqrt Method

    Mar 17, 2025 · In Java, to find the square root of a number is very easy if we are using the pre-defined method. Java Math class provides sqrt () method to find the square root of a number. In this section, we will create a Java program to find the square root of …

  4. Java Program to Find square root of a Number without sqrt

    Feb 23, 2019 · Finding square root of a number is very easy, we can use the Math.sqrt() method to find out the square root of any number. However in this tutorial we will do something different, we will write a java program to find the square root of a number without the sqrt() method.

  5. How to calculate the square root in Java | Code Underscored

    Aug 20, 2022 · In this article, we’ll show you how to use the Java programming language to find the square root of any number. The precise syntax and coding for calculating square roots are covered along with examples since a Math.sqrt() is utilized for this purpose.

  6. How to Find the Square Root of a Number in Java - JavaBeat

    Mar 19, 2024 · Finding the square root of a number in Java is a common task that can be achieved by invoking built-in methods like “Math.pow()” and “Math.sqrt()”. Also, you can use the brute force or binary search algorithm to find the square root of a number.

  7. Java program to Find the Square Root of a Number using Binary Search

    Aug 16, 2022 · Given a non-negative number find the square root of a number using the binary search approach. Examples : Explanation: The square root of 16 is 4. 2 and 3 so floor of the square root is 2. Naive Approach: SpaceComplexity: O (1) TimeComplexity: O (n)

  8. Java Program to Find Square Root of a Number - Studytonight

    Mar 31, 2021 · In this program, we will learn how to find the square root of a number in java by using a pre-defined method. Algorithm: Start; Create an instance of the Scanner class. Declare a variable. Ask the user to initialize the variable. Use a pre-defined method to find the square root of the number. Use Math.pow() to calculate the square root of the ...

  9. Math.sqrt Method - Square Root in Java - CodeGym

    Math.sqrt is a Java method used to calculate the square root of a number. Take a look at its syntax, applications, and use case examples

  10. Java Program to find the Square Root of a Number

    Mar 15, 2021 · This post shows how to find a square root of a number in java. We will learn two methods to find the square root one by an in-built math method called Math.sqrt() and the other by using do-while loop.let's begin.

  11. Some results have been removed
Refresh