You switched the operands in your assign statement.
Switch this
Math.abs(a[i]-a[i-1]) = biggestGap;
to this
biggestGap = Math.abs(a[i]-a[i-1]);
Math.abs(a[i]-a[i-1])
returns just an int value (no variable reference or similar). So your trying to assign a new value to a value. Which is not possible. You can just assign a new value to a variable.
Related Posts:
- && (AND) and || (OR) in IF statements
- Else without if
- Error: ‘else’ without ‘if’
- Short form for Java if statement
- JAVA Variable declaration not allowed here
- How to resolve “Syntax error on token “else”” in Java?
- break statement in “if else” – java
- Syntax error on token “;”, { expected after this token in Random string creator
- How to resolve “Syntax error on token “else”” in Java?
- Is there a way to end the program if statement is false?
- Java – ‘ ) ‘ expected error
- What is a NullPointerException, and how do I fix it?
- What is the equivalent of the C++ Pair
in Java? - Getting random numbers in Java [duplicate]
- Java: “error: cannot find symbol”
- How to initialize an array in Java?
- How to split a string in Java
- What is reflection and why is it useful?
- Difference between Arrays.asList(array) and new ArrayList
(Arrays.asList(array)) - Static Classes In Java
- com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
- JavaFX – Exception in Application start method? [duplicate]
- How is “mvn clean install” different from “mvn install”?
- JRE Missing when installing eclipse
- What does “?” mean in Java? [duplicate]
- Please initialize the log4j system properly. While running web service
- ‘mvn’ is not recognized as an internal or external command, operable program or batch file
- Server Tomcat v9.0 Server at localhost failed to start
- How can I convert a .jar to an .exe?
- Error: NoClassDefFoundError: org/apache/commons/logging/LogFactory
- Illegal Escape Character “\”
- Unrecognized SSL message, plaintext connection? Exception
- What is difference between CrudRepository and JpaRepository interfaces in Spring Data JPA?
- How to create an empty array?
- How to decompile a whole Jar file?
- How to fix org.hibernate.LazyInitializationException – could not initialize proxy – no Session
- Find how many connected groups of nodes in a given adjacency matrix
- Java dynamic array sizes?
- Java – Best way to print 2D array?
- “cannot find symbol: method” but the method is declared
- No enclosing instance of type is accessible.
- How to remove single character from a String
- What is the best math library to use with java?
- What is the difference between a null array and an empty array?
- Why is there no String.Empty in Java?
- Good Java graph algorithm library?
- Integrate Ant builder into Eclipse: Error “Variable references empty selection”
- Spring Maven clean error – The requested profile “pom.xml” could not be activated because it does not exist
- Java Class File Editor
- Error Importing SSL certificate : Not an X.509 Certificate
- How do I draw a triangle?
- warning: [options] bootstrap class path not set in conjunction with -source 1.5
- “Actual or formal argument lists differs in length”
- Class ‘Room’ is abstract; cannot be instantiated
- Creating a maze solving algorithm in Java
- IDEA: javac: source release 1.7 requires target release 1.7
- Can we write our own iterator in Java?
- local variables referenced from a lambda expression must be final or effectively final
- java.lang.IllegalMonitorStateException: object not locked by thread before wait()?
- WebServlet cannot be resolved to a type
- How do I print out the value of this boolean? (Java)
- How to add an object to an ArrayList in Java
- Getting warning “NDK is missing a ‘platforms” directory.’ with no NDK
- No appenders could be found for logger(log4j)?
- Picked up _JAVA_OPTIONS: -Xmx256M
- When to use static methods
- How to serialize an object into a string
- Getting the array length of a 2D array in Java
- Java String to SHA1
- How do I call one constructor from another in Java?
- Does Java have something like C#’s ref and out keywords?
- How to upload a file and JSON data in Postman?
- What is the difference between i++ & ++i in a for loop?
- when to throw FileNotFoundException
- How to use ArrayUtils for array of objects, it doesn’t delete the content of an array
- The ResourceConfig instance does not contain any root resource classes
- Which exception to throw for invalid input which is valid from client perspective
- Error: Could not find or load main class net.minecraft.launchwrapper.Launch when launching Minecraft 1.12.2 with Forge
- IllegalArgumentException: Bound must be positive
- Eclipse is executing the wrong Java file
- Understanding BufferedImage.getRGB output values
- What is the purpose of creating static object in Java?
- How to print a method in java
- build-impl.xml:1031: The module has not been deployed
- Spring-Security-Oauth2: Full authentication is required to access this resource
- Why is System.out.print() not working?
- setMnemonic() and call a method by pressing the key
- What is `AnyType` in java generics
- “insufficient memory for the Java Runtime Environment ” message in eclipse
- How to ping an IP address
- Java Not Greater than Or Equal to Operator for Char Type
- The request was rejected because no multipart boundary was found in springboot
- The import javax.servlet can’t be resolved
- Java- The meaning of
>? - Where can I download the jar for org.apache.http package?
- What is the size of a boolean variable in Java?
- Use CSS in Java Applications
- java.lang.ArrayIndexOutOfBoundsException: 2 [duplicate]
- Fastest way to put contents of Set
to a single String with words separated by a whitespace? - How do you count the elements of an array in java