This week's book giveaway is in the NodeJS forum.
We're giving away four copies of Serverless Applications with Node.js and have Slobodan Stojanovic & Aleksandar Simovic on-line!
See this thread for details.
Win a copy of Serverless Applications with Node.js this week in the NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Ron McLeod
  • Tim Moores
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Vijitha Kumara

Issue with one flashcard - Sybex Online Study Materials  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Good morning.

I bought the OCA/OCP Study Guide from Amazon.
I would like to say much thanks for Scott and Jeanne for creating such a great book.

One of the online flashcards on the Sybex website somehow confused me since as far as I know, Java passes method parameters/arguments by value.

This is the flashcard:

Question:
When passing an ArrayList list to a method, calling list = new ArrayList() from the method affects the caller.



Answer:
False. Parameters are passed by reference so reassignments do not affect the caller.



I do understand, that reference re assignments do not affect the caller, but the phrase "parameters are passed by reference" confuses me.

Hope anyone shed light to this.

Thanks
 
Marshal
Posts: 63842
209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

Please check here, and here for errata. You are correct that it should read pass by value.
 
Paper jam tastes about as you would expect. Try some on this tiny ad:
global solutions you can do at home or in your backyard
https://www.kickstarter.com/projects/paulwheaton/better-world-boo
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!