class CompareDemo
{
public static void main(String[] args)
{
int a=10;
int b=19;
boolean f=compar(a,b);
if (f)
{
System.out.println("相等");
}
else
System.out.println("不相等");
}
public static boolean compar(int a,int b)
{
boolean flag = a==b? true : false;
return flag;
}
}
|
|