Sorting Variables and negated Variables in Java
===

how to sort variables X and negated varibles X' which are saved as string in Java?

    Example: String string = B*A'*D*H'; ->
             String sortedString=A'*B*D*H';