12. Constants in Java
1. What is constant in java?
2. Ways to create constance.
3. What is enum?
4. Why was ENUM introduced in Java? Benefits of using.
5. ‘Classical’ constants vs enums.
6. Best practice to create, keep constances.
7. Constants in interfaces ? (YH)
13. Constructors and methods
1. What is a constructor?
2. Rules to define a constructor.
3. Default constructor.
4. Constructor chaining.
5. Constructor and method comparison.
6. A method signature, rules, best practice.
7. Overloading and overriding methods comparison, rules, best practice.
8. Exception handling in overloading and overriding.
14. Final keyword
1. Final class usage in java. Best practice.
2. Final vs Abstract class.
3. Final method rules, best practice.
4. Abstract method vs final method.
5. Final variable.
6. Does a final variable require initialization?
7. Blank final field.
8. Final parameters: when to use, best practice.
9. Final local variables rules, best practice.
15. StringBuffer, StringBuilder, String
1. What is String in java?
2. Ways to create a string.
3. Benefits of strings are immutable?
4. String constant pool.
5. StringBuilder important details.
6. StringBuilder vs String.
7. StringBuffer important details.
8. StringBuilder vs StringBuffer.
9. Best practice to choose between String, StringBuilder and StringBuffer.
10. What's the right way to compare two strings in Java? (AK)
11. What's the right way to perform a case-insensitive comparison of two strings in Java? (AK)
16. Equals/hashCode contract
1. Default behavior of equals and hashCode methods.
2. HashCode method overriding rules.
3. Equals method overriding rules.
4. A contract between Equals and hashCode methods.
5. Why are methods connected to each other? Describe the result of scenarios when one of them is overridden but the other not: side effects.
6. Difference between ‘==’ and equals.
7. Collections and equals/hashCode dependencies, best practice.
Do'stlaringiz bilan baham: |