
String s = "1,2,3,4,5,6,7,8,";
//goal: how to delete the last one ","
s = s.substring(0, s.length() - 1);
System.out.println(s);
Read More:
- Java: How to Find the Minimum Value from a Random Array by Bubble Sort Method
- JAVA: Random access file is always garbled
- Asynchronous callback case of Java callback function
- Java error prompt….. cannot be resolved
- Java — for loop printing graphics (loop structure)
- Explicit and implicit conversion of Java data type
- How to convert a Java string into a number (stringtonumber)
- Comparison between ArrayList and HashMap
- Ternary operator in Java?: error: not a statement
- Abstract method and static method of java interface
- JAVA: How to use the third-party font library method (using the third-party TTF / TTC font library method)
- [How to Fix]java.sql.SQLException: Incorrect string value: ‘\xF0\x9F\x98\x82\xF0\x9F…’
- JAVA 8: How to Convert List to Map
- Java callback function implementation case
- Redis: How to Implementate LRU Caching Mechanism Manually
- Mongodb java version 3.X, prompt “XXX (an encryption algorithm) is not available” when there is a user name and password
- Twitter’s distributed self increasing ID algorithm snowflake (Java version)
- Java error: unable to find or load main class (package name in source file)
- JAVE: LeetCode(189) Rotate Array
- Exception information: jsonmappingexception: out of start_ ARRAY token