Skip to content

Instantly share code, notes, and snippets.

@chankok
chankok / countries.json
Last active Oct 5, 2016
A JSON file with a list of country names and country codes (ISO Alpha-2)
View countries.json
[
{
"name": "Afghanistan",
"code": "AF"
},
{
"name": "Albania",
"code": "AL"
},
{
View StringBufferExample.java
public class StringBufferExample {
public static void main(String[] args) {
StringBuffer strBuf = new StringBuffer();
// Append strings
strBuf.append("Welcome").append(' ').append("to").append(' ').append("Chankok.com");
System.out.println("Append strings : " + strBuf.toString());
View StringArrayToStringExample.java
package com.chankok.arrays;
import java.util.stream.Collectors;
import java.util.stream.Stream;
public class StringArrayToStringExample {
public static void main(String[] args) {
// Initial the string array