Skip to content
Advertisement

How write path to file properties?

I wrote a program with two language. I created a file resources_in.properties. When I attempted to get properties from the file, I got the error: Exception in thread “main” java.lang.NullPointerException at java.util.Properties$LineReader.readLine(Properties.java:434) at java.util.Properties.load0(Properties.java:353) at java.util.Properties.load(Properties.java:341) at com.rd.java.basic.practice.Helper.getProper(Part5.java:18) at com.rd.java.basic.practice.Helper.main(Part5.java:27) I think it is because I have an incorrect path to properties. resources_in.properties is located at MyAppsrcmainresources_in.properties. The main class

The list is not filled

I am trying to nest data into a list, which I also add to another list. The challenge is to get a list of nested lists of data. But in the end, I get empty nested lists. What am I doing wrong? Answer At the end of your for loop you’re clearing listDataOne and since listData has the same list

JPA SQL Result Mapping

my code is mapping query result to DTO using Sql Result Mapping and create list with these dtos but in my database id can be null and it gives me trouble in mapping. That’s why I don’t want to use it instead of that, is there any way to generate id’s for these dto’s not getting them from sql query?

Advertisement