![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 | |
|
Professional Programmer
Join Date: May 2006
Location: UK - London
Posts: 330
Rep Power: 3
![]() |
I am doing one of my Java assignments and I need to pass a method an int but I am receiving the data as an Object, is it possible to convert an Object to an int.
I will just demonstrate what I mean because I can't post my actual code. public void A(Object o)
{
//call B with the given data
//do something
}
public void B(int i)
{
//do something
}
__________________
Quote:
|
|
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Casting signed int to unsigned int? | null_ptr0 | C++ | 1 | Nov 23rd, 2007 9:27 PM |
| Object reference error | Jabo | Visual Basic .NET | 3 | Oct 5th, 2007 2:37 AM |
| Library problem creating Direct3d Object | Kilo | C++ | 9 | May 30th, 2006 8:48 AM |
| Pushin an object into a vector | slyadams | C++ | 18 | Mar 30th, 2006 11:17 AM |
| references passed through parameters, do they copy the object or reference the orig? | cypherkronis | Python | 1 | Jun 30th, 2005 7:38 PM |