5 years ago in Java Arrays

6.Will the following program compile successfully ?

class MyArray

{

public static void main(String[] args)

{

int arr1[]=new int[2]{1,2};

int arr2[]=new int[]{1,2,3};

}

}

[A] Yes
[B] No
Loading...
Next Question

Overall Stats

Attempted 367
Correct 86
Incorrect 130
Viewed 151

Answers

Guest
Guest
Shamsa hafeez
Shamsa hafeez - 2 days ago

Shamsa hafeez from Lahore, Pakistan is saying Yes is correct answer

Rakhi Sharma
Rakhi Sharma - 2 weeks ago

Rakhi Sharma is saying Yes is correct answer

Vaibhav Bisht
Vaibhav Bisht - 1 month ago

Vaibhav Bisht from Dehradun, India is saying No is correct answer

Zo Go
Zo Go - 1 month ago

Zo Go from Casablanca, Morocco is saying No is correct answer

Fâtïmá Żahřâ Zágñane
Fâtïmá Żahřâ Zágñane - 1 month ago

Fâtïmá Żahřâ Zágñane from Casablanca, Morocco is saying Yes is correct answer

Related Questions

Which of these is necessary to specify at time of array initialization?

  • [A] Row
  • [B] Column
  • [C] Both Row and Column
  • [D] None of the mentioned