You are declaring additional methods in your main method that you are not invoking. Remove the methods and just instantiate, initialize, and print all of your workers inside the main method.
Also, you are invoking getName without an instance of worker. You need something like this.
Worker worker = new Worker(//pass your parameter);
worker.getName();
Honestly, you are using the getter method incorrectly an appropriate getter should return the private variable or a small manipulation of it, not edit the parameter that you pass it.
This is a better getter:
public String getName() {
String temp[] = name.split("\\s");
char initial = temp[0].charAt(0);
String lname = temp[1];
return (lname + ", " + initial + ".");
}
This way you refer to the instance variable name that is private and not the parameter "name" that you originally pass into your method