标签:关系表达式
利用关系运算符连接的式子成为关系表达式。
关系运算就是比较运算符号(6个:== 、!=、 > 、<、 >=、 <=)
public class C2_8 { public static void main(String args[]) { boolean x,y; double a,b; a=12.56; b=233.23; x=(a!=b); y=(a==b); System.out.println("(a>b)="+(a>b)); System.out.println("x="+x); System.out.println("y="+y); } }
结果
本文出自 “桑海田 博客专栏” 博客,请务必保留此出处http://10602803.blog.51cto.com/10592803/1683062
标签:关系表达式
原文地址:http://10602803.blog.51cto.com/10592803/1683062