I want to add new info to my mysql database from my Java GUI. I have 3 textfields which takes info from user and have 1 checkbutton. I have to add these datas, however I have a query for it.
String query="insert into buses (busId,custname,custsurname,custid,seats)
values('"+busId+"','"+textfield_1.getText()+"','"+textfield_2.getText()+
"','"+textfield_3.getText()+"','"+checkbox[1].getName()+"')";
When I write it in Java button, compiler give me a error like this (busId should be final)
how can I solve this problem?