sqrt in java
// Java program to demonstrate working
// of java.lang.Math.sqrt() method
import java.lang.Math;
class Gfg {
// driver code
public static void main(String args[])
{
double a = 30;
System.out.println(Math.sqrt(a));
a = 45;
System.out.println(Math.sqrt(a));
a = 60;
System.out.println(Math.sqrt(a));
a = 90;
System.out.println(Math.sqrt(a));
}
}
import java.math.*;
double x=144;
double y=math.sqrt(x); //You can only pass double numbers not float
Also in Java:
- change java version command line debian
- working with buttons in applet java
- check leap year in java
- string a int java
- java list get first element
- bracket balancing program in java
- phoneword converter
- socket programming in java
- Common GIt Commands
- java store hexadecimal value
- java int stream min
- get raondom from array java
- java define main function
- java method overriding
- query java persistence
- check if a list contains a string java
- even or odd in java
- java substring
- java split into arraylist
- protect java
- countdown timer with seekbar
- java make arraylist
- nextchar in java
- java find item in list by property