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.

BASIC / NOTES</>↗
Basic02 Jul 2010

How do I use the shift left “

The signed shift left operator << shifts a bit pattern to the left. This operator operates with two operand, the left-hand operand to be shifted and the right-hand operand tells how much position to shift. Shifting a 0010 bit pattern using the << operator 2 position will produce a 1000 bit pattern. The signed shift […]

Wayan · 1 min read
BASIC / NOTES</>↗
Basic02 Jul 2010

How do I use the unary bitwise complement “~” operator?

The unary bitwise complement operator (~) inverts a bit pattern; it can be applied to any of the integral types, making every 0 a 1 and every 1 a 0. For example, an integer contains 32 bits; applying this operator to a value whose bit pattern is 00000000000000000000000000001000 would change its pattern to 11111111111111111111111111110111. package […]

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

How do I remove elements from Deque?

This example shows you how to remove some elements from the Deque object. We can use the following methods for removing elements from Deque: remove(), remove(Object o), removeFirst(), removeLast(). package org.kodejava.util; import java.util.Deque; import java.util.LinkedList; public class RemoveDequeDemo { public static void main(String[] args) { Deque<String> deque = new LinkedList<>(); deque.add("A"); deque.add("B"); deque.add("C"); deque.add("D"); deque.add("E"); […]

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

How do I add elements into a Deque?

To add elements into a Deque object we can use the add(), addFirst() and addLast() method call. package org.kodejava.util; import java.util.Deque; import java.util.LinkedList; public class DequeAddElement { public static void main(String[] args) { // Create an instance of Deque using LinkedList class. Deque<String> deque = new LinkedList<>(); // Insert a word into the Deque deque.add("jumps"); […]

Wayan · 1 min read
CORE API / NOTES</>↗
Core API28 Jun 2010

How do I create a java.util.Hashtable and iterates its contents?

The code snippet shows you how to create and instance of Hashtable that stores Integer values using a String keys. After that we iterate the elements of the Hashtable using the Enumeration interface. package org.kodejava.util; import java.util.Enumeration; import java.util.Hashtable; public class HashtableDemo { public static void main(String[] args) { // Creates an instance of Hashtable […]

Wayan · 1 min read
CORE API / NOTES</>↗
Core API23 Jun 2010

How do I create Deque using ArrayDeque class?

This example show you how to create a Deque using the ArrayDeque implementation. The ArrayDeque stores its elements using an array. If the number of elements exceeds the space in the array, a new array will be allocated, and all elements moved the new allocated array. In the code below we initiate the size of […]

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