Note : Use enum instead of 'public static final String variable ' ========= import java.io.Serializable; import java.util.HashMap; enum UserCredential{ LOGIN , PASSWORD , TOKEN , USERNAME ; } public class TestClass1 { public static void main(String[] args){ System. out .println( "--------Hello---------" ); System. out .println( "--------" +UserCredential. LOGIN + "---------" ); HashMap<UserCredential, String> map = new HashMap(); map.put(UserCredential. LOGIN , "India" ); System. out .println( "--------" +map.get(UserCredential. LOGIN )+ "---------" ); } } ============== =========== ======== ====== ==== Enums in java are mainly used for grouping similar kind of constants as a one unit. constants means static and final. Enums are introduced in JDK 1.5 onward. Before that similar kind of constants are grouped by decla...
1. project UI Requirement on particular page . like - A) No. of view in particular Activity. B) Advance feature added - which need to learn C) Toughest part D) Partiular 2. Navigator Class 3. App Preference (Shared Preference) 4. CONSTANTS/ENUM - Shared Pref Constants, Activiy Name, 5. Error Handle Class 6. Progreess Class 7. Custom Dialog
Comments
Post a Comment