The getBoolean() method of Java Boolean class returns true if the specified system property is not null and is equal to the String ‘true’, else the result returned is false.

Syntax

public static boolean getBoolean(String name)

Parameters

The parameter ‘name’ represents the name of the system property.

Return Value:

The getBoolean() method returns the Boolean value for the string value.

Example 1

Output

Example 2

Output

Example 3

Output:

Pin It on Pinterest

Share This