3:44 pm - Thursday December 11, 4617

Tag Archives: trimToSize()

ArrayList Example Program for trimTosize()

/** *@Author: Candid.com *@Description: ArrayList Example Program For trimToSize and Contains */ import java.util.*; public class ArrLst { public static void main(String[] args) { ArrayList arl = new ArrayList(); arl.add("A"); arl.add("X"); arl.add("K"); arl.add("H"); arl.add("O"); Iterator...

StringBuilder Example Program for trimToSize()

//Example program for Trim to size /** * @author:candidjava.com * @description:used to reduce the empty space & storage size of Stringbuilder in java */ public class TrimToSize { public static void main(String[] args) { StringBuilder...

Stack Example Program for trimToSize()

/** *@author :CandidJava.com *@descriptions : This program explain the function and use of trimToSize() */ import java.io.*; import java.util.*; public class StackTrim { public static void main(String arg[])throws Exception { Stack...