add funcations threads with-java demo