This document contains code for an Employees class with fields to store employee details like name, position, gender, and salary. It defines a printDetails() method to output this information.
In the main method, two Employee objects are created - marcus and naruto. For marcus, the fields are directly assigned, while for naruto a fillDetails() method is used to populate the fields by passing parameters. Both objects then call printDetails() to output their information.
This document contains code for an Employees class with fields to store employee details like name, position, gender, and salary. It defines a printDetails() method to output this information.
In the main method, two Employee objects are created - marcus and naruto. For marcus, the fields are directly assigned, while for naruto a fillDetails() method is used to populate the fields by passing parameters. Both objects then call printDetails() to output their information.
This document contains code for an Employees class with fields to store employee details like name, position, gender, and salary. It defines a printDetails() method to output this information.
In the main method, two Employee objects are created - marcus and naruto. For marcus, the fields are directly assigned, while for naruto a fillDetails() method is used to populate the fields by passing parameters. Both objects then call printDetails() to output their information.