this(name, age) must be in the first line of the constructor.
Since the Employee class defined two constructor, Employee class doesn’t have anymore no-argument default constructor.
The correct answer is E, there are no comments to make. There are errors in the instantiation of the constructor in the first class, and in the other class, which is the execution class, it is calling the constructor that has an error, so the class cannot be started because it is also in error. The 2 files do not compile.
upvoted 1 times
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
MPignaProTech
2 months, 2 weeks agojackymak
1 year, 7 months agoakbiyik
2 years, 1 month agocarloswork
2 years, 1 month agoanmoldev2java
2 years, 1 month agoiSnover
2 years, 3 months ago