Wrapper Class Method - getXXX()

Question:- What does System property refers to in the following methods of Boolean, Integer and Long Classes ? Boolean Classs: -------------- static boolean getBoolean(String name) Returns true if and only if the system property named by the argument exists and is equal to the string "true". Integer Class:- --------------- static Integer getInteger(String nm) Determines the integer value of the system property with the specified name. static Integer getInteger(String nm, int val) Determines the integer value of the system property with the specified name. static Integer getInteger(String nm, Integer val) Returns the integer value of the system property with the specified name. Long Class:- ------------ static Long getLong(String nm) Determines the long value of the system property with the specified name. static Long getLong(String nm, long val) Determines the long value of the system property with the specified name. static Long getLong(String nm, Long val) Returns the long value of the system property with the specified name.

Munish Gulati<br />SCJP 1.4<br />Albert Einstein: There are only two ways to live your life. One is as though nothing is a miracle. The other is as though everything is a miracle.

Karan - Since this IS the SCJP certification forum I may have some GREAT news for you! The SCJP 1.4 exam does NOT cover any of the getXxx() methods!!! There is an error in the published Sun objectives, getXxx() is not on the exam, however valueOf() methods ARE on the exam and they don'tl ist them. (In fact you will probably see quite a few questions with valueOf() ). You might look at a thread from a few days ago, with a title something like "Top Ten things that aren't on the exam" Having said all that, the getXxx() methods can be useful, it's just that they are NOT on the exam!! Hooray! -Bert

Hi Karan I didn't had any question on getXxx(). Bert and Kathy are the authors of probably the most famous book on the ranch. Kathy is also one of the authors of the orignal SCJP exam conducted by Sun.