示例代码如下:

int a = 5;
int b = 5;
String s = a == b ? "equal" : "not equal";
System.out.println(s);