why in all demos and tutorials in SQLiteOpenHelper class variables always: public static final
Take a look:
public static final String ORDER_ID = "order_id"; public static final String ORDER_LOGIN_NAME = "login_name"; public static final String ORDER_RESTO_U_NAME = "resto_uniqe_name";
My question is: I am making an application and its database is too large. Thus, I will have to make up at least 60-70 variables of this kind. Will this affect application performance? Since these are static variables.
Any help would be greatly appreciated ....
final , since the value of the variable cannot be changed, further change cannot be changed or changed
public final static String, String, ( , ).
public final static
1) , . . - - .
2) , . , .
, , , , . ! public static final String ORDER_ID = "order_id"; , !
public static final String ORDER_ID = "order_id";
, public private package - , final static - Android-, : http://developer.android.com/training/articles/perf-tips.html#UseFinal
public
private
package
final static
:
static int intVal = 42; static String strVal = "Hello, world!";
, , . 42 intVal strVal. , .
"final":
static final int intVal = 42; static final String strVal = "Hello, world!";
, dex. , intVal, 42, strVal " " .
Source: https://habr.com/ru/post/1532791/More articles:Fatal Exception: unknown error (code 14) could not open the database - androidSimulate animation inside a custom view on Android - androidHow to use AFNetworking 2.0 synchronously - objective-cRich Text Editor code with undo, redo, bulleted list in android - android"Объект не поддерживает это свойство или метод" ошибка - JQuery - javascriptFM radio live with phone in android - androidConvert Virtualbox VM to Amazon AMI - amazonNode JS avoids the painstaking addition of "strict use" to all my files - javascriptКак я могу подключиться к owncloud с помощью python с помощью easywebdav? - pythonPyDrive and Google Drive - automate the verification process? - pythonAll Articles