View RSS Feed


Convert string

  1. Convert String to Number

    by , 04-26-2012 at 07:57 PM
    This section shows how Number is converted into String. Functionaliy is provided by this program for conversion of String into Number,
    Code Description:
    In this program, String os Boolean, int, byte, double is being taken as it is given below. Also, MIN_VALUE and MIN_VALUE methods are used which are different wrapper classes so that all values on double, short and int could be printed.
    Here is the code used:
    Java Code:
    public class StrToNum{
      public static void main
  2. Convert Number to String

    by , 04-26-2012 at 07:56 PM
    This sections shows how numbers can be converted into String. Given program gives the functionality for conversion of numbers to String.

    Code Description:
    Different kind of numbers have been declared, for example, long, int and float etc given below. valueOf() method is used which is basically Stringclass’s method. For numeric conversions String.valueOf() is used & numeric classes are converted into String by using toString() method, as given below:
    Program’s code ...