首页 / 资讯中心 / 文章详情

Java FRQ 001 - If condition

Java FRQ 001 - If condition ★ FEATURED ARTICLE
1. Classify NumberWrite a Java program to get a number from the user and print whether it is positive, zero or negative.2. Write a program to check whether a number is even or odd3. Write a program to check whether a character is alphabet4. How is the else if statement used in Java?a) To specify an alternate condition only if the if condition is trueb) To execute a block of code regardless of the if conditionc) To specify a new condition to test, if the first condition is falsed) To repeat the if condition5. In an if statement, what is the correct way to check if a variable a is not equal to 10?a) if (a ! 10)b) if (a 10)c) if (a ! 10)d) if (a 10)360-34c5-7578-95ea-5407528c795c
阅读完成 · 觉得有帮助?
咨询建站