programming-examples/java/Basics/Account.java

24 lines
571 B
Java
Raw Normal View History

2019-11-18 14:44:36 +01:00
Account
package com.ack.learning.examples.account;
public class Account {
public Account() {
System.out.println( "created an account object" );
}
public Account( String name ) {
System.out.println( "created account -> " + name );
}
public Account( String name, double amount ) {
System.out.println( "account " + name + " with " + amount );
}
public static void main( String[] args ) {
Account lloyds = new Account();
Account tsg = new Account( "barry" );
Account hsbc = new Account( "jerry", 25d );
}
}