## How to convert a decimal number into a fraction in java

Let’s say I give you a decimal number say 3.5 and ask it to convert it into a fraction. You will quickly give me the answer as 7/2 and prompt **“What’s the big deal in it”**.

But if I ask you to convert it using a java program, then??? It won’t be too easy right.

Well, it is pretty much easy….Read on !!! (more…)