Java considers the String data type as non-primitive, because it contains a sequence of characters and hence there is a predefined class called String dedicated to String processing. The String class has a lot of functions and continues to grow. See https://www.tutorialspoint.com/java/java_strings.htm for more on strings. Your task is to then create a java program that when give a sentence will replace the first occurrence of NUST with Namibia University of Science and Technology. Sample run 1: Enter a sentence: Welcome to my NUST. Output: Welcome to my Namibia University of Science and Technology. Sample run 2: Enter a sentence: The nust is a great institution of high learning. Output: The Namibia University of Science and Technology is a great institution of high learning NB: IN JAVA PROGRAMMING
2. Java considers the String data type as non-primitive, because it contains a sequence of characters
and hence there is a predefined class called String dedicated to String processing. The String class
has a lot of functions and continues to grow. See
https://www.tutorialspoint.com/java/java_strings.htm for more on strings. Your task is to then create
a java program that when give a sentence will replace the first occurrence of NUST with Namibia
University of Science and Technology.
Sample run 1:
Enter a sentence: Welcome to my NUST.
Output: Welcome to my Namibia University of Science and Technology.
Sample run 2:
Enter a sentence: The nust is a great institution of high learning.
Output: The Namibia University of Science and Technology is a great institution of high learning
NB: IN JAVA
Step by step
Solved in 2 steps with 2 images