I am studying JavaFX and I am also a newbie in Java. (I am using Java8 in Windows.)
Sample code is like below.
XYChart.Series series1 = new XYChart.Series();
eries1.setName("남자");
series1.setData(FXCollections.observableArrayList(
new XYChart.Data("2015", 70),
new XYChart.Data("2016", 40),
new XYChart.Data("2017", 50),
new XYChart.Data("2018", 30)
));
In this code, I can see a warning. That is,
Unchecked call to 'Data(X, Y)' as a member of raw type 'javafx.scene.chart.XYChart.Data'
Though the code works, I want to remove this warning because I am weak at Java generics programming and want to learn more about it through sample code.
What is the right way of removing that warning?
Thank you.