Question: Java. Use very basic java only, intro. Use input error checking by using hasNextInt(), NOT try-catch. Follow instructions carefully. Example of the error checking that
Java. Use very basic java only, intro. Use input error checking by using hasNextInt(), NOT try-catch. Follow instructions carefully.
Example of the error checking that is to be used: int value = 0; Scanner input = new Scanner(System.in); System.out.print("Enter a positive number: "); if(input.hasNextInt()) { //Check to see if the user entered a double value = input.nextInt(); //read in the double } else { System.out.println("Error! Please enter a number not text!"); input.nextLine(); //read in the String value from the user to clear it from buffer }

SAMPLE OUTPUT: 
Write a program that allows a user to enter a sentence and then the position of two characters in the sentence When the two characters are identical, the program should display the message
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
