Advertisement
Aminpro

Calling Time Class with Constructors.

Dec 29th, 2013
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.47 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. class apples{
  4.     public static void main(String args[]){
  5.        
  6.  
  7.         Tuna tunaObject = new Tuna();
  8.         Tuna tunaObject2 = new Tuna(5);
  9.         Tuna tunaObject3 = new Tuna(5, 13);
  10.         Tuna tunaObject4 = new Tuna(5, 13, 43);
  11.        
  12.         System.out.printf("%s\n", tunaObject.toMilitary());
  13.         System.out.printf("%s\n", tunaObject2.toMilitary());
  14.         System.out.printf("%s\n", tunaObject3.toMilitary());
  15.         System.out.printf("%s\n", tunaObject4.toMilitary());
  16.    
  17.     }
  18.  
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement