0

How do I avoid this compilation error:

The constructor BasicNameValuePair(String, Float) is undefined

for code like this:

nameValuePairs.add(new BasicNameValuePair("Zam_sum",
                    Float.valueOf(zam.getSum())));
0

1 Answer 1

1

By definition the default Constructor takes a String name and a String value.

BasicNameValuePair(String name, String value)

Try this:

String zamSum = zam.getSum().toString();
nameValuePairs.add(new BasicNameValuePair("Zam_sum", zamSum);
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.