We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 8b69615 + 041f873 commit 2c9fbe6Copy full SHA for 2c9fbe6
1 file changed
1add.java
@@ -0,0 +1,16 @@
1
+class Main {
2
+ public static void main(String[] args) {
3
+
4
+ // create boolean variables
5
+ boolean booleanValue1 = true;
6
+ boolean booleanValue2 = false;
7
8
+ // convert boolean to string
9
+ // using valueOf()
10
+ String stringValue1 = String.valueOf(booleanValue1);
11
+ String stringValue2 = String.valueOf(booleanValue2);
12
13
+ System.out.println(stringValue1); // true
14
+ System.out.println(stringValue2); // true
15
+ }
16
+}
0 commit comments