Skip to content

Commit c623397

Browse files
committed
convert boolean to string
1 parent 235fceb commit c623397

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

boolean-to-string.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
class booleantostring
2+
{
3+
public static void main(String args[])
4+
{
5+
boolean b1=true;
6+
boolean b2=false;
7+
String s1=String.valueOf(b1);
8+
String s2=String.valueOf(b2);
9+
System.out.println(s1);
10+
System.out.println(s2);
11+
}
12+
}

0 commit comments

Comments
 (0)