The loan functional design pattern can be used to create resource-aware applications. With this pattern, we are not creating code that has to manage resources such as memory; rather, we want to control how the resources are used. Of key significance is ensuring that garbage collection occurs on our terms rather than waiting for Java's default garbage collection system to kick into action. In this section, we will look at an implementation example regarding file processing. Our example will include a look at file-processing source code before the loan design pattern is implemented, and then we will modify the code using the loan design pattern. We will see how the two approaches can be used with the same results.
United States
Great Britain
India
Germany
France
Canada
Russia
Spain
Brazil
Australia
Singapore
Hungary
Philippines
Mexico
Thailand
Ukraine
Luxembourg
Estonia
Lithuania
Norway
Chile
South Korea
Ecuador
Colombia
Taiwan
Switzerland
Indonesia
Cyprus
Denmark
Finland
Poland
Malta
Czechia
New Zealand
Austria
Turkey
Sweden
Italy
Egypt
Belgium
Portugal
Slovenia
Ireland
Romania
Greece
Argentina
Malaysia
South Africa
Netherlands
Bulgaria
Latvia
Japan
Slovakia