This week's book giveaway is in the Server-Side JavaScript and NodeJS forum.
We're giving away four copies of Modern JavaScript for the Impatient and have Cay Horstmann on-line!
See this thread for details.
Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Garbage collection

 
Ranch Hand
Posts: 300
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Would anyone please help me in understanding the output of this program.
Which of the following could be a result of attempting to compile and run the program?

As per my understanding output should be -A1A2A3A1
which my exam says correct answer but along with there are other options are also corrected - A1A2A3A1A2A3 A1A2A3A1A1A2A3 A1A2A3A1A3A2A1
which i am not able to understand why.

Any help??
Thanks
 
Ranch Hand
Posts: 1282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I could not understand the code, sounds like you have been reading too many books and need to write some code: OO does not write code, you do.

Is this what you meant ?

( not to be mean ) ( Eugene, jeans ) ( Beein a Bean ) ( Brain )

 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic