String variables are used whereever the use of variables is for throughout the application and hence that is why Sun by default has given String as immutable so that String variables used for various calculations in the program can be reused again and again.
But Whereas in the Case of Large SQL Statements you have to only use the statement once in the program and hence those variables memory space can be deleted and retrieved back if we use StringBuffer or StringBuilder, using there delete method,
Therefore LargeSql Statements must always be used in StringBuffer or StringBuilder.
whereas All the reusable variable be declared as String Variables
But Whereas in the Case of Large SQL Statements you have to only use the statement once in the program and hence those variables memory space can be deleted and retrieved back if we use StringBuffer or StringBuilder, using there delete method,
Therefore LargeSql Statements must always be used in StringBuffer or StringBuilder.
whereas All the reusable variable be declared as String Variables
No comments:
Post a Comment