I am trying to add the units to my println in Java what I ha

I am trying to add the units to my println in Java, what I have so far is

System.out.println(\"The projectile velocity is \" +decf.format(Vel));

When I give its input, its giving out

But in reality its supposed to have units such as

How do I add the units?

Solution

System.out.println(\"The projectile velocity is \" +decf.format(Vel) + \"feet per second\");

The above command will have the unit also with the answer

I am trying to add the units to my println in Java, what I have so far is System.out.println(\

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site