ICSE Class 10 Computer Applications Question 5 of 16

Using Library Classes — Question 5

Back to all questions
5
Question

Question 5

Name some methods that are commonly available in all wrapper classes and in all numeric wrapper classes.

Answer

Methods available in all wrapper classes are:

  1. toString()
  2. valueOf()

Methods commonly available in all numeric wrapper classes are:

  1. xxxValue() methods — byteValue(), shortValue(), intValue(), longValue(), floatValue(), doubleValue().
  2. parseXXX methods — parseByte(), parseShort(), parseInt(), parseFloat(), parseLong(), parseDouble().