Answered step by step
Verified Expert Solution
Link Copied!

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);

image text in transcribed
image text in transcribed
image text in transcribed
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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Knowledge Discovery In Databases

Authors: Gregory Piatetsky-Shapiro, William Frawley

1st Edition

0262660709, 978-0262660709

More Books

Students also viewed these Databases questions