Q:

What cast should I use at r.nextInt()?

I have tried to build a program where you give a maximum and a minimum to generate a random number between them. Eclipse says that I have to add a cast to r.nextInt(). I did but I don´t know what to use instead of Object here: 
int result = ((Object) r).nextInt(max - min + 1) + min; 

(cast is already added by Eclipse). Thanks for your help. 
This is the important code.
public void ButtonKlick (View view) {
    int max;
    EditText maxText = (EditText)findViewById(R.id.maximum);
    if (maxText.getText().toString().length() == 0) {
        return;
    }
    max = Integer.parseInt(maxText.getText().toString());

    int min;
    EditText minText = (EditText)findViewById(R.id.minimum);
    if (minText.getText().toString().length() == 0) {
        return;
    }
    min = Integer.parseInt(minText.getText().toString());

    Random r = new Random();
    int result = ((Object) r).nextInt(max - min + 1) + min;

    EditText resultText = (EditText)findViewById(R.id.et_result);
    resultText.setText(String.valueOf(result));
}

A:

You must have defined your own class called Random. Don't do that. Rename it. Then r.nextInt() will work without a cast.

