Write a program that uses a Scanner object to read in a stri…
Write a program that uses a Scanner object to read in a string. Convert to upper case using .toUpperCase() Print out all of the string except for the first 2 characters, then ‘-‘, then the first two characters. Assume the string entered is large enough to not cause an runtime error. Below is a sample run. enter a string: smileILE-SM Start with this code: import java.util.Scanner;public class WordChange { public static void main(String[] args) { Scanner scnr = new Scanner(System.in); System.out.print(“enter a string: “); // your code goes here }} Do not copy/paste the whole code, just write the missing code.