Answer to Question #117 in Java | JSP | JSF for Tracy

Question #117
I wanted to know if this code was right and if not what needs to be fixed? public class Time { public static void main(String[] args) { int Time = 197; int hours=3; int minutes=17; { int hours =3; int left = 17; System.out.println("197 minutes is 3 hours and 17 minutes"); } // end class Time }
Expert's answer
No, your code is wrong. Try to use this:
public class Drive
{
public static void main(String[] args)
{
Time time = new Time();
time.setMinutes(197);
System.out.println(time.toString());

} // end class Drive
}
Try to combine our answers and you'll get a solution for your problem.

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS
paypal