Skip to content
Advertisement

How to disable a button and clear an arraylist?

i have some button and arraylist, my button have condition

JavaScript

and textTotalFinalPrice set value to 0

but in my case , that function actually working BUT must be have 2 click to set value textTotalFinalPrice and disabling button.

if just 1 click ArrayList not clearing data

i have try list.clear(); still not working

code :

JavaScript

i will be appreciate your answer

Advertisement

Answer

Try using list = new ArrayList<>();

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement