A method in Java that returns a number between 0 and 3:
Or is there more to the assignment than this? Did you mean a random number between 0 and 3? If so, then have a look at the API documentation for class java.lang.Math. It contains a method to generate random numbers. Or look at the documentation of class java.util.Random.
It sounds like a very simple exercise. Can explain in more detail what you don't understand about it?
Here is a part from this page that I'd like to draw your attention to :
We would much rather see you post your own code, working or not, and give you tips to help you get it working or point you toward resources that will help you to learn how to solve your problem using best practices.