Category Archive for: Exploring java.lang

Run time Permission

Run time Permission Intermission was added to java.lang by Java 2. It relates to Java’s security mechanism and is not} furtherance here. Throw able Throwaway class supports Java’s exception-handling system. and is the class from which all exception classes are derived. It is discussed in Chapter 10. Security Manager Security Manager is an abstract class that your…

Read More →

Thread Group

Thread Group Thread Group creates a group of threads. It define,s these two constructors: Threw Group(String group Nate) Thread group Thread Croup parental, String group ) For both forms, group Canal specifies the name of the thread group. The first version creates a new group that has the current thread as its parent. In the second form, the parent is specified.…

Read More →

Miscellaneous Math Methods

Miscellaneous Math Methods In addition to the methods just shown, Math defines the following methods: static double IEEE remninder(double Escondido, double divisor) static double random] ) static double to Radians (double nllg/e) static double to Degrees(double angle) Remainder( ) returns the remainder of dividend / divisor. random( ) returns a pseudo random number, This value will be he tween 0 and…

Read More →

Transcendental Functions

Transcendental Functions The following three methods accept a double parameter for an angle in radians and return the result of their respective transcendental function: Method                                                              …

Read More →

Class

Class Class encapsulates the run-time state of an object or interface. Objects of type Class me created automatically, when classes are loaded. You cannot explicitly declare a Class object. Generally, you obtain a Class object by calling the get Class( ) method defined by Object. Some of the most commonly used methods defined by Class are shown…

Read More →

Environment Properties

Environment Properties The following properties are available in all Java 2 environments: You can obtain the values of various environment variables by calling the System get Property method. For example, the following program displays the path to the current user directory: Object As we mentioned Part I, Object is a super class of all other classes. Object define;…

Read More →

Systems

Systems  The System class holds a collection of static methods and variables. The standard input, output, and error output of the Java run time are stored in the in, out, and err variables. The methods defined by System are shown .Notice that many of the methods throw’a Unexceptionably if the operation is’not permitted by the security manager. One other…

Read More →

Memory Management

Memory Management Although Java provides automatic garbage collection, sometimes you will want to know how large the object heap is and how much of it is left. You can use this information, for example, to check your code for efficiency or to approximate how many more objects of a certain type, can be instantiated. To obtain these values,…

Read More →

Boolean

Boolean Boolean is a very thin wrapper. around Boolean values, which is useful mostly when You want to pass a Boolean variable by reference. It contains the constants TRUE and ‘ FALSE, which define true and false Boolean objects. Boolean also defines the TYPE field, which is the Class object for Boolean. Boolean defines these constructors: Boolean(Boolean bootblack)…

Read More →

Character

Character  Character is a simple wrapper around a char. The constructor for Character is Character(char ell) Here, ch specifies the character that will be wrapped by the Character object being created. . To obtain the char value contained in a Character object, call char Value( ), -shown here: char char Value( ) It returns the character The Character class defines…

Read More →

Back to Top