Question: 2. Create an assertion error using the given field: {Friday, Saturday, Sunday}; String[] weekends a. Prove that there are only two (2) weekends in

2. Create an assertion error using the given field: {"Friday", "Saturday", "Sunday"}; String[] weekends a. Prove that there are only two (2) weekends in a week. 1. If the length of the weekends is not equal to 2, then the assertion error should be this: = "There are only two (2) weekends in a week." b. Lastly, print "There are 2 weekends in a week."
Step by Step Solution
There are 3 Steps involved in it
Heres an example demonstrating the assertion error and the subsequent print statement public class W... View full answer
Get step-by-step solutions from verified subject matter experts
