![]() |
| ||
| what is the wrong with Byte constructor which takes int value class WrapperTest when I try to compile this is the problem I got G:\WORK PLACE\work>javac WrapperTest.java Please tell me What is the problem of that constructor. |
| ||
| Re: what is the wrong with Byte constructor which takes int value Probably because there isn't such constructor. API for Byte object API for Short object The values in the parenthesis are not treated as byte and short but as int. I haven't try this and I don't know if it will work so don't blame me, but try: Byte b = new Byte( (byte)3 ); Short s = new Short( (short)34 ); |
| ||
| Re: what is the wrong with Byte constructor which takes int value Actually it works if we do like this. Byte b = 3; Short s = 34; |
| All times are GMT -4. The time now is 1:30 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC