Relative Content

Tag Archive for javaoopaggregationcomposition

How are object attributes that are created inside the main class (constructor) destroyed by the java garbage collector

final public class CRMS{ private ArrayList<Car>cars; private ArrayList<Renter>renters; private ArrayList<Transaction>transactions; private int carid; private int renterid; public CRMS() { cars = new ArrayList<Car>(); renters = new ArrayList<Renter>(); transactions = new ArrayList<Transaction>(); carid=1; renterid=1; } public class main { public static void main(String[] args) { // TODO Auto-generated method stub System.out.println(“Hello World by the GOAT programmar”); […]