The code seems to show no errors yet when I run it, my ide shows a lang.nullpointerexception. I have no idea what is wrong or how to fix this problem. Thank you so much for taking the time to help me. Much appreciated.
String sql="Select cast(Sum(Copper) as varchar(255)) as sumcu from RawMaterials";
st=conn.prepareStatement(sql);
rs=st.executeQuery();
if(rs.next()){
String sum = rs.getString("sumcu");
sum_text.setText(sum);