Can you make a list of objects in Java?

You could create a list of Object like List<Object> list = new ArrayList<Object>() . As all classes implementation extends implicit or explicit from java. lang. Object class, this list can hold any object, including instances of Employee , Integer , String etc.

Sizin İçin Seçtik  What are the 10 examples of adverb of manner?

Leave a Reply

Your email address will not be published. Required fields are marked *