Computer Applications

The value returned by Integer.parseInt("-321") is …………… .

  1. -321
  2. 321
  3. 321.0
  4. "321"

Java Library Classes

3 Likes

Answer

-321

Reason — parseInt() converts the given String argument into an integer value if the given string is a combination of numbers and decimal. The String can have a '-' sign in the beginning.

Answered By

1 Like


Related Questions