Answered step by step
Verified Expert Solution
Question
1 Approved Answer
3 4 public static void func(int x, int y) { X = 2; y += x; } 5 6 7 8 9 10 11 12
3 4 public static void func(int x, int y) { X = 2; y += x; } 5 6 7 8 9 10 11 12 13} 14 public static void main(String args[]) { int x = 10, y = 20; func(y, x); system.out.println(y); } 10 11 20 50 Question 22 (1.5 points) What is the output of the following? 1. public class whatsPrintede3 { public static void func(int anArray[]) { anArray[@]++; 2. 5 6 public static void main(string args[]) { int prices[] = {10, 20, 30}; func(prices); System.out.println(prices[0]); } 12} 13 10 11 20 50 3 4 Question 23 (1.5 points) What is the output of the following? 1. public class whatsPrintede4 { public static void func(int anArray() { int arrayB[] = new int[3]; arrayb[@] = 111; anArray = arrayB; } public static void main(String args[]) { int states[] = {10, 20, 30); func(states); system.out.println(states[]); } 14} 8 10 11 12 10 011 20 50 Question 24 (1.5 points) Saved What will be the output for the following program? class Test{ public static void main(string args[]) { int arr[] = new int[2]; System.out.println(arr[]); System.out.println(arr[1]); } 7 3 4 5 6 8 0 0 Garbage Value Garbage Value Compilation Error None of the options
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started