ILOG CPLEX 11.0 Getting Started > Tutorials > Concert Technology Tutorial for Java Users > The Anatomy of an ILOG Concert Technology Java Application > Query the Results

If the solve method succeeded in finding a solution, you will then want to access that solution. The objective value of that solution can be queried using a statement like this:

  double objval = cplex.getObjValue();

Similarly, solution values for all the variables in the array x can be queried by calling:

  double[] xval = cplex.getValues(x);

More solution information can be queried from IloCplex, including slacks and, depending on the algorithm that was applied for solving the model, duals, reduced cost information, and basis information.