⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bool.java

📁 java编程思想的部分实现
💻 JAVA
字号:
import java.util.*;

public class Bool
{
	public static void main(String[] args)
	{
		Random rand=new Random();
		int i=rand.nextInt()%100;
		int j=rand.nextInt()%100;
		Prt("i:"+i);
		Prt("j:"+j);
		Prt("i>j is "+(i>j));
		Prt("i<j is "+(i<j));
		Prt("i>=j is "+(i>=j));
		Prt("i<=j is "+(i<=j));
		Prt("i==j is "+(i==j));
		Prt("i!=j is "+(i!=j));
		//Treating an int as a boolean is not legal java
		Prt("(i<10)&&(j<10) is "+((i<10)&&(j<10)));
		Prt("(i<10)||(j<10) is "+((i<10)||(j<10)));
		
	}
	static void Prt(String s)
	{
		System.out.println(s);
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -