I am new to Java and I am trying make the hashtags to adjust to my text. For example, if I write "message hello, how are you?" I want it to print with capital letters and that the hashtags adjust themselves depending on how many characters I print. Do you have any suggestions on what I can use to make this happen?
public void addMessage() {
System.out.println("Write message followed by a text: ");
String message = readString();
System.out.println("############################################################");
System.out.println("# #");
System.out.println("#" + message.substring(7).toUpperCase() + " #");
System.out.println("# #");
System.out.println("############################################################");
}