Question: ***Need help ASAP*** Please help solve this by using JAVA and read the directions carefully! Thanks in advance! Exam 2 Program Design and Abstraction 2.
Exam 2 Program Design and Abstraction 2. (5 points) What is the output of this program when run? public class WhatsPrinted5 public static int func(int y) f return y*2 public static void main(String argsl) ( int x=10; func(x); System.out.println(x); 3. (5 points) What is the output of this code? int [ ] arr= {-1, -2, -5, 2, 5); forint i 1; ati] - ali] arrli-1]; iarra length; :1++){ ystem.out.println(Arrays.tostring(arr))
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
