Update java samples

This commit is contained in:
Corentin Le Molgat
2020-12-17 20:02:42 +01:00
committed by Mizux Seiha
parent 105e1c3f26
commit e8f6e86afd
4 changed files with 19 additions and 11 deletions

View File

@@ -23,8 +23,8 @@ import com.google.ortools.linearsolver.MPVariable;
// [END import]
/** Minimal Mixed Integer Programming example to showcase calling the solver. */
public class SimpleMipProgram {
public static void main(String[] args) throws Exception {
public final class SimpleMipProgram {
public static void main(String[] args) {
Loader.loadNativeLibraries();
// [START solver]
// Create the linear solver with the SCIP backend.
@@ -88,5 +88,7 @@ public class SimpleMipProgram {
System.out.println("Problem solved in " + solver.nodes() + " branch-and-bound nodes");
// [END advanced]
}
private SimpleMipProgram() {}
}
// [END program]