Posts

Java Number Class

Image
In this article we are reading about  “ Java Number Class ” . Java Number class is an  abstract  class which is placed in  java.lang  package. It has  four  abstract methods and two  concrete methods. The abstract class Number is the superclass of classes BigDecimal, BigInteger, Byte, Double, Float, Integer, Long, and Short. This class contains a single consructor  number() . In Java language, we mostly work with a  primitive data type , but Java also provides a  wrapper class  under the abstract class numbers in java.lang package, there are six subclasses under the class ‘numbers’. The primitive data types are ‘wrapped’ under these Java classes for their corresponding objects. This wrapping is usually done by the compiler. When an object is converted into primitive type than it is called Autoboxing, and then again transferred to an object it is called Unboxing. The following figure shows the class hier...

Java Character Class

In this article we are reading about  “ Java Character Class ” . The Character class simply a wrapper class for the primitive type char. It wraps the char primitive value to an object. An object of type Character contains a single field whose type is char .  So what would be the benefit if wraps around the primitive data type to an object? Well basically we would be able to access all the methods that is readily available on the Character class which is very useful. In addition, this class provides several methods for determining a character’s category (lowercase letter, digit, etc.) and for converting characters from uppercase to lowercase and vice versa. We will go over each and every method available to Byte class thoroughly. Character information is based on the Unicode Standard, version 6.2.0. The methods and data of class Character are defined by the information in the UnicodeData file that is part of the Unicode Character Datab...