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.

CORE API / NOTES</>↗
Core API06 May 2010

How do I append and replace content of a StringBuffer?

A StringBuffer is like a String, but can be modified. StringBuffer are safe for use by multiple threads. The methods are synchronized where necessary so that all the operations on any particular instance behave as if they occur in some serial order that is consistent with the order of the method calls made by each […]

Wayan · 2 min read
JDBC / NOTES</>↗
JDBC05 May 2010

How do I set the fetch size of a statement?

Fetch size is the number of rows that should be fetched from the database on a single database network trip. When more rows are needed, another request is sent by the application to the database server. Setting the correct fetch size will help our program to perform better by reducing the network communication generated between […]

Wayan · 2 min read
CORE API / NOTES</>↗
Core API02 May 2010

How do I insert a string to a StringBuffer?

package org.kodejava.lang; public class StringBufferInsert { public static void main(String[] args) { StringBuffer buffer = new StringBuffer("kodeava"); System.out.println("Text before = " + buffer); // |k|o|d|e|a|v|a|…. // 0|1|2|3|4|5|6|7|… // // From the above sequence you can see that the index of the // string is started from 0, so when we insert a string in // […]

Wayan · 1 min read
CORE API / NOTES</>↗
Core API02 May 2010

How do I remove some characters from a StringBuffer?

The example below show you to remove some elements of the StringBuffer. We can use the delete(int start, int end) method call to remove some characters from the specified start index to end end index. We can also remove a character at the specified index using the deleteCharAt(int index) method call. package org.kodejava.lang; public class […]

Wayan · 1 min read
CORE API / NOTES</>↗
Core API29 Apr 2010

How do I get char value of a string at a specified position?

The chartAt() method of the String class returns the char value at the specified index. An index ranges from 0 to length() – 1. If we specified an index beyond of this range a StringIndexOutOfBoundsException exception will be thrown. These method use zero based index which means the first char value of the sequence is […]

Wayan · 2 min read
REGEX / NOTES</>↗
Regex28 Apr 2010

How do I determine if a string match a pattern exactly?

If you want the entire string to match your regular expression pattern you can use the Matcher.matches() method. This method will return true if and only if entire input string matches with the matcher’s pattern. If the pattern only needs to match the beginning of the string you can use the Matcher.lookingAt() method. You can […]

Wayan · 2 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.