Java tutorial
//package com.java2s; import java.util.ArrayList; public class Main { private static ArrayList<String> getBigramms(String word) { ArrayList<String> result = new ArrayList<>(); if (word.length() > 1) { for (int i = 0; i < word.length() - 1; i++) { result.add(Character.toString(word.charAt(i)) + Character.toString(word.charAt(i + 1))); } } return result; } }