Код следующего вида:
public class BankAccount {
int id;
String name;
double balance;
}
class BankAccountTest {
public static void main(String[] args) {
BankAccount MyAccount = new BankAccount();
BankAccount YouAccount = new BankAccount();
BankAccount HisAccount = new BankAccount();
MyAccount.id = 1;
MyAccount.name = "ZY";
MyAccount.balance = 12.35;
YouAccount.id = 2;
YouAccount.name = "BL";
YouAccount.balance = 3654.55;
HisAccount.id = 3;
HisAccount.name = "VL";
HisAccount.balance = 1662.35;
System.out.println(YouAccount.balance);
}
}
Выдает:
Error: Main method not found in class BankAccount, please define the main method as:
public static void main(String[] args)
or a JavaFX application class must extend javafx.application.Application