Tag Archives: Java-lang package

Java.lang.Character.Subset Class in Java

Character.Subset Class represents particular subsets of the Unicode(standards using hexadecimal values to express characters – 16bit) character set. The subset, it defines in Character set is UnicodeBlock. Declaration : public static class Character.Subset extends Object Constructors : protected Character.Subset(String str) : Constructs new subset instance. Methods: equals() : java.lang.Character.Subset.equals() tells wheteher the two Subset Object… Read More »

Java.lang.Class class in Java | Set 2

Java.lang.Class class in Java | Set 1 More methods: int getModifiers() : This method returns the Java language modifiers for this class or interface, encoded in an integer. The modifiers consist of the Java Virtual Machine’s constants for public, protected, private, final, static, abstract and interface. These modifiers are already decoded in Modifier class in… Read More »

Java.lang.Enum Class in Java

Enum class is present in java.lang package. It is the common base class of all Java language enumeration types. For information about enums, refer enum in java Class Declaration public abstract class Enum<E extends Enum> extends Object implements Comparable, Serializable As we can see, that Enum is an abstract class, so we can not create… Read More »

Java.lang.Class class in Java | Set 1

Java provides a class with name Class in java.lang package. Instances of the class Class represent classes and interfaces in a running Java application. The primitive Java types (boolean, byte, char, short, int, long, float, and double), and the keyword void are also represented as Class objects. It has no public constructor. Class objects are… Read More »

Java.Lang.Long class in Java

Long class is a wrapper class for the primitive type long which contains several methods to effectively deal with a long value like converting it to a string representation, and vice-versa. An object of Long class can hold a single long value. There are mainly two constructors to initialise a Long object- Long(long b): Creates… Read More »

Java.lang.Integer class in Java

Integer class is a wrapper class for the primitive type int which contains several methods to effectively deal with a int value like converting it to a string representation, and vice-versa. An object of Integer class can hold a single int value. Constructors: Integer(int b): Creates a Integer object initialized with the value provided. Syntax… Read More »

Java.Lang.Short class in Java

Short class is a wrapper class for the primitive type short which contains several methods to effectively deal with a short value like converting it to a string representation, and vice-versa. An object of Short class can hold a single short value. There are mainly two constructors to initialise a Short object- Short(short b): Creates… Read More »

Java.Lang.Byte class in Java

Byte class is a wrapper class for the primitive type byte which contains several methods to effectively deal with a byte value like converting it to a string representation, and vice-versa. An object of Byte class can hold a single byte value. There are mainly two constructors to initialise a Byte object- Byte(byte b): Creates… Read More »

Java.Lang.Double class in Java

Double class is a wrapper class for the primitive type double which contains several methods to effectively deal with a double value like converting it to a string representation, and vice-versa. An object of Double class can hold a single double value. There are mainly two constructors to initialize a Double object- Double(double b) :Creates… Read More »

Java.Lang.Float class in Java

Float class is a wrapper class for the primitive type float which contains several methods to effectively deal with a float value like converting it to a string representation, and vice-versa. An object of Float class can hold a single float value. There are mainly two constructors to initialise a Float object- Float(float b: Creates… Read More »

Java.lang.Boolean Class in Java

Java provides a wrapper class Boolean in java.lang package. The Boolean class wraps a value of the primitive type boolean in an object. An object of type Boolean contains a single field, whose type is boolean. In addition, this class provides useful methods like to convert a boolean to a String and a String to… Read More »