ADVANCED TOPICS IN COMPILER DESIGN
CODE GENERATION FOR OBJECT ORIENTED LANGUAGES
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
Which of the following statements are correct?
|
char[][] charArray = {’a’, ‘b’};
|
|
char[2][2] charArray = {{’a’, ‘b’}, {’c’, ‘d’}};
|
|
char[2][] charArray = {{’a’, ‘b’}, {’c’, ‘d’}};
|
|
char[][] charArray = {{’a’, ‘b’}, {’c’, ‘d’}};
|
Explanation:
Detailed explanation-1: -public class CharArrayDemo public static void main(String[] args) char[] JavaCharArray = ’a’, ‘b’, ‘c’, ‘d’, ‘e’; for (char c:JavaCharArray) System. out. println(c);
There is 1 question to complete.