+ 1

I can't make it work here (copyed from PC)

I've got IMO interresting project of prime generator but even after adding imports and full methods path i get : 1stlly no output later compilation error. My project is named here as "compilation error - can anyone help?" So... Please help :)

26th Feb 2017, 11:13 PM
MichaƂ Bujakowski
MichaƂ Bujakowski - avatar
3 Answers
+ 1
There are quite a few errors. Here's a list of the ones I found. - Inside your generatePrimeNumbers method, there's a line that says "(double) iloƛćWyników/T[iloƛćWyników-1]". The "T" part of this is not defined as anything, so I suggest deleting that and replacing the brackets [] with parentheses (). - Try removing the imports for "java.util.Arrays" and "java.util.Arrays.*" Your program's not even using them. - Remove the java.lang.Math imports. Those are usable by default, and you don't have to import them. - Also, at some points, there are statements in your code that look like "java.util.Math.ceil(java.util.Math.sqrt(d*2)+1)". That can be shortened to "Math.ceil(Math.sqrt(d*2)+1)".
26th Feb 2017, 11:56 PM
DaemonThread
DaemonThread - avatar
+ 1
https://code.sololearn.com/c0qKmPJ0vWHj/#java Thank You both for Your help - i moved the soruce from netBeans through email, telephone to mobile app and then edited all to adopt it... Then i found sololearn site hehehe.... After couple of changes and removing GUI support i put here working one. There was one unusual error - my int iloƛćWyników wasn't acceptable by this compiler. After changing it works pretty well. I hope, i don't break naming coventions even though it's just a PlayGround. I'm inviting You and asking for feedback of Your. Regards, Michael
27th Feb 2017, 1:51 AM
MichaƂ Bujakowski
MichaƂ Bujakowski - avatar
0
Please show your code and the error.
26th Feb 2017, 11:45 PM
Twelfty
Twelfty - avatar