I am very new with list and such and am currently trying to learn them. I made a program using them and everything worked perfectly until i didn´t get to sorting numbers inside of the list. Now whenever I got to this part of the code it just stopped working:
if ((st.get(i))>(st.get(k))) {
int temp=st.get(k);
st.add(k,st.get(i));
st.add(i,temp);
}
Could you help me with what I did wrong and how to fix it?