Question: import java.util.Scanner; public class MatchChar { public static void main(String[] args) { Scanner scnr = new Scanner(System.in); String userInput; userInput = scnr.nextLine(); /* Your code
![import java.util.Scanner; public class MatchChar { public static void main(String[] args)](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f2e87b55dc1_25866f2e87ab2af3.jpg)
import java.util.Scanner;
public class MatchChar { public static void main(String[] args) { Scanner scnr = new Scanner(System.in); String userInput;
userInput = scnr.nextLine(); /* Your code goes here */ } }
Given string userInput, output "Matching" if the third character of userInput is 'i'. Otherwise, output "Not matching". End with a newline. Ex: If the input is: guitar then the output is: Matching Note: Assume the length of string userInput is greater than or equal to 3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
