The code snippetif( "Welcome".trim() == "Welcome".trim() )System.out.println("Equal");elseSystem.out.println("Not Equal");will
A. Compile and display “Equal”
B. Compile and display “Not Equal”
C. Cause a compiler error
D. Compile and display NULL
Consider the following code snippet. What will be assigned to the variable fourthChar, if the code is executed? String str = new String(“Java”); char fourthChar = str.charAt(4);
A. ‘a’
B. ‘v’
C. throws StringIndexOutofBoundsException
D. null characater