Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

IN JAVA: Ceniralink Central MIc x Take Test: Secure https:/ black oardcm1ch.edu

ID: 3733680 • Letter: I

Question

IN JAVA:

Ceniralink Central MIc x Take Test: Secure https:/ black oardcm1ch.edu webapps assessment take launch sp?course assessment id= 225269 18 course id= 14088/ 1&content; id-5622/60 1&step-null; p Home| Central Michi Zy Central Michigan Ui Y Fantasy Reatll 21 C Home | Chogg.com Slides Labs Activities Assignments Quiz Exams My Grade Question Completion Stetus Save All Answers Save and Submit QUESTION 1 10 points Save Answar Provide orie staterient to declare an arnay rnamed arr of 6 integers and initialize eah eleient to value 10 T TT Paragraph , Anal Library Path. p Werde.0 QUESTION 2 10 points Save Answer Suppose the integer variable numOfElements 1, and the arrery arr is declared and populated with some numbers n)arr new intinumOtElements Wite cades to check if the first element of the array equals to the last element cr nct Print "Equal if they are equal to each aher, athevise print 'Not equa TTT Paragraph, Arial 3(12pt) ,··T O Type here to search 1106 AM 3/20/2018

Explanation / Answer

q1. int[] arr = {10,10,10,10,10};

q2. Code to check if first and last elements are equal.

if(arr[0] == arr[numOfElements - 1]){

System.out.println("Equal");

}

else {

System.out.println("Not equal");

}