Monday, 3 February 2014

Parsing

Parsing : -
              -- Parsing is to read the value of one object to convert it to another type.
              -- For example you may have a string with a value of "10". Internally that string contains the Unicode characters '1' and '0' not the actual number 10.
              -- The method Integer.parseInt takes that string value and returns a real number.

Example :

        public class Parsing {
        public static void main(String[] args) {
        String somestring ="10";
        int i = Integer.parseInt(somestring);
        System.out.println(i);
}
}
               

No comments:

Post a Comment