
Posted In: Java Core, String
When to use StringBuilder vs String concatenation
Most of the discussions say that for few fields String concatenation is fine. If code is looping then do use StringBuilder. Use StringBuilder for following kind of code There is slight different issue with this may be approach. Applications which go through various static code analysis tools should always use StringBuilder append than String concatenation. […]
Read More
Posted In: Caching, Java Core
Do not forget to add serialVersionUID in your POJO
What is a serialVersionUID and why should developer use it in POJO? Why developer should always add serialVersionUID in POJO. In an enterprise application sooner than later you will start using some caching mechanism. Any changes in POJO even if very small can change UID. In such cases all your cached objects will not work. […]
Read More
Posted In: Date, Java Core
Parsing ISO 8601-compliant String to java.util.Date
Best way to parse an XML dateTime in Java Techniques used 1. JODA Time 2. JAXB
Read More
Posted In: Java Core, String
How to convert a String to an int in Java
Techniques used 1. Using Integer Class 2. Using BigInteger Class 3. Apache Commons IOUtils 4. Guava library
Read More
Posted In: IO, Java Core
How to create a Java List from the contents of a file
Techniques used 1. Before JDK 7 using BufferedReader 2. Using JDK 7 Files 3. Apache Commons IOUtils 4. Guava library
Read More
Posted In: IO, Java Core
How to create a Java string from the contents of a file
Techniques used 1. Before JDK 7 using BufferedReader 2. Using JDK 7 Files 3. Apache Commons IOUtils 4. Guava library
Read More
Posted In: Java Core, String
How do I compare strings in enterprise java application
This is one of the highest viewed question on Stack Overflow (String compare) Though question is more related to ‘==’ vs equals there are more things developer should do while comparing Strings. Null check Most of the Null pointer exception in an application may be caused due to following kind of code To avoid this […]
Read More

Posted In: Database, MySQL
MySQL table names are case sensitive
I have own product called www.labworkflows.com. After moving application from my Windows local environment to Linux CentOS server I observed lot of my queries stopped working. e.g. select * from LABTESTS works on Windows default MySQL installation but dis not work on CentOS. After digging more into it observed that scripts that I generated through […]
Read More- Apache (13)
- Build Tools (2)
- Gradle (2)
- Caching (1)
- cpanel (1)
- cURL (1)
- Database (7)
- Hibernate (5)
- Java Core (38)
- Java Script (15)
- Bootstrap (1)
- File Upload (7)
- jQuery (3)
- React (3)
- JEE (13)
- JSON (41)
- GSON (13)
- Jackson 1X (1)
- Jackson 2X (12)
- jsoniter (1)
- Logging (2)
- Apache Commons Logging (1)
- Apache Log4J (1)
- Logback (1)
- SLF4J (1)
- MongoDB (1)
- OS (1)
- Linux (1)
- Security (5)
- Server (4)
- Tomcat (4)
- Service (2)
- Micro (2)
- Spring (46)
- Pattern (2)
- Spring Boot (20)
- Spring Data (4)
- Spring MVC (8)
- Spring REST (13)
- Spring Security (7)
- Testing (11)
- XML (5)
- JDOM XML Parser (1)