How to convert primitive boolean to Boolean object in Java

1 Answer

0 votes
package javaapplication1;

public class JavaApplication1 {
 
    public static void main(String[] args) {
  
        boolean b = true;

        Boolean bObj = b;
        System.out.println(bObj);
    }
}
 
/*
    
run:

true

*/

 



answered Nov 4, 2016 by avibootz

Related questions

1 answer 147 views
1 answer 218 views
1 answer 235 views
1 answer 214 views
...