In: Computer Science
Ans1
Ans 2:
Ans 3:
Declare and instantiate a list of elements of type String
we can declare list using mainly 3 classes because this 3 classes has implemented list interface.This 3 classes are ArrayList,LinkedList,Stack.There are other classes also which implemented List interface.
Hence lets initialise List interface using this 3 classes
Example:
List<String> myArray=new ArrayList<String>();
List<String> myArray=new LinkedList<String>();
List<String> myArray=new Stack<String>();
what type of data structure is Stack?
ans: Stack is a Linear Data Structure in which order of data can be LIFO(Last In First Out) or FILO(First In Last Out)
Ans 4:
Ans 5:
Ans 6:
Set is an abstract data type that can store unique values, without any particular order.
Thank You!