Java Best Practices | String Best Practices | PART-2

preview_player
Показать описание
In this video, we will discuss following String best practices in Java:
1. Use StringBuilder or StringBuffer for string concatenations instead of the + operator
2. Compare Two String by equals() Method Instead == Operator
3. Call .equals() Method on Known String Constants Rather Than Unknown Variable
4. Prefer switch( ) Statement Instead of Multiple if-else-if
6. Use String Utility Classes
7 Avoid Duplicate Literals

#java #javaguides #bestpractices
Рекомендации по теме