How to optimize string creation?By using string literals. Ex: File: StringPerformance .java Output: Time taken to create literal String : 9 ms Time taken to create Object String : 11 ms Hence, String creation using literals take less time. |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India