Answer:
Many new developers do not concentrate on prefixes of the variable declarations. But these initialization plays a major role because for large projects a single module will not be handled by a single individual so it must be generic that every one in the team should understand for what purpose a particular variable has been declared by just reading its name itself. So these are the generic steps to initialize variables.
------------------------------------------------------------------------------------------
Data Type---------------Example---------------Prefix
------------------------------------------------------------------------------------------
Boolean ------------------------ blnResult ------------------- bln
Byte ------------------------ bytYes ------------------- byt
Char ------------------------ chrSelect ------------------- chr
Date ------------------------ datStart ------------------- dat
Double ------------------------ dblSalary ------------------- dbl
Decimal ------------------------ decAverage ------------------- dec
Integer ------------------------ intStdid ------------------- int
Long ------------------------ lngValue ------------------- lng
Single ------------------------ sglStock ------------------- sql
Short ------------------------ shoShort ------------------- sho
String ------------------------ strEmpName ------------------- str
Object ------------------------ objSource ------------------- obj
Asked In: Many Interviews |
Alert Moderator