One Star

[resolved] converting short to Integer

how can I convert a short (not Short) to an Integer.
short s
I've tryied
Integer.parseInt(new Short(s))

thanks for helping
1 ACCEPTED SOLUTION

Accepted Solutions
Employee

Re: [resolved] converting short to Integer

Hi dchambon,
You need to convert it to a Short first:
short abc = 10;
Short a = new Short(abc);
Integer myint = a.intValue();
or also:
Integer myint = (new Short(abc)).intValue();
3 REPLIES
Employee

Re: [resolved] converting short to Integer

Hi dchambon,
You need to convert it to a Short first:
short abc = 10;
Short a = new Short(abc);
Integer myint = a.intValue();
or also:
Integer myint = (new Short(abc)).intValue();
One Star

Re: [resolved] converting short to Integer

thanks a lot Smiley Happy
One Star

Re: [resolved] converting short to Integer

tks it was helpful Smiley Happy