Fixed p6 josephus, and wrote java josephus