View RSS Feed

Recent Blogs Posts

  1. Converting Strings to Numbers

    by , 04-26-2012 at 06:32 PM
    In a string object, usually a program would be ending up with numeric data, a value which user will enter. For example:
    Primitive numeric types (Short, Integer, Byte, Double, Long and Float) are being wrapped by the Number subclasses. A class method known as valueOf is provided by each which makes a string to be converted into object of that type. For example, ValueOfDemo will be getting 2 strings to convert them into no. and then performing the arithmetic operations at values.