Account[] acc = new Account[]{
new Account(200.0, 100, "SSUET1", 's'),
new Account(300.0, 101, "SSUET2", 's'),
new Account(400.0, 102, "SSUET3", 's'),
new Account(500.0, 103, "SSUET4", 'c'),
new Account(600.0, 104, "SSUET5", 'c')
};
On Mon, Jan 31, 2022 at 4:22 P
Yes,
or like
Account[] acc = new Account[]{
acc[1] = new Account(200.0, 100, "SSUET1", 's'),
acc[2] = new Account(300.0, 101, "SSUET2", 's'),
acc[3] = new Account(400.0, 102, "SSUET3", 's'),
acc[4] = new Account(500.0, 103, "SSUET4", 'c'),
acc[5] = new Acco
Hello,
public class RButtArrListJFrame extends javax.swing.JFrame {
public void RButtArrListJFrame () {
ArrayList al_allAcc = new ArrayList<>();
//ArrayList al_sav = new ArrayList();
DefaultListModel model = new DefaultListModel<>();
Account[] acc = new Acc
Or add braces around the assignments to make an initialization block:
{
acc[0] = new Account(200.0, 100, “SSUET1”, ’s’);
acc[1] = new Account(300.0, 101, “SSUET2”, ’s’);
acc[2] = new Account(400.0, 102, “SSUET3”, ’s’);
acc[3] = new Account(500.0, 103, “SSUET4”, ’c’);
acc[4] = new Account
Same error as before.
At the class level, each line must start with a type. You need to move the
assignments to the array element to the constructor or inside curlies
directly behind the array declaration.
Acoounts[] acc = new Account[] { new Account(),} ;
On Mon, Jan 31, 2022, 04:54 Zul