Check out example codes for "square root of a number in java without sqrt". It will help you in understanding the concepts better.

Code Example 1

Scanner in=new Scanner(System.in);
int num=in.nextInt();
Systen.out.println(Math.pow(num,0.5));

Learn ReactJs, React Native from akashmittal.com