I tried to do this question.But I can't take a right approach. This is the question:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~

It can be seen that the number, 125874 and its double ,251748 contain exactly the same digits,but in a different order.Write a java program to find to find & print the smallest positive integer "x",such as "2x,3x,4x,5x and 6x" contain the same digits.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~

I need to do it only using Arrays.(except in String method & regex).