-
Scope and parameters
I really need someones help with the following 2 ques, 1) the line numbers were variable scope is visible and 2) name the actual and formal parameters in the program below.
1 public class Scope {
2 public static void test(int num) {
3 if (num > 10) {
4 int half = num / 2;
5 System.out.println(“Half num = “ + half);
6 } else {
7 System.out.println(num);
8 }
9 }
10 public static void main(String[] args)
11 {
12 int x = 5;
13 test(x);
14 }
15 }
-
Re: Scope and parameters
Is this the same question again? Please only post a question once.
http://www.javaprogrammingforums.com...html#post85302
Please use the other thread.
You need to respond to the last post on the other thread.