Two Laptop Bag
The moose likes Swing / AWT / SWT and the fly likes Return primitive in getColumnClass? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Return primitive in getColumnClass?" Watch "Return primitive in getColumnClass?" New topic

Return primitive in getColumnClass?

Mark Dary

Joined: Jan 16, 2009
Posts: 29
Hi all

Is is possible to return a primitive in getColumnClass.

I was returning int.class but I kept getting errors, so I changed it to an Integer and it seems OK.

I was just curious if it was actually allowed to return a primitive.


Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10825

Not really.
The expected return type is a class object and as you know primitives are well...primitives !

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
I agree. Here's the link:
subject: Return primitive in getColumnClass?
It's not a secret anymore!