Here is a part of a program that sends an ArrayList from a server to a client. I want to remove the warning about the last line in this code:
Client code:
It's impossible to avoid this warning. readObject() returns an Object. You need to cast it. And casting to a generic type will always generate such a warning.
If you want to make your code as clean as possible, which is a good idea, you should respect the Java naming conventions though, and make variable names start with a lowercase letter.