Question: Q 1 ( I believe java was used ) public static void main ( String [ ] args ) throws Exception { int [ ]

Q1(I believe java was used)
public static void main(String[] args) throws Exception {
int[] array = new int[5];
for (int a : array){
System.out.print(a +"");
}
System.out.println();
}
What is the output?
A)00000
B)12345
C) No output because the array is not initialized
Q2
public static void main(String[] args) throws Exception {
int[][] myNumbers ={{1,2,3,4},{5,6,7}};
System.out.printf("%d %d %d
", myNumbers.length, myNumbers[0].length, myNumbers[1].length); }
What is the output?
A)244
B)234
C)243
Q3
public class Recursion {
public static void permutation(int num){
if (num ==0) return;
System.out.print(num --+"");
permutation(num);
}
public static void main (String[] args){
permutation(5);
}
}
What is the output?
A)43210
B)543210
C)54321
D) There is a bug and the program will never stop
 Q1(I believe java was used) public static void main(String[] args) throws

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!