Search 12511 Results
In the previous posts, we have just seen the use of type wrappers in wrapping the primitive data types. Beginning in J2SE 5.0, we will not have to exp
The Character class that wraps a char data type provides several utility methods to operate on character data. We can test whether the given character
The type wrapper classes were provided in Java libraries since its first release. J2SE 5.0 made several useful additions to its methods. For example,
To wrap a primitive type into one of these classes, we use the provided class constructor. Generally, each of these classes provides two constructors:
Earlier we learned that objects of the enum type can be serialized and compared to each other.
Suppose we want to convert a user-specified weight in pounds to a different unit of measure, such as kilograms, carats, or ounces.
To add a property to an enumeration constant, we would need to define its constructor.
In the previous post, we have seen why we need Enums in java, we have seen how to create integer patterns for Enumerations.
Oftentimes, we need a fixed set of constants in our application. Examples might include the days of the week and the colors in a rainbow.
We have covered how to persist the object state to a disk file. In many situations, the classes in a program evolve over time.
A Serializable object may contain references to other objects. We may be wondering if we serialize an object, whether the nested objects are also seri
A program that illustrates the use of the Externalizable interface is given here. Note that the program uses Java’s security API. We need not worry ab
You need to log in or register to vote on answers or questions.