Can I convert int to reference type?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chah123456
    New Member
    • Jan 2015
    • 1

    #1

    Can I convert int to reference type?

    Hi everyone i need urgent help with my final project
    basically i am trying to make a drawRect disappear
    i was trying to do it by setting the x and y values (int) for the rect as setVisible(fals e) but i keep getting an error saying that int is not a reference type. Please help me I would reallly appreciate it
  • chaarmann
    Recognized Expert Contributor
    • Nov 2007
    • 785

    #2
    Can you please post the code in question here?
    It sounds that your problem is somewhere else.

    Remark: you can always create an integer object out of an int and reference to it.
    Like Integer i = new Integer(12);

    Comment

    Working...