পৃষ্ঠাসমূহ

Search Your Article

CS

 

Welcome to GoogleDG – your one-stop destination for free learning resources, guides, and digital tools.

At GoogleDG, we believe that knowledge should be accessible to everyone. Our mission is to provide readers with valuable ebooks, tutorials, and tech-related content that makes learning easier, faster, and more enjoyable.

What We Offer:

  • 📘 Free & Helpful Ebooks – covering education, technology, self-development, and more.

  • 💻 Step-by-Step Tutorials – practical guides on digital tools, apps, and software.

  • 🌐 Tech Updates & Tips – simplified information to keep you informed in the fast-changing digital world.

  • 🎯 Learning Support – resources designed to support students, professionals, and lifelong learners.

    Latest world News 

     

Our Vision

To create a digital knowledge hub where anyone, from beginners to advanced learners, can find trustworthy resources and grow their skills.

Why Choose Us?

✔ Simple explanations of complex topics
✔ 100% free access to resources
✔ Regularly updated content
✔ A community that values knowledge sharing

We are continuously working to expand our content library and provide readers with the most useful and relevant digital learning materials.

📩 If you’d like to connect, share feedback, or suggest topics, feel free to reach us through the Contact page.

Pageviews

Thursday, January 19, 2017

Java.lang Boolean Class

Introduction

The java.lang.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.

Class declaration

Following is the declaration for java.lang.Boolean class:
public final class Boolean
   extends Object
      implements Serializable, Comparable<Boolean>

Field

Following are the fields for java.lang.Boolean class:
  • static Boolean FALSE -- This is the Boolean object corresponding to the primitive value false.
  • static Boolean TRUE -- This is the Boolean object corresponding to the primitive value true.
  • static Class<Boolean> TYPE -- This is the Class object representing the primitive type boolean.

Class constructors

S.N. Constructor & Description
1 Boolean(boolean value)
This allocates a Boolean object representing the value argument.
2 Boolean(String s)
This allocates a Boolean object representing the value true if the string argument is not null and is equal, ignoring case, to the string "true".

Class methods

S.N. Method & Description
1 boolean booleanValue()
This method returns the value of this Boolean object as a boolean primitive.
2 int compareTo(Boolean b)
This method compares this Boolean instance with another.
3 boolean equals(Object obj)
This method returns true if and only if the argument is not null and is a Boolean object that represents the same boolean value as this object.
4 static boolean getBoolean(String name)
This method returns true if and only if the system property named by the argument exists and is equal to the string "true".
5 int hashCode()
This method returns a hash code for this Boolean object.
6 static boolean parseBoolean(String s)
This method parses the string argument as a boolean.
7 String toString()
This method returns a String object representing this Boolean's value.
8 static String toString(boolean b)
This method returns a String object representing the specified boolean.
9 static Boolean valueOf(boolean b)
This method returns a Boolean instance representing the specified boolean value.
10 static Boolean valueOf(String s)
This method returns a Boolean with a value represented by the specified string.

Methods inherited

This class inherits methods from the following classes:
  • java.lang.Object

No comments:

Post a Comment