Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Lab 10 List of Objects //*************** Main Class********************* public class Java Application25 { public static void main(String[] args) { list obj=new list(10): obj.add(soso); obj.add(lolo): obj.add(dodo);
Lab 10 List of Objects //*************** Main Class********************* public class Java Application25 { public static void main(String[] args) { list obj=new list(10): obj.add("soso"); obj.add("lolo"): obj.add("dodo"); obj.add("dodo"); obj.add("dodo"); obj.displayo; } //******** ***********List Classs********************** public class list Object arril: int count: listo { arr=new Object[501: count=0; } list(int size) { arr=new Object[size]: count=0; } public void add(Object newItem) { if(count Carr.length) { arr[count]=newItem; count++; } else { System.out.println("List is Full"); else { System.out.println("List is Full"); } } public void display { for(int i=0;i
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started