This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Groovy and the fly likes Does groovy internally deals with primitives ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Languages » Groovy
Bookmark "Does groovy internally deals with primitives ?" Watch "Does groovy internally deals with primitives ?" New topic
Author

Does groovy internally deals with primitives ?

Sagar Shroff
Ranch Hand

Joined: Jun 07, 2011
Posts: 208

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.


OCJP-90%,OCPWCD-95%
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Does groovy internally deals with primitives ?