File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes passing Array between methods Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "passing Array between methods" Watch "passing Array between methods" New topic

passing Array between methods

Heba Mahmoud
Ranch Hand

Joined: Apr 26, 2009
Posts: 62

the output is
0 2
7 7

how the array passed to the method is changed , we only pass a copy from the array ?? not the array itself.
as what happen in the int x ??pass on the copy of x and x remains the same in the main method.

SCJP Pass 85%....
Thousands of candles can be lighted from a single candle, and the life of the candle will not be shortened
Henry Wong

Joined: Sep 28, 2004
Posts: 20538

Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Heba Mahmoud
Ranch Hand

Joined: Apr 26, 2009
Posts: 62

the description is so clear :)
I agree. Here's the link:
subject: passing Array between methods
It's not a secret anymore!