programming-examples/java/_Basics/Transfer Account.java

25 lines
500 B
Java
Raw Normal View History

2019-11-15 12:59:38 +01:00
Transfer Account
package com.ack.learning.examples.account;
public class TransferAccount {
private static int count;
public TransferAccount() {
++TransferAccount.count;
}
public static int getObjectCount() {
return TransferAccount.count;
}
public static void main( String[] args ) {
TransferAccount ta = new TransferAccount();
TransferAccount da = new TransferAccount();
System.out.println( TransferAccount.getObjectCount() );
}
}