+ 7
Error
whst is compilation erorr in java I don't see any mistakes in my code and I see it
5 Antworten
+ 1
the final method declaration has a semi colon and no braces to open it.
that may be the only thing but it looks like some weird highlighting with the brackets too (sololearn side) might have a look in the morning
+ 4
Please share your code to get the best help - a compilation error means that the program is not valid, which could be a syntax error, a typo that means a variable has not been identified properly, etc etc.
+ 3
https://code.sololearn.com/c6IMwxDfNjJo/?ref=app
this is the code that show the error
I did not find any bugs there ...sometimes it shows compilation error and sometimes run truely
+ 3
did you mean the bug in solo code playground? ..I didn't understand clearly ...what I can do
+ 1
Sorry it was quite late when I wrote that
So on line 116, you have
static void pow(char[]op,char[]n,int i,int j);
This semi colon shouldn't be here, because there should be an open brace to open up the method. This is the first compilation error.
Secondly, Math.pow() returns a double, but it is being assigned to the value of a char array. You should be able to add a cast and it will work (two instances of this error).
Next, the variable 'arr' appears nowhere in the method scope (of this same method). Fix these and you should be fine
(I thought there may have been some missing parentheses but it turns out the playground was highlighting them incorrectly).