Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. If there is an array named grades , what is the length of that array? a. grades.length() b. len(grades) c. grades.length d. grades.size 2.

1. If there is an array named grades, what is the length of that array?

a. grades.length()

b. len(grades)

c. grades.length

d. grades.size

2. String[] arr = {"a","t","e","c","b"};

What is the output when the program outputs elements at indexes 3, 4, and 1?

a. cbt

b. bet

c. tec

d. cat

3. Which statement below declares and initializes an array of movies?

a. String movies{};

b. String[] movies = {"Star Wars", "Inception", "The Matrix"};

c. String[] movies = ["Star Wars", "Inception", "The Matrix"];

d. String[] movies = [];

4. Every element in array my_arr is the value 1. A program passes my_arr to a method. The method changes every element of the array to 0. The method returns, and the main method outputs my_arr. What is the output?

a. Java Exception

b. All 1s

c. All 0s

d. No output

5. Consider an array with five elements 11, 22, 33, 44, and 55 in that order. Your program outputs the element at index 5. What is the output?

a. 5

b. 55

c. 1

d. Java exception

6. Which of the following is similar to the two-dimensional array concept?

a. Cups in a cupboard

b. an Excel spreadsheet

c. Birds on a fence

d. A line of people at a cash register

If there is an answer you dont know, you can leave it out, i need these asap. Thanks!!

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Theory And Application Bio Science And Bio Technology International Conferences DTA And BSBT 2011 Held As Part Of The Future Generation In Computer And Information Science 258

Authors: Tai-hoon Kim ,Hojjat Adeli ,Alfredo Cuzzocrea ,Tughrul Arslan ,Yanchun Zhang ,Jianhua Ma ,Kyo-il Chung ,Siti Mariyam ,Xiaofeng Song

2011th Edition

3642271561, 978-3642271564

More Books

Students also viewed these Databases questions

Question

=+3. How does this message use an emotional appeal?

Answered: 1 week ago

Question

What is the preferred personality?

Answered: 1 week ago