search

Home  >  Q&A  >  body text

There seems to be an error in this article. I wrote the following code, which can be converted into trinocular

public class IfDemo2 {

public static void main(String[] agrs) {

int x=100; //Use IF to demonstrate

if(x% 2==0) {

System.out.println("100 is an even number");

System.out.println("100 is an odd number");

");

}

//Use trinocular demonstration

String b=(x%2==0)?"100 is an even number":"100 is an odd number ";

              System.out.println(b);

Jesse·BryantJesse·Bryant1086 days ago870

reply all(1)I'll reply

  • 不开心就吃

    不开心就吃2021-12-29 13:50:58

    Uh-huh

    reply
    0
  • Cancelreply