Capgemini Engineering Interview Question

Given a string "sjine341", Write a Java program wherein 1 thread is sorting the string in ascending order and another thread is sorting it in descending order such that the 2 threads are in deadlock condition.