Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Wrapper Class Method - getXXX()

 
Munish Gulati
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jose Botella
Ranch Hand
Posts: 2120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch Karan.
See System properties in the Java Tutorial
 
Bert Bates
author
Sheriff
Posts: 8900
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Munish Gulati
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the resourse Jose. And thats a good news Bert..are you sure of the thing that there are no getXXX() methods in the exam....does other guys on the forum agree ?
 
Anupam Sinha
Ranch Hand
Posts: 1090
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic