I just started using jshell in intellij idea community version. When I write the below code in jshell, it works.
List<String> list = List.of("a", "b", "c");
System.out.println(list);
However the same code doesn't work in intellij. It says "Expression expected". It executes fine but shows that there is error with List<String>
. The problem is "auto-complete" doesn't work. To workaround this issue, we can use raw type but I want a generic one. Is there something that I am missing? How can I write a generic type?