Use Java as the programming language
Write a class, xxxx Stringi (where xxxx is your Kean id), with a main method. Include the following: o Using the methods of String produce the output in the following slide. o You must use the methods indicated on the slide following the output Declare a String variable in your class. The content of the String is Kean University Using the String and the methods of the String class, print the following lines. 1) The number of characters is 15 2) The String in lower case is kean university 3) The String in upper case is KEAN UNIVERSITY 4) The first 6 characters of the String is Kean U 5) The rest of the characters in the String are niversity 6) The U in the String is at position 5 7) The u in the String is at position – 1 8) The o in the String is at position – 1 9) A new String where University is replaced with U Kean U 10)The original String has not changed Kean University For each line use the methods to the right of the line: 1) The number of characters is 15 (length) 2) The String in lower case is kean university (toLowerCase) 3) The String in upper case is KEAN UNIVERSITY (toUpperCase) 4) The first 6 characters of the String is Kean U (substring) 5) The rest of the characters in the String are niversity (substring) 6) The U in the String is at position 5 (indexOf) 7) The u in the String is at position – 1 (indexOf) 8) The o in the String is at position – 1 indexOf) 9) A new String where University is replaced with U Kean U (replace) 10)The original String has not changed Kean University (none) Show transcribed image text Write a class, xxxx Stringi (where xxxx is your Kean id), with a main method. Include the following: o Using the methods of String produce the output in the following slide. o You must use the methods indicated on the slide following the output Declare a String variable in your class. The content of the String is Kean University Using the String and the methods of the String class, print the following lines. 1) The number of characters is 15 2) The String in lower case is kean university 3) The String in upper case is KEAN UNIVERSITY 4) The first 6 characters of the String is Kean U 5) The rest of the characters in the String are niversity 6) The U in the String is at position 5 7) The u in the String is at position – 1 8) The o in the String is at position – 1 9) A new String where University is replaced with U Kean U 10)The original String has not changed Kean University For each line use the methods to the right of the line: 1) The number of characters is 15 (length) 2) The String in lower case is kean university (toLowerCase) 3) The String in upper case is KEAN UNIVERSITY (toUpperCase) 4) The first 6 characters of the String is Kean U (substring) 5) The rest of the characters in the String are niversity (substring) 6) The U in the String is at position 5 (indexOf) 7) The u in the String is at position – 1 (indexOf) 8) The o in the String is at position – 1 indexOf) 9) A new String where University is replaced with U Kean U (replace) 10)The original String has not changed Kean University (none)
Expert Answer
Answer to Write a class, xxxx Stringi (where xxxx is your Kean id), with a main method. Include the following: o Using the methods…