Question: import java.util.Random; import java.util.StringJoiner; public class preLabC { public static int myMethod ( MathVector inputVector ) { int valueAt 5 thPosition = - 1 0

import java.util.Random;
import java.util.StringJoiner;
public class preLabC {
public static int myMethod(MathVector inputVector){
int valueAt5thPosition =-100000; // default value for integer
System.out.println("here is the contents object, inputVector: "+ inputVector);
// extract the value at the fifth position of the array in the object
// Remember: the count starts at 0. So the 5th position has an index of 4.
valueAt5thPosition = inputVector.get(4);
System.out.println("This is the value at position 5: "+ valueAt5thPosition);
// return the integer value found at position 5 of the array..
return valueAt5thPosition;
}
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!