samedi 15 février 2020

Builde Design Patterns variables [duplicate]

So when we make a builder some people declares variables of the outer class final. Why some people makes the variables of Book class final

public class Book{
private final String author; // or some people write private String author
public static class BookBuilder{}
} 

I've tried to search but there isn't any information about it!!

Aucun commentaire:

Enregistrer un commentaire