Question: Please write this method using Java the method String toString ( ) that returns a String containing all the data for one employee, i.e. the
Please write this method using Java
the method String toString ( ) that returns a String containing all the data for one employee, i.e. the employee number, name, department and salary on a single line. Use Java formatting, assuming a maximum of 6 digits for the employee number, 25 characters for the name, 15 characters for the department. The salary will have at most 6 digits before the decimal point and two digits after. All strings will be aligned on the left and the salary will be aligned on the right.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
