• 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
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

collectionsss......

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hiiiiiii alkesh
At the start i=1 and i also has an accessibility outside the do loop to0
when i++ is done i=2
at this pont b=true
so loop iterates
again i++ executes i=3
at this point b=false because b=!true
loop condition is tested at this point condition is false
loop comes out and value of i is 3 at this time so 3 is printed
regds
Mahen

hi
what is meant by ordering in the collection interfaces is it the order in which objects are added to the collection..
what is the actual use of compareTo() method
It would be good to see an code example..
list is ordered so it maintains the actual order in which elements were ordered
set doesnt maintain the order(why not....)
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic