Skip to content
Advertisement

Tag: record

default values for record properies

If I have a Java record with 2 properties and I want to define default values for the properties which should be used instead of null. I can either override the getters Or I can achieve much the same thing by overriding the default constructor Both of these seem a bit verbose, is there a more concise way to assign

Add data to specific record in CSV file

I have a record in a CSV file and i am trying to add some extra info (a name) to the same specific record with the following code but it does not work. There is no error shown but the info i am trying to add just does not appear. What am i missing ? Answer Here the requirement is

Advertisement