Given a string input, write a program to replace every appearance of the word “is” by “is not”.
If the word “is” is immediately preceded or followed by a letter no change should be made to the string.
Input and Output Format:
Input consists of a String.
The output consists of a String.
Sample Input 1:
This is just a misconception
Sample Output 1:
This is not just a misconception
Sample Input 2:
Today is misty
Sample Output 2:
Today is not misty
Convert a string into the negative string in Java.
public class Sort
public static void main(String  args)
Scanner sc= new Scanner(System.in);
String n=str.replaceAll(" is ", " is not ");