How to Cast Object to double in Java

Hi.
I have a Jtable, now i want cast a cell (String Object) from SIDcol to double type

i tried

double sID= Jtable.getValueAt(5,1).DoubleValue();

it’'s not working, what i should do?

Let’s try this and tell me does it work for you. :grin:

double sID= Double.parseDouble(Jtable.getValueAt(5,1).toString());
3 Likes

Thank you so much. I forgot to set string representation of the object. Its working

1 Like
83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?