Guest User

Untitled

a guest
Nov 23rd, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.69 KB | None | 0 0
  1. import javax.swing.JOptionPane;
  2. public class Time2
  3. {
  4.     public static void main(String[] args)
  5.     {
  6.             // separates the hours line from the minutes line.
  7.         System.out.println("Line 1\nLine 2 ");
  8.     // shows how many minutes there are on the job.
  9.         int minutes = 60;
  10.         System.out.print(" minutes on a job ");
  11.         System.out.println(minutes);
  12.     // shows how many hours were worked on the job.
  13.         int hours = (minutes / 60);
  14.         System.out.print(" hours on a job ");
  15.         System.out.println(hours);       
  16.     //makes it interactive
  17.         String result;
  18.         result = JOptionPane.showInputDialog(null, "How many minutes did you work?");
  19.         JOptionPane.showMessageDialog(null, "here you are. " + result + "Thanks");
  20.  
  21.         }
  22. }
Add Comment
Please, Sign In to add comment