//需求:两只老虎的体重分别为180kg和200kg,用程序判断两只老虎的体重是否相同 public class HelloWorld{ public static void main(String[] args){ int weight1 = 180; int weight2 = 200; boolean a = weight1 == weight2?true:false; System.out.println("a:" + a); } }