Question: import java.util.Scanner; Variable inputString is assigned with a 2 - character string read from input. If inputString's second character is alphabetic, output The second character

import java.util.Scanner; Variable inputString is assigned with a 2-character string read from input. If inputString's second character is alphabetic, output
"The second character is alphabetic: " followed by the alphabetic character. Otherwise, output
"The second character is not alphabetic." End each output with a newline.
Ex: If the input is 4 b , then the output is:
The second character is alphabetic: b
import java.util.Scanner;
public class StringChecker {
public static void main(String[] args){
Scanner scnr = new Scanner(
System.in);
String inputString;
inputString = scnr.nextLine();
/* Your code goes here */
}
}
public class CompareStrings {
public static void main(String[] args){
Scanner scnr = new Scanner(
System.in);
String userInput1;
String userInput2;
int lengthDifference;
userInput1= scnr.nextLine();
userInput2= scnr.nextLine();
}
System.out.println(lengthDifference);
import java.util.Scanner; Variable inputString is

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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!