5:34 PM
Ge Sir!
 
hello?
 
Sir I am having a difficulty in Java!
may I ask you?
 
I'm not that good at it... I have not used Java in a few years now
 
I wante to ask about NumberFormatException
 
What about it?
 
5:36 PM
Actually I have one string containing number in binary form as"01001100"
I want to convert it to byte
I am using Byte.parseByte(String) method
It worked well for small numbers like "100"(4 in dec.) but not with the number mentioned above.
In byte the max number we can store is 127 then why m I getting this exception?
 
try the string
"0b01001100"
I'm not sure if JHava handles this
though
Actually it won't
hold on
 
But why b is used there?
 
I was thinking of something else
Have you tried using `public static byte parseByte(String s,
int radix)
`
by giving it a radix
 
no. radix means?
the base?
 
I have not used Byte.parseByte, you might want to ask on SO as a question.
 
5:43 PM
Sir I have posted this question just now.
 
Ok. I'm sure you'll get better answers on SO than I can give you
good luck
 
Thank you Sir :)
 
np
sorry couldnt be more help