Skip to content

Instantly share code, notes, and snippets.

@chankok
chankok / countries.json
Last active October 5, 2016 10:43
A JSON file with a list of country names and country codes (ISO Alpha-2)
[
{
"name": "Afghanistan",
"code": "AF"
},
{
"name": "Albania",
"code": "AL"
},
{
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());
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