Question: Given the following main method, replace the item with code that reads two words and checks for the first one having 5 characters and the
- Given the following main method, replace the item with code that reads two words and checks for the first one having 5 characters and the second one starting with z. You must use method-call chaining.
![public static void main(String [] args) { Scanner stdIn = new Scanner(System.in); System.out.println(](https://dsd5zvtm8ll6.cloudfront.net/images/question_images/1704/7/8/8/489659d02095e13d1704788487182.jpg)
public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); System.out.println("Can you follow instructions?"); System.out.println( "Enter two words, the first must have 5 characters" and the second must start with \"z\":"); if ( )
Step by Step Solution
3.50 Rating (153 Votes )
There are 3 Steps involved in it
In the main method you are required to read two words from the user input and check if the first wor... View full answer
Get step-by-step solutions from verified subject matter experts
