Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes ans is 4 but how ? (Method invocation) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply locked New topic

ans is 4 but how ? (Method invocation)

Talal Shaikh

Joined: Jul 17, 2001
Posts: 13
public class example {
int a[] = {0};
public static void main (String args[]){
int i[] = {1};
public static void change_i(int i[]) {
i[0] = 2;
i[0] *= 2;
Anthony Villanueva
Ranch Hand

Joined: Mar 22, 2002
Posts: 1055
I've tried answering you in this thread.
Jessica Sant

Joined: Oct 17, 2001
Posts: 4313

Please don't post the same question in multiple forums. You can continue the discussion in the Java In General Forum (see link in Anthony's post)

- Jess
Blog:KnitClimbJava | Twitter: jsant | Ravelry: wingedsheep
Have you tried LearnNowOnline?
subject: ans is 4 but how ? (Method invocation)