0

Exicuting code without Importing function???

i am studying my programs on this app. it does not show error when i import math function (Math.sqrt,Math.pow)without importing method java.lang.Math....? does compilation and execution by sololearn is correct or wrong?👍

23rd Sep 2017, 10:20 AM
Coding Beast
Coding Beast - avatar
2 Antworten
+ 1
public class mathpowdemo { public static void main(String[] args) { double a=2; double b=3; double c=Math.pow(a,b); System.out.println(+c); } } means this code directaly run by java without intrusion of error
23rd Sep 2017, 11:01 AM
Coding Beast
Coding Beast - avatar