Here is my java demo.