Use the StringBuilder object as shown below.
StringBuilder result = new StringBuilder();
result.append(someChar);
I want to put a text message that updates the line to the next line, how do I do it?
I said result.append("/n"); but it doesn't work? I think this is a new line text, no?
java string
result.append("\n"); You can say that. And more than this, result.append(System.getProperty("line.separator")); I recommend doing it this way. The line.separator is a system-independent wrap keyword (?) in Java. In Java 7, you can also write System.lineSeparator() like this.
© 2024 OneMinuteCode. All rights reserved.