Please explain this for me please? private List<> name(List<> model, String name)
Asked
Active
Viewed 240 times
-8
-
2Read the documentation. Also, that doesn't compile. – tnw Apr 05 '17 at 18:04
-
what is the error you are getting an what is the line of code that is getting the error? also you evaluate `not equal` as `!=` in java. – Jpsh Apr 05 '17 at 18:04
-
1@user3299379 `<>` does not mean `not equal` in this context - it refers to [generics](https://en.wikipedia.org/wiki/Generics_in_Java). – Quietust Apr 05 '17 at 18:05
-
That does not look like valid Java code. There should be some names between the `<>`. Make sure you copy it exactly as it as. – Thilo Apr 05 '17 at 18:05
-
you can read about the List [here](http://stackoverflow.com/a/6232041/7676637) – AwaisMajeed Apr 05 '17 at 18:06
-
@Heena Khan, the Tutorial would be the place to start, then the Javadocs and JLS. – Lew Bloch Apr 05 '17 at 18:27
1 Answers
0
private List<> name(List<> model, String name) is not a correct java code.
But in the idea you has a private method (function) called name that return a List. That function has 2 parameters : 1 list called model and 1 String call name.
Your problem : List of what ???
List if if the return of your function is a array of String.
Same problem with model, List of what ??

Youssouf Maiga
- 6,701
- 7
- 26
- 42