//**********************************************************************************
// Declaring a static block 
// A static block is used to initialize static fields if program logic is needed                          
//**********************************************************************************
import java.util.Date; 
import java.text.SimpleDateFormat; 

class Employee 
{
    static String companyName  =  "XYZ inc.";               //static fields
    static int    employeeCount;
    static String date_time;                                //needs proper initialization

    String position;                                        //instance fields
    String lastname;
    String firstname;

    static                                                  //static block
    {
        Date curr_dateTime   = new Date();
//      System.out.println(curr_dateTime);                  //format: Day Mon dd hh:mm:ss TZ yyyy 

        SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd @ hh:mm:ss z");   //use HH for 24hour
        date_time = fmt.format(curr_dateTime); 
//      System.out.println(date_time);                      //format: yyyy-mm-dd @ hh:mm:ss TZ 
    }

    Employee(String title, String last, String first, String x, int old) {        // constructor
        position   = title;
        lastname   = last;
        firstname  = first;
        // etc.
    }
    // etc.
}



//*****************************************************************************
// Employee user class                          
//*****************************************************************************
public class EmployeeUser	
{
    public static void main(String[] args)
    {
        String dt = Employee.date_time;
        System.out.println("Date/Time: " + dt);
        
        Employee e = new Employee("dir","Sultan","Sam","M",50);

    }
}