October 2017
Intermediate to advanced
396 pages
10h 2m
English
In the following code example, I am going to create an Account class that has AccountBuilder as an inner class. The AccountBuilder class has a method to create an instance of this class:
package com.packt.patterninspring.chapter2.builder.pattern; public class Account { private String accountName; private Long accountNumber; private String accountHolder; private double balance; private String type; private double interest; private Account(AccountBuilder accountBuilder) { super(); this.accountName = accountBuilder.accountName; this.accountNumber = accountBuilder.accountNumber; this.accountHolder = accountBuilder.accountHolder; this.balance = accountBuilder.balance; this.type = accountBuilder.type; ...Read now
Unlock full access