SupportWriter space ↗
REFERENCE LIBRARY

References from other publishers

Republished articles with source attribution. This collection is separate from Diary Coding’s original guides and does not display ads.

Read original guides → · Editorial policy

FOR YOUR CURIOSITY

Latest notes.

2D API / NOTES</>↗
2D API20 May 2012

How do I draw a line in Java 2D?

The following code snippet show you how to draw a simple line using Graphics2D.draw() method. This method take a parameter that implements the java.awt.Shape interface. To draw a line we can use the Line2D.Double static-inner class. This class constructor takes four integers values that represent the start (x1, y1) and end (x2, y2) coordinate of […]

Wayan · 2 min read
SPRING CORE / NOTES</>↗
Spring Core13 May 2012

How do I wire / inject a null value in Spring?

To wire or inject a null value into a bean we can use the <null> element. The configuration below show you how to do it in the Spring configuration file. You might need to wire a null value for instance when you want to override a value that was autowired into a bean. As you […]

Wayan · 2 min read
SPRING CORE / NOTES</>↗
Spring Core10 May 2012

How do I inject collections using props element in Spring?

This time we will demonstrate how to inject a java.util.Properties. This class store a key-value pairs of data where the key and the values are both in string. You can use the <props> element to wire a property collections. The bean we use in this example is taken from the previous example How do I […]

Wayan · 3 min read
SPRING CORE / NOTES</>↗
Spring Core10 May 2012

How do I inject collections using map element in Spring?

In this example you will see how to wire map collections. For this purpose we can use the <map> element in the Spring configuration file. This element declares the java.util.Map. We will reuse the bean that we use in the previous example How do I inject collections using list element in Spring?. The <map> element […]

Wayan · 3 min read
SPRING CORE / NOTES</>↗
Spring Core09 May 2012

How do I inject collections using set element in Spring?

In this example you will see how to use the <set> element to wire a collection property of a bean. We will reuse the bean that we use in the previous example How do I inject collections using list element in Spring?. The Album bean have a songs property that have a type of java.util.List. […]

Wayan · 5 min read
SPRING CORE / NOTES</>↗
Spring Core09 May 2012

How do I inject collections using list element in Spring?

The following example show you how to use the <list> element to wire collection property. We can use it to wire property of either arrays or some implementation of java.util.Collection such as java.util.ArrayList. For this example we will create a bean called Album that have a collection of Song beans in it. So here is […]

Wayan · 4 min read
✳

Knowledge grows when shared.

Stay curious. There is always something new to learn.

Explore notes ↗
Putu Adi Guna Permana
ABOUT THE AUTHOR

Dr (C). Ir. Putu Adi Guna Permana, S.Kom., M.Kom., IPM., ASEAN Eng.

Writer and founder of Diary Coding — sharing notes, tutorials, and experiences about programming for anyone who wants to keep learning.