Quantum Cryptography (QKD) uses the laws of Quantum Mechanics to create new cryptographic primitives. Precisely, this technique is based on two laws of quantum mechanics, namely uncertainty principle and no-cloning theorem. The best known QKD is the BB84 protocol published by Bennett and Brassard in 1984. Since then, various QKD protocols have been developed for example a B92 protocol. This latter is similar to that of BB84but this time using only two non-orthogonal states of the four states of BB84. In this work, we develop the java simulation B92 protocol and we give some details of the implementation. Next, we show by an example how Alice (Initiator) can configure the protocol parameters before execution. Finally, we give the statistical results allowing to compare this protocol with that of BB84.