forked from codehouseindia/Java-Programs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1add.java
More file actions
16 lines (13 loc) · 434 Bytes
/
1add.java
File metadata and controls
16 lines (13 loc) · 434 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
class Main {
public static void main(String[] args) {
// create boolean variables
boolean booleanValue1 = true;
boolean booleanValue2 = false;
// convert boolean to string
// using valueOf()
String stringValue1 = String.valueOf(booleanValue1);
String stringValue2 = String.valueOf(booleanValue2);
System.out.println(stringValue1); // true
System.out.println(stringValue2); // true
}
}