Java The Complete Reference, Seventh Edition
388 Part II: The Java Library Method Description boolean isNaN( ) Returnstrueif the invoking object contains a value that is not ...
Chapter 16: Exploring java.lang 389 The following example creates twoDoubleobjects—one by using adoublevalue and the other by pa ...
390 Part II: The Java Library Understanding isInfinite( ) and isNaN( ) FloatandDoubleprovide the methodsisInfinite( )andisNaN( ) ...
Chapter 16: Exploring java.lang 391 The following constants are defined: MIN_VALUE Minimum value MAX_VALUE Maximum value SIZE Th ...
392 Part II: The Java Library Method Description byte byteValue( ) Returns the value of the invoking object as abyte. int compar ...
Chapter 16: Exploring java.lang 393 Method Description static int bitCount(intnum) Returns the number of set bits innum. byte by ...
394 Part II: The Java Library Method Description static int numberOfTrailingZeros(intnum) Returns the number of low-order zero b ...
Chapter 16: Exploring java.lang 395 Method Description static int bitCount(longnum) Returns the number of set bits innum. byte b ...
396 Part II: The Java Library Converting Numbers to and from Strings One of the most common programming chores is converting the ...
Chapter 16: Exploring java.lang 397 int, orlongequivalent of the numeric string with which they are called. (Similar methods als ...
System.out.println(num + " in binary: " + Integer.toBinaryString(num)); System.out.println(num + " in octal: " + Integer.toOctal ...
System.out.println(a[i] + " is a letter."); if(Character.isWhitespace(a[i])) System.out.println(a[i] + " is whitespace."); if(Ch ...
Characterdefines two methods,forDigit( )anddigit( ), that enable you to convert between integer values and the digits they repre ...
Recent Additions to Character for Unicode Code Point Support Recently, major additions have been made toCharacter. Beginning wit ...
Boolean Booleanis a very thin wrapper aroundbooleanvalues, which is useful mostly when you want to pass abooleanvariable by refe ...
Void TheVoidclass has one field,TYPE, which holds a reference to theClassobject for typevoid. You do not create instances of thi ...
Runtime TheRuntimeclass encapsulates the run-time environment. You cannot instantiate aRuntime object. However, you can get a re ...
Let’s look at two of the most common uses of theRuntimeclass: memory management and executing additional processes. Memory Manag ...
406 Part II: The Java Library mem1 = r.freeMemory(); System.out.println("Initial free memory: " + mem1); r.gc(); mem1 = r.freeMe ...
try { p = r.exec("notepad"); } catch (Exception e) { System.out.println("Error executing notepad."); } } } There are several alt ...
«
17
18
19
20
21
22
23
24
25
26
»
Free download pdf