Category: Java

TwoSum

This sample code show how to achieve two distinct zero-based indices of any two of the numbers, whose sum is […]

Read More

Array, remove duplication

This tutorial show when passed two arrays of names, it will return an array without duplication. Approach 1: Approach 2: […]

Read More

Character Input, IsDigit

The following program ask for character input. 1 for all kind of character, the other only accepts digits. You’re required […]

Read More

String, Palindrome

Palindrome is a word that reads the same backward or forward. This simple program show how to do it.

Read More

Java8 Lambda

A block of code that can pass around and to be executed later once or multiple times.

Read More

Method Overload rules

Java allow method to be overloaded, but there is a rules to be followed. Rules: Match by type exactly, same […]

Read More

Primitive pass by value,

Primitive pass by value, object pass by reference? Not exactly true, preferable statement should be Java variable hold reference to […]

Read More

Java Array and ArrayList

Array key point: Not scalable, once constructed length cannot be change, When construct numeric primitive type, it will filled with […]

Read More