+ 7

Error

whst is compilation erorr in java I don't see any mistakes in my code and I see it

25th Aug 2018, 6:32 PM
ABADA S
ABADA S - avatar
5 odpowiedzi
+ 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
25th Aug 2018, 11:00 PM
Dan Walker
Dan Walker - avatar
+ 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.
25th Aug 2018, 6:36 PM
Dan Walker
Dan Walker - avatar
+ 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
25th Aug 2018, 10:30 PM
ABADA S
ABADA S - avatar
+ 3
did you mean the bug in solo code playground? ..I didn't understand clearly ...what I can do
26th Aug 2018, 9:33 AM
ABADA S
ABADA S - avatar
+ 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).
26th Aug 2018, 10:09 AM
Dan Walker
Dan Walker - avatar