Legend of mir in Java language