An interesting aspect about final Collection that many java developers may not be familiar with is that making a collection final means only the reference cannot be changed but you can add, remove or change an object inside collection.
Example:
private final List<String> names = new ArrayList<String>();
names.add("Name1"); //Allowed
names.add("Name2"); //Allowed
names = new ArrayList<String>(); //Error
python internship | web development internship |internship for mechanical engineering students |mechanical engineering internships |java training in chennai |internship for 1st year engineering students |online internships for cse students |online internship for engineering students |internship for ece students|data science internships |
ReplyDelete