List<String> info = Arrays.asList(name,company,price,destination,password);
System.out.println(info);
I'm making a program to take in these String and I need them in a list but don't wanna add:
info.add(name);
for every single one that way in the future I can do the same without having this issue. When I run it I get this error:
List<String> info = Arrays.asList(name,company,price,destination,password);
^
symbol: class List
location: class main
1 error
error: compilation failed
Anyone have a fix?