If I have an Employee
class with a default constructor:
private String firstName;
public Employee(){}
and a setter:
(employee = new Employee()).setFirstName("John");
performs instantiation and calling the setter, as you requested in the headline, but does not declare the variable as suggested in your code example.
(Employee employee = new Employee()).setFirstName("John");
will probably not work, I assume. But you can try.
Of course, you can always stuff multiple statements in one line.
Employee employee; (employee = new Employee()).setFirstName("John");
or
Employee employee = new Employee(); employee.setFirstName("John");
If I were you, I would settle for a parameterized constructor, though.