simple samples of java