Skip to main content
Announcements
A fresh, new look for the Data Integration & Quality forums and navigation! Read more about what's changed.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[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
Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

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();

View solution in original post

3 Replies
Anonymous
Not applicable
Author

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();
Anonymous
Not applicable
Author

thanks a lot 0683p000009MACn.png
Anonymous
Not applicable
Author

tks it was helpful 0683p000009MACn.png