Formal Techniques for Java-Like Programs