|
-
November 25th, 2010, 09:16 AM
#1
what is wrong with this code
hi guys what is wrong with the following code:
public class example {
public static final int value = 1;
public int value2 = 2;
public static void showInt (){
int i = value + 2;
System.out.println ("the value is " + value);
System.out.println ("the value of i is " + i);
}
public static void main(String args[]){
int i;
int j;
int k;
if (args.length > 0)
i = Integer.parseInt(args[0]);
if (args.length > 1)
j = Integer.parseInt(args[1]);
k = j * i;
showInt();
System.out.println("the value is " + k);
}
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|