资讯详情

资讯详情

Java FRQ 001 - If condition

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
觉得有用,分享给同行:

为您的企业打造数字门面

稳重轻奢商务风格,端正雅致视觉,长效耐看不易过时。

立即咨询 →