#Really new to Java programming and I'm trying to make a sorting algorithm.
1 messages · Page 1 of 1 (latest)
what are the errors ?
these
/home/natedouglasmusic/Documents/ArrayV-main/src/main/java/io/github/arrayv/sorts/select/MagnetSort.java:40: error: illegal start of expression
private int minn = array.max();
^
/home/natedouglasmusic/Documents/ArrayV-main/src/main/java/io/github/arrayv/sorts/select/MagnetSort.java:42: error: illegal start of type
for (int k = i; k < length - 1; k++) {
^
/home/natedouglasmusic/Documents/ArrayV-main/src/main/java/io/github/arrayv/sorts/select/MagnetSort.java:42: error: > expected
for (int k = i; k < length - 1; k++) {
^
/home/natedouglasmusic/Documents/ArrayV-main/src/main/java/io/github/arrayv/sorts/select/MagnetSort.java:42: error: <identifier> expected
for (int k = i; k < length - 1; k++) {
^
/home/natedouglasmusic/Documents/ArrayV-main/src/main/java/io/github/arrayv/sorts/select/MagnetSort.java:51: error: illegal start of type
for (int l = i; l < (pos + i)/2; l++) {
^
/home/natedouglasmusic/Documents/ArrayV-main/src/main/java/io/github/arrayv/sorts/select/MagnetSort.java:51: error: illegal start of type
for (int l = i; l < (pos + i)/2; l++) {
^
/home/natedouglasmusic/Documents/ArrayV-main/src/main/java/io/github/arrayv/sorts/select/MagnetSort.java:51: error: <identifier> expected
for (int l = i; l < (pos + i)/2; l++) {
^
/home/natedouglasmusic/Documents/ArrayV-main/src/main/java/io/github/arrayv/sorts/select/MagnetSort.java:51: error: <identifier> expected
for (int l = i; l < (pos + i)/2; l++) {
^
/home/natedouglasmusic/Documents/ArrayV-main/src/main/java/io/github/arrayv/sorts/select/MagnetSort.java:56: error: <identifier> expected
Delays.sleep(0.025);
^
/home/natedouglasmusic/Documents/ArrayV-main/src/main/java/io/github/arrayv/sorts/select/MagnetSort.java:56: error: illegal start of type
Delays.sleep(0.025);
^
/home/natedouglasmusic/Documents/ArrayV-main/src/main/java/io/github/arrayv/sorts/select/MagnetSort.java:58: error: class, interface, enum, or record expected
}
^
11 errors
your ide says nothing?
There should be a 3kb text file attached
@tardy cliff?
ah you can't put private for a local variable
wdym
You are missing a semicolon, end bracket, or something like that. Are you not using an IDE?
no i'm using a text editor lol
and them importing the file into a software and these are the errors that it gives
You mean compiling it using javac?
That's the full message eh?
no lol it gives me a bunch of cryptic errors and creates these error log text files
Usually the reason is at the very start of the error message.
uh hold on
But like I said, long errors like that usually mean some little thing like missing brace,bracket,semicolon
Wrong number of parameters.
i don't think stuff like that is it becuase if it was i'm sure it'd tell me
Surely you could just post the code here. Someone would see the error. But curious what this nebulous "import code" thing is.
So you didn't write this? Just running it? Does it work for anything else?
please use an ide like intellij
i don't want to bc i don't know how well that would work
esp. considering that arrayv is designed to handle specifically cases like this
mostly concerned about the imports
-# also i've been asking about the for loops and i've gotten no explanation on the for loops other than guesses that are unrelated
You seem to be using a array visualizer program which accepts and compiles your code and runs it. You've tried no other program yet to see if it's your program or the array visualizer. Also, maybe there is other logs as you've alluded to, but they are as un-investigated or whatever.
I'm desinging this for arrayv
Is this the state of things?
the other logs are just old logs
Have you contacted the person, people or github issues page of this software?
I don't think they're the problem
They know what they're doing
I don't
I think I'm the thing wrong with this situation
Could be, there's probably instructions somewhere.
Maybe delete that .cache/compile folder
Maybe try to get some other sort program to run.
Not the problem
That's just for error logs
I have no way to put this lightly but neither of you have helped so far
Yea, sorry, we didn't write the thing. You can down load intellij for free. Put your code in there. check it out.
sorry, what is this array.max() shit?
arrays don't have methods
You don't put public on local variables either.
int minn = Integer.MAX_VALUE;
-# the people in vc were more helpful
Got it working