Question: S My library > IFT 2 1 0 : Introduction to Java Technologies home > 6 . 1 0 : Array parameters zyBooks catalog CHALLENGE
S My library IFT : Introduction to Java Technologies home : Array parameters
zyBooks catalog
CHALLENGE
ACTIVITY
: Array parameters.
Jump to level
Five integers are read from input and stored into the array myArray. Write a static method addNumToElements that takes an integer array parameter and adds to each element in the array.
Ex: If the input is then the output is:
Input array:
Output array:
import java.util.Scanner;
public class ArrayMethods
Y Your code goes here
public static void printArrint arr
int ;
for arr. length; i
System.out.printarri;
System.out.println;
public static void mainString args
Scanner scnr new Scanner
System.in;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
