Advertisement
Guest User

Untitled

a guest
Apr 4th, 2020
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.46 KB | None | 0 0
  1. package Front_desk;
  2.  
  3. import java.util.*;
  4. import java.io.*;
  5. import java.lang.*;
  6.  
  7. public class DocTime {
  8.     private Formatter x;
  9.     String Docname, Doctym;
  10.    
  11.     void openFile () {
  12.        
  13.         try {
  14.             x = new Formatter("Doc time");
  15.         }
  16.        
  17.         catch(Exception e) {
  18.             System.out.println("You have an error");
  19.         }
  20.        
  21.     }
  22.    
  23.     void addRecord (String Docname, String Doctym) {
  24.         x.format("%s - %s", Docname, Doctym);
  25.     }
  26.    
  27.     void closefile() {
  28.         x.close();
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement