How to convert String object to Boolean object in Java

1 Answer

0 votes
package javaapplication1;

public class JavaApplication1 {
 
    public static void main(String[] args) {
  
        String s = "true";
   
        Boolean b = Boolean.valueOf(s);
        System.out.println(b);
    }
}
 
/*
    
run:

true

*/

 



answered Nov 4, 2016 by avibootz

Related questions

1 answer 236 views
1 answer 253 views
1 answer 217 views
3 answers 416 views
1 answer 213 views
213 views asked Mar 24, 2021 by avibootz
1 answer 297 views
1 answer 233 views
233 views asked Oct 28, 2016 by avibootz
...