Fractional Knapsack in Java
I am not going to review the actual algorithm. However, there are some improvements possible:

1

static int[] value;
static int[] weight;
static float[] ratio;
static int knapSackWeight;


You expose the state of your algorithm to entire package. Also, your implementation is not thread-safe: if two threads call the getMaximumBenefit more or less simultaneously, they might interfere.
One way to circumvent this issue is to make sure that getMaximumBenefit  constructs an object holding the state of computation and manipulate only that object throughout the computation.

2 

getMaximumBenefit should be declared public. Otherwise no-one 
will be able to call it outside of your (default) package.

3

Since getMaxRatioItem is a helper routine, it would be nice to declare it private.

4

int ratioIndex = -1;


What is the purpose of the value -1? It would be nice to declare a constant:

private static final int NO_ITEMS_LEFT = -1;


and then write

int ratioIndex = NO_ITEMS_LEFT;
...
if (item == NO_ITEMS_LEFT) {
    return benefit;
}


A nice point here is that if you need for some reason to change the value of that constant, you will have to edit its definition only in one place. The rule here is not to hardcode magic values, but make named constants out of them.

5

System.out.println(ratio[i]);


Printing within an algorithm is a bad taste (unless debugging). Think about how much output you get in production whenever computing a large problem instance.

6 

getMaximumBenefit should return some simple data structure representing the result, not just print it on standard output.

Summa summarum

All in all, I had this in mind:

import java.util.Objects;
import java.util.Scanner;

public class FractionalKnapsackSolver {

    private static final int MINIMUM_CAPACITY = 1;
    private static final int NO_ITEMS_LEFT = -1;

    private final int[] values;
    private final int[] weights;
    private final float[] ratios;
    private final int knapsackCapacity;

    private FractionalKnapsackSolver(final int[] values,
                                     final int[] weights,
                                     final float[] ratios,
                                     final int knapsackCapacity) {
        this.knapsackCapacity = checkCapacity(knapsackCapacity);
        this.values = Objects.requireNonNull(values, 
                                             "The value array is null.");
        this.weights = Objects.requireNonNull(weights,
                                              "The weight array is null.");
        this.ratios = Objects.requireNonNull(ratios, 
                                             "The ratio array is null.");
        checkWeightArrayLength();
        checkRatioArrayLength();
    }

    private int checkCapacity(final int capacity) {
        if (capacity &lt; MINIMUM_CAPACITY) {
            throw new IllegalArgumentException(
                    "Nonpositive capacity given: " + capacity + "." +
                    "Must be at least " + MINIMUM_CAPACITY + ".");
        }

        return capacity;
    }

    private void checkWeightArrayLength() {
        if (weights.length != values.length) {
            throw new IllegalArgumentException(
                    "The length of the weight array (" + weights.length + 
                    ") does not match the length of the value array (" +
                    values.length + ").");
        }
    }

    private void checkRatioArrayLength() {
        if (ratios.length != values.length) {
            throw new IllegalArgumentException(
                    "The length of the ratio array (" + ratios.length + 
                    ") does not match the length of the value array (" +
                    values.length + ").");
        }
    }

    public static float computeBenefit(final int[] values,
                                       final int[] weights,
                                       final float[] ratios,
                                       final int knapsackCapacity) {
        final FractionalKnapsackSolver solver = 
                new FractionalKnapsackSolver(values, 
                                             weights, 
                                             ratios, 
                                             knapsackCapacity);

        return solver.compute();
    }

    private int getMaximumRatioItem() {
        float maximumRatio = 0.0f;
        int maximumRatioIndex = NO_ITEMS_LEFT;

        for (int i = 0; i &lt; ratios.length; ++i) {
            if (maximumRatio &lt; ratios[i]) {
                maximumRatio = ratios[i];
                maximumRatioIndex = i;
            }
        }

        return maximumRatioIndex;
    }

    private float compute() {
        int currentWeight = 0;
        float benefit = 0.0f;

        while (currentWeight &lt; knapsackCapacity) {
            final int item = getMaximumRatioItem();

            if (item == NO_ITEMS_LEFT) {
                return benefit;
            }

            for (int i = 0; i &lt; weights[item]; ++i) {
                if (currentWeight + ratios[item] &lt;= knapsackCapacity) {
                    currentWeight++;
                    benefit += ratios[item];
                }
            }

            ratios[item] = 0;
        }

        return benefit;
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);

        final int n = in.nextInt();
        final int[] values = new int[n];
        final int[] weights = new int[n];
        final float[] ratios = new float[n];

        for (int i = 0; i &lt; n; ++i) {
            weights[i] = in.nextInt();
            values[i] = in.nextInt();
            ratios[i] = (float)(values[i]) / weights[i];
        }

        final int knapsackCapacity = in.nextInt();

        System.out.println(computeBenefit(values, 
                                          weights, 
                                          ratios,
                                          knapsackCapacity));
    }
}


Hope that helps.