Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Please Help identify the Output !

807600Jul 26 2007 — edited Jul 26 2007
Given the following,
1. public class CommandArgsThree {
2. public static void main(String [] args) {
3. String [][] argCopy = new String[2][2];
4. int x;
5. argCopy[0] = args;
6. x = argCopy[0].length;
7. for (int y = 0; y < x; y++) {
8. System.out.print(" " + argCopy[0][y]);
9. }
10. }
11. }
and the command-line invocation,
java CommandArgsThree 1 2 3
what is the result?

Could you also clearly explain the reason for a particular output ? Thanks in advance !

Message was edited by:
aron_phil
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 23 2007
Added on Jul 26 2007
4 comments
98 views