Blog: software cave

240 blogs updated: 69 min. ago
Enumerations in Java
Java supports enumeration types (in short enum) since Java 5. Enumeration is used to define a list of constants which can be later reference...
04-12-2021 16:10:03 software cave Beginners
Unexpected NullPointerException (NPE) in ternary conditional operator in Java
Sometimes I come across Java code that unexpectedly throws NullPointerException in ternary operator. It is especially surprising if this par...
07-10-2021 07:56:24 software cave Beginners
Create text file in Java with contents
Creating a text file (with given contents) is pretty straightforward task in Java. Recent Java versions and popular libraries like Apache Co...
05-10-2021 19:27:25 software cave Beginners
Immutable objects
Most of the objects in Java are mutable. It means that their state/fields can be changed after the object was created. The examples of those...
15-04-2018 18:23:16 software cave Beginners
Delete directory with contents in Java
Removing empty directory in Java is as simple as calling File.delete() (standard IO) or Files.delete() (NIO) method. However, if the folder ...
24-03-2018 10:34:47 software cave Beginners
How to delete file in Java
File management (good old CRUD: create, read, update, delete) is quite common operation in software development. In this short post I would ...
05-03-2018 16:13:06 software cave Beginners
Mapping a map of simple types in JPA using @ElementCollection
In the previous post I have shown how to easily map a collection (e.g. Set or List) of simple types in JPA. Today I would like to present ho...
05-03-2018 10:03:05 software cave Beginners
Mapping collection of simple type in JPA using @ElementCollection
JPA framework provides good support for mapping collections of value types. The value types can be either simple types like Integer or Strin...
11-02-2018 13:12:42 software cave Beginners
Importing WSDL with Java and Maven
SOAP web services are often used in commercial software. If we plan to use existing SOAP web service, we should receive a WSDL file which de...
18-02-2017 16:26:39 software cave Beginners
Objects utility class in Java
Today I would like to quickly mention java.util.Objects class. The JavaDoc documentation for this class says: This class consists of static ...
15-02-2017 16:45:22 software cave Beginners

© Jiri Pinkas | this project on GitHub | related: JavaVids | Maven Central Repository Search | Java školení

Top Java Blogs is a Java blog aggregator (with English-written blogs only) focused on Java SE, Java EE, Spring Framework and Hibernate.

Made better & faster using Java Profiler