How to use fractions?
I'm a beginner at Java and I'm currently doing it in school in a programming course. Over the weekend our class have got a homework which consists of some different things. One of them is to compare two fractions and then use compareTo to decide which one of them is the biggest. The problem is that we haven't learned yet how to use fractions.
The only thing I wonder is how to create a simple fraction. Whenever I try to do what I have read on the Internet in guides it doesn't work (it say: cannot resolve class) or the code is too advanced and long for a beginner like me.
I would really appreciate if someone could help me with how to create fractions.
P.S. English isn't my main language so I'm sorry if I have explained my question badly D.S.

