I'm not sure what exactly your problem is. Some things to keep in mind when posting:
1) Use proper English when posting, abbreviations only restrict those who are trying to assist you.
2) State your problem specifically.
3) Any error messages you're receiving.
4) What your desired outcome is.
5) Use code tags when posting code.
If your problem is outputting a random number between 0 and 9, that's easy and judging by your code, I find it hard to believe you don't know this.
double num = Math.random() * 10;
System.out.println((int)num);
Then again, I'm probably misinterpreting what your problem is, please follow the rules(of many-see the FAQ) listed above.