• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Garbage collection

 
Ranch Hand
Posts: 300
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 )

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic