robincelena

Greenhorn
+ Follow
since Sep 07, 2001
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by robincelena

public class DebugMe1
{
public void main(String [] args)
{
int a;
int result = method1(a);
System.out.println("The result of passing a to method1 is: " + result);
}
public int method1(int y)
{
int b = 2;
int a = b + method2(y);
return a;
}
public int method2(int z)
{
int c = z * 10;
return c;
}
}
/*debug this code. The output should be: "The result of passing a to method1 is: 32"
From the main method, call method1 and pass it the class-level variable.
*/
public class DebugMe1
{
public void main(String [] args)
{
int a;
int result = method1(a);
System.out.println("The result of passing a to method1 is: " + result);
}
public int method1(int y)
{
int b = 2;
int a = b + method2(y);
return a;
}
public int method2(int z)
{
int c = z * 10;
return c;
}
}
/*debug this code. The output should be: "The result of passing a to method1 is: 32"
From the main method, call method1 and pass it the class-level variable.
*/
20 years ago