hey guys,
I'm doing a small project which does some basic encryption and decryption, but I'm very new to Java and Eclipse is showing safety warnings but I have no idea what they mean or how I fix them. Here is the part of the code that's causing the problem:
These are the error messages:
Type safety: The constructor ArrayList(Colle ction) belongs to the raw type ArrayList. References to generic type ArrayList<E> should be parameterized.
Type safety: The expression of type ArrayList needs unchecked conversion to conform to ArrayList<Strin g>.
Can you please give me some tips on how to solve these problems?
I'm doing a small project which does some basic encryption and decryption, but I'm very new to Java and Eclipse is showing safety warnings but I have no idea what they mean or how I fix them. Here is the part of the code that's causing the problem:
Code:
String[] AlphArray = {"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"}; ArrayList<String> Alphabet = new ArrayList(Arrays.asList(AlphArray));
Type safety: The constructor ArrayList(Colle ction) belongs to the raw type ArrayList. References to generic type ArrayList<E> should be parameterized.
Type safety: The expression of type ArrayList needs unchecked conversion to conform to ArrayList<Strin g>.
Can you please give me some tips on how to solve these problems?
Comment