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"};

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

1 Expert Approved Answer
Step: 1 Unlock

Heres an example demonstrating the assertion error and the subsequent print statement public class W... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!