May 29, 2001 #1 Nicky Programmer Joined Nov 28, 2000 Messages 9 Location US i have a function insertAtRank(int rank, Object element) String a = textField1.getText(); what i wanna do is: insertAtRank(1, a)// but a is a String, i wanna pass it as an Object. anybody know? Thanx
i have a function insertAtRank(int rank, Object element) String a = textField1.getText(); what i wanna do is: insertAtRank(1, a)// but a is a String, i wanna pass it as an Object. anybody know? Thanx
May 29, 2001 #2 GIGN Programmer Joined Oct 6, 2000 Messages 1,082 Location NZ Every primitive can be wrapped to make an object: aObj = new String(a); I think this should work ;-) Upvote 0 Downvote
May 29, 2001 Thread starter #3 Nicky Programmer Joined Nov 28, 2000 Messages 9 Location US Thanx Bangers Upvote 0 Downvote