What if you have an object without ID. How do you know if that object already exists in the database?
How to solve the Maven VM initialization error
When you do a simple Maven build and you get the following error:
How to format a website URL in Java
Most people want uniformity in their database. That is not always easy when you let the user enter data. Website URLs can come in all sizes. But how should you create an exactly uniform URL?
How to unit test a DAO class in Java
When you test a DAO class. It is possible you insert or update test data in your database. Of course, we don’t want that. There is a possibility to rollback the transaction when your test is completed.
We use EasyMock to do so.
Memory optimalization in Java – tips and tricks
The memory can be filled very quickly when you use many objects. That’s why it is necessary to think where you create your objects and what kind of objects you create.
How to change phone number layout with Java
Each country has its own phone number format. But what if you want a universal layout for all types of phone numbers? You can use Libphonenumber. With Libphonenumber, you can change phone layouts, create your own layouts, cast layouts and many more!
How to count a specific char from a String in Java
To count a specific char from a String, you can simply use the Spring framework.
How to unit test getters and setters in Java
It is possible to test getters and setters (properties) from your model class. Through a test class, it is done in no time.
How to unit test equals and hashcode
The equals and hashcode methodes are simple to test with JQNO.
How to unit test a web service
To test your web service, you can use Smock. Smock compares your request with the response by XML files. You just need a response.xml file with your response and a request.xml file with your request.