Question: Create Array Create a method createArray ( ) that accepts five String parameters Create an Array of String that stores the value of the five
Create Array
Create a method createArray
that accepts five String parameters
Create an Array of String that stores the value of the five parameters.
return the newly created array.
import java.io
;
import java.util.
;
import java.text.
;
import java.math.
;
import java.util.regex.
;
public class ProgrammingLanguages
Write your static method here
DO NOT CHANGE THE CODE BELOW THIS LINE
public static void main
String
args
Scanner in
new Scanner
System
in
;
String lang
lang
lang
lang
lang
;
lang
in
next
;
lang
in
next
;
lang
in
next
;
lang
in
next
;
lang
in
next
;
String
mainArray
createArray
lang
lang
lang
lang
lang
;
Loop through the array and print each element
for
String language : mainArray
System.out.println
language
;
end of main
end of ProgrammingLanguages class
Expected STDOUT
Java
JavaScript
Python
Ruby
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
