aspose file tools*
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
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "passing Array between methods" Watch "passing Array between methods" New topic
Author

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
author
Sheriff

Joined: Sep 28, 2004
Posts: 18117
    
  39

http://faq.javaranch.com/java/CallByReferenceVsCallByValue


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

Joined: Apr 26, 2009
Posts: 62
thanks

the description is so clear :)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: passing Array between methods
 
Similar Threads
Array Question
passing arrays
kathy sierra question
how to compare the values in arrays
Passing an Array Reference