Accesses element of array

Assignment Help JAVA Programming
Reference no: EM13807208

1 . In array items, which of the following expressions will retrieve the value at row 3 and column 5?

A. items( 3 ).( 5 )
B. items( 3( 5 ) )
C. items( 3 )( 5 )
D. items( 3, 5 )

2. The number in parentheses after an array name is the __________ of the item in the array.

A. value
B. position
C. size
D. length

3. What is the proper For Each...Next header format?

A. For Each Type in arrayName
B. For Each arrayName
C. For Each type_identifer As Type In arrayName
D. For Each Type

4. Consider the code below:

Dim a(9) As Integer
For i As Integer = 0 To a.Length - 1
a(i) = i + 2
Next
Dim result As Integer = 0
For i As Integer = 0 To a.Length - 1
result += a(i)
Next

The value of variable result will be __________.

A. 62
B. 64
C. 65
D. 67

5. Which of the following correctly accesses element 13 of array Book?

A. Book(0) + 13
B. Book(13)
C. Book[13]
D. (13)Book

6. Consider the code below:

Dim a() As Integer = {99, 22, 11, 3, 11, 55, 44, 88, 2, -3}
Dim result As Integer = 0
For i As Integer = 0 To a.Length - 1
If a(i) > 30 Then
result += a(i)
End If
Next

The value of variable result will be __________.
A. 280
B. 154
C. 286
D. 332

Reference no: EM13807208

Questions Cloud

What would happen if a state in the u.s hold an election : What are your thoughts about this. What would happen if a state in the U.S., like California, decided it wanted to hold an election and decide whether or not to secede from the U.S. What would happen if a majority of Califonians actually voted to ..
Normal distribution with a population standard deviation : What percent of the sample means will be greater than 133 but less than 145 seconds?
Learning in a technology-enhanced environment : Learning in a Technology-enhanced Environment
Write an essay on the story and film a dollhouse : Write an Essay on the story and film A DOLLHOUSE.
Accesses element of array : Which of the following correctly accesses element 13 of array Book
Similarities of organized crime and terrorism : What are the differences and similarities of organized crime and terrorism
How narrator and dravot represent aspect of british empire : How do the narrator, Dravot, and Carnehan each represent an aspect of the British Empire? Use evidence from the text to support your response.
Estimating the population proportion of customers : How many customers need to be selected to have 90% confidence of estimating the population proportion of customers who purchase dessert to within =.04?
Develop a new process design for the production : Using the Six Sigma DMAIC process, develop a new process design for the production of the Riordan electric fans. Be sure to take advantage of any global opportunities available to Riordan, such as lower labor costs.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd