I have no experience in stats and I was wondering if this problem can be solved using stats instead of creating a java program. Can someone please help me. I am trying to find out how many 4 digits numbers exist that have the same digit repeated in that number twice. And how many 4 digits numbers exist that have the same digit repeated in that number three times. For example: 5797: The digit 7 appears twice 0410: The digit 0 appears twice 3888: The digit 8 appers three times So I want to know how many times the digit is repated twice and how many times the digit is reapted three times in the range from 0000-9999. Can somoene please help me.