File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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 ?