Humty Humty - 2 months ago 12
Android Question

android.util.Pair<F, S> example in Android

I want to return a tuple of

data types. I am unable to create
. I have read the documentation but unable to make it.
I am doing as

private Pair myNums(double F, double S) {
Pair<F f, S s> p = Pair.create(F, S);
return p;

But it is saying

Unknown class F


F and S are the type. In your case is Double.

Pair<Double, Double> p = Pair.create(F, S);