Java tutorial
//package com.java2s; public class Main { private static boolean containsOneWord(char c, String word) { char[] array = word.toCharArray(); int count = 0; for (Character ch : array) { if (c == ch) { count++; } } return count == 1; } }