java.lang.Boolean — how to abuse it

Rohit Singh
1 min readDec 1, 2020

Java language has primitive type and Object types

There are eight primitive types

  • short
  • int
  • long
  • float
  • double
  • char

java.lang.Boolean wraps a value of the primitive type boolean in an object. This has a single field of type boolean

Example

Boolean test = Boolean.FALSE; // java.lang does not need to be imported

--

--

Rohit Singh
0 Followers

Love everything programming — with more than 20 years of experience in full stack programming.