im having a problem with making stack with array converted to linked list
so far this is my code ...
import java.util.*;
public class Nkakainis {
public static void main(String[] args){
Stack <String> istak = new Stack<String>();
String[] names = {"john", "mark", "peter"};
List<String> list1 = Arrays.asList(names);
System.out.println("pushed " + istak.push(list1));
}
}
i dont have an idea on how to push those strings..how can i display john, mark, peter?
and how can i make other stack operations show on the output (i.e. pop(), peek(), search(), isEmpty())?
corrections are greatly appreciated ... i really need ur help badly :(