Java boolean type conversion
In this chapter you will learn:
Convert Boolean object to primitive boolean value
boolean booleanValue()
returns the value as a boolean primitive.
public class Main {
public static void main(String[] args) {
Boolean boolean1 = new Boolean("true");
System.out.println(boolean1.booleanValue());
/*j av a 2 s .c o m*/
}
}
The output:
Next chapter...
What you will learn in the next chapter:
Home » Java Tutorial » Primitive Data Types