I want to change the color of the input string into the green. User when type, it will be in the green color. I don't want to first enter the string and then change the color. Can anyone tell how to do this?
System.out.print("Please enter a sentence: ");
Scanner sc = new Scanner(System.in);
String s = sc.nextLine(); // I want to change the color to green when user typing the string