java.lang.Integer.getInteger(String nm, int val)


java.lang.Integer.getInteger(String nm, int val)

package com.codingdict;



import java.lang.*;



public class IntegerDemo {



   public static void main(String[] args) {



      /* returns the integer value of the system property and won't 

         print default specified value as specified system property exits */

      String str = "sun.arch.data.model";

      System.out.println(Integer.getInteger(str, 5));



      /* returns default specified value as system property "abcd" 

         does not exist */ 

      System.out.println(Integer.getInteger("abcd",5));

   }

}