Question [Q] Android: A algorithm that goes through every possible character combination?

I want a algorithm for a program that goes through every possible ASCII character combination including numbers, characters and under some cases, special characters. I want this code in java. I tried thinking a lot but only possible solution for me was to create a web of loops.

The program doesn't know the string but the program has the find the string which user has entered by trying every possible character combination.