add java small program

Signed-off-by: yfcheng <18912964525@163.com>