-
-
Save anonymous/768f211a47da9cb3b72c93d4a79e2ec9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class NewRoot2 | |
{ | |
public static void main(String[] args) | |
{ | |
/* The main() method puts all arguments in an array of strings, here named | |
arguments. The first argument is stored in array element arguments[0]. | |
Calling the method Integer.parseInt() with that element creates an | |
integer value from a string. */ | |
int number = Integer.parseInt(arguments[0]); | |
System.out.println("The square root of "+number+" is "+ Math.sqrt(number)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment