What wil be the output of the following Java program?
class Output{
public statie void main(String arg[]){
char a[] = {'a', '5', 'A', ' '};
System.out.print(Character.isDigit(a[o])+" ");
System.out.print(Character. isWhitespace(a [3])+" ");

  • A

    true false true

  • B

    false true true

  • C

    true true false

  • D

    false false false

Character.is Digit(a[o) checks for a[o], whether it is a digit or not, since alo] ie 'a is a character false is
returned. a[3] is a whitespace hence Character.isWhitespace(a[3]) returns a true. a[2] is an uppercase letter ie 'A' hence
Character.isUpperCase(a[2]) returns true.