I am not doing so well with arrays, for those of you who answer,please try and e
ID: 3614930 • Letter: I
Question
I am not doing so well with arrays, for those of you who answer,please try and explain what the different parts mean, I am going totry and practice this stuff over the weekend. I really appreciateall the help though, I apologize to those of you who answer so manyof my questions,- Write a class/static method that takes an array of ints as aparameter and returns an array of booleans (of the same length asthe parameter array). For each element in the parameter array whosevalue is even, the corresponding element of the returned array willbe assigned the value true; all the other elements of the returnedarray will be assigned the value false.
Explanation / Answer
please rate - thanks import java.util.*; importjava.io.*; public class untitled { public static void main(String[] args) { int i; int[]a={1,2,3,4,5,6,7,8,9,10}; //declare and initialize the arrays boolean [] b=newboolean[10]; String []c={"this","longer","whynot","who","guess"}; String [] d=newString[5]; convert(a,b); //call convert to change to boolean System.out.println("Booleanvaluesreturned a b"); //output new array for(i=0;iRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.