Question
Question 60.05 pts Which of the following statements correctly uses a reference to the entire array myArray as the argument of the method call? (The
Question 60.05 pts
Which of the following statements correctly uses a reference to the entire array myArray as the argument of the method call? (The method call comes from within the same class, so no qualifier is needed.) public void myMethod( int[ ] a ) { ... }
myMethod( myArray ); |
myMethod( myArray[ ] ); |
myMethod( myArray[ 0 ] ); |
All of the above |
Flag this Question
Question 70.05 pts
An array of doubles is stored in the variable v as shown below. Which statement below will print some or all of the contents of the array with NOerrors (syntax or logical)? int vSize = 5; double[ ] v = new double[vSize]; for (int i = 0; i < vSize; i++)
v[i] = 1.1;
System.out.println( v ); |
System.out.println( v[0] ); |
System.out.println( v[vSize] ); |
All of the above |
None of the above |
Flag this Question
Question 80.05 pts
Which of the following method signatures correctly specifies an array as a return type?
private array testMethod ( int x ) |
private int[ ] testMethod ( int x ) |
private double[5] testMethod ( int x ) |
private double testMethod[ ] ( int x ) |
can't tell from this code |
Flag this Question
Question 90.05 pts
Which of the following is the BEST description of a 2-D array in Java?
a 2-D array is a table |
a 2-D array is an array of arrays |
a 2-D array is a matrix |
a 2-D array is a nested loop |
a 2-D array is an ArrayList |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started