Question: Consider the JAVA function given below. static int dosonething ( int j ) { int i = 5 0 ; int k ; if k

Consider the JAVA function given below.
static int dosonething(int j){
int i=50;
int k;
if
k=dosomething(i-1);
return 1;
}
else return 0 ;
}
Which one of the following is TRUE?
A. The function returns 0 for all values of j.
B. The function returns 0 when j=50.
C. The function prints the string something for all values of j.
D. The function will exhaust the runtime stack or run into an infinite loop when j=50.
 Consider the JAVA function given below. static int dosonething(int j){ int

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!