Sometimes there is a need to create a complex object in application. The one solution for this is a Factory pattern, the another one is a Builder design pattern. In some situation you even can combine these two patterns. But in this article I want to examine the Builder design pattern. The first thing which I need to say that it is a creational pattern.
There are lot of articles in the internet about design patterns. Most part of them, probably 99%, are based on GoF book. The book is describing recurring solutions to common problems in software design. I want to make my own contribution to this area in a context of Java. I don't pretend to be a professor in this area, so everything I will write in the first turn just for me, to make a clear organization of all this stuff. I will be very appreciated if this set of articles will help someone except me.
Today I want to publish one java exercise, which I got today in the interview. It was my old idea to set up on my blog category with java exercises. So it's a good time to start doing this. All exercises will be published with solutions, so you will be able to see the results or to suggest your own ideas in the comments.
This post will shortly introduce to you all known Java loops: for, while, do while, for each. Yes-yes, Java as many other programming languages has its own loop constructions. So the time has come to find out or just remind you how can every above mentioned loop be used.