py of Copy of Lab06 Practice with Arrays-STUDENT Edi View Insert Format Tools Ta
ID: 3726736 • Letter: P
Question
py of Copy of Lab06 Practice with Arrays-STUDENT Edi View Insert Format Tools Table Add-ons Help 100% . ' Normal text , : Tames New. 12 . Bly .ooa -- -.|-·-·- d) How would you access the last element of numberArray? Answer. System. out .printin (charAt (numberArray,lehgth( ) ) ) ; 2. Write 3 ways that square brackets I are used in the examples. Answer 2a in contras, o ae caity braces t umed tor a ? Answer Look at the examples given below and then answer question 3 int [] a {3, 6, 15, 22, 100, 0); double [1 b 3.5, 4.5, 2.0, 2.0, 2.0) string [ ] c = {"alpha", "beta". "ganna"); 3. What are the type and value for each of the four expressions?Explanation / Answer
Ans 2.
1) For single dimensional array notation
2) For accessing an index of an array
3) For two dimensional or multidimensional array declaration
Ans 2a
The array elements are specified in curly brackets.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.