• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Does groovy internally deals with primitives ?

 
Ranch Hand
Posts: 211
Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello ranchers,

I was reading Gina(Groovy in Action) and its Section 3.1 clearly states that in Groovy World everything is 'Object' and replaces corresponding wrappers wherever required.
I tried a small example as follows:

On decompiling found that in line1 groovy replaces new Integer(1) but for line2 it declares int variable (rather then Integer reference type).
Any of the rancher wants to throw some light on this ?


Regards,
Shroff.
 
It's a tiny ad. At least, that's what she said.
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic