1. If Java Strings are immutable and StringBuilder is mutable why they wasting same ammount of memory in my code? stackoverflow.comI ran those code and I got some questions, this kinda got wierd. Using String:
Using StringBuilder:
|
2. Java: Which is the faster one and use less memory between StringBuilder.indexOf(str, index) and List.contains(o)? stackoverflow.comI have two file2 which contain texts. I need to have search to know which file of a given text belong. I have several ways in my mind to implement the search, ... |
3. StringBuilder memory consumption forums.oracle.comHi, I am using StringBuilder to build a long string and I had noticed in windows task manager that the javaw process takes a lot more memory than I had expected. For example, writting the following class: public class testStringBuilder { static String TEXT = "1000000"; private static StringBuilder str = new StringBuilder(60000000); public static void main(String[] args) { for (int ... |