• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Array Doubts -

 
Ranch Hand
Posts: 344
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator



Whether muy digram is correct for the above pgm? If so,
why the line assignment i1 = i2 is described as i1(parm) points to i2 object instead of i1 points to i2.

Since the name i1 is same, it will behave like this always?..

And another query, how we can include diagrams(ms paint..or other)? the above diagram is painstacking...
 
Ranch Hand
Posts: 381
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

And another query, how we can include diagrams(ms paint..or other)? the above diagram is painstacking...


Yes,it is hard to understand You can use MSVisio or any other of your choice.Save that and use Image tag.
 
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
class variable: i1, i2
local variable: i1, i3

m1(i1) -> i1(local) = i1(class)
inside m1():
i3 = i1(local) -> i3 = i1(class)
i1(local)=i2 -> don't care
i2=i3 -> i2 = i1(class)

so class variable i1 unchanged but i2 changed to i1, thus it "should" print out:

1 1

Hope it correct.
reply
    Bookmark Topic Watch Topic
  • New Topic