Capgemini Engineering interview question

Create a program to character counter of a string using java 8?