Can anyone please tell me how to display the number in 7.50 ie. 2 digit after decimal format? I'm utterly confused after searching thru Java documentation.
public class Test
{
public static void main(String args[])
{
System.out.println("Hello World");
double x=50,z;
z=Math.sqrt(x);
System.out.println("The square root of 50 is " +z);
}
}
Thanx
