对于Boolean类使用了字符串构造方式,并且之后使用了toString()方法将true和false以字符串形式输出。

/**
 * 对于Boolean类使用了字符串构造方式,并且之后使用了toString()方法将true和false以字符串形式输出。
 * @author HAN
 *
 */
public class BooleanApps {
	Boolean b1=new Boolean("true");
	String str1= b1.toString();
	
	Boolean b2=new Boolean("OK");
	String str2= b2.toString();
	public BooleanApps(){
		System.out.println(str1);
		System.out.println(str2);
	}
	public static void main(String[] args){
		new BooleanApps();
	}
}


相关文章:

  • 2021-07-18
  • 2022-12-23
  • 2021-06-16
  • 2022-12-23
  • 2022-12-23
  • 2021-10-16
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-24
  • 2021-08-08
  • 2021-06-02
  • 2022-12-23
  • 2021-07-02
  • 2022-01-28
相关资源
相似解决方案