Home / MCQ Bank / Computer
Computer Input Output

What will be the output of the following Java program? class output { public static void main(String args[]) { char c[]={'a','1','b',' ','A','0']; for (int i = 0; i < 5; ++i) { if(Character.isDigit(c[i])) System.out.println(c[i]" is a digit"); if(Character.isWhitespace(c[i])) System.out.println(c[i]" is a Whitespace character"); if(Character.isUpperCase(c[i])) System.out.println(c[i]" is an Upper case Letter"); if(Character.isUpperCase(c[i])) System.out.println(c[i]" is a lower case Letter"); i = i + 3; } } }

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option A • a is a lower case Letter is White space character

Related Computer Questions

Which class is typically used to implement a `Deque` in the Java Collections Framework? Consider the following recursive implementation used to convert a decimal number to its binary equivalent: #include<stdio.h> int arr[31], len = 0; void recursive_dec_to_bin(int n) { if(n == 0 && len == 0) { arr[len++] = 0; return; } if(n == 0) return; __________; recursive_dec_to_bin(n/2); } int main() { int n = 100,i; recursive_dec_to_bin(n); for(i=len-1; i>=0; i--) printf("%d",arr[i]); return 0; } Which of the following lines should be inserted to complete the above code? Which of the following css property is used to describe how the animation will play? Which statement is used to produce a stored function? Operation "a = a * b + a" can also be written as ______