String array into LinkedList java
LinkedList ll = new LinkedList(Arrays.asList(sa));
String array into LinkedList java
LinkedList ll = new LinkedList(Arrays.asList(sa));
arraylist to linkedlist java
import java.util.ArrayList;
import java.util.LinkedList;
public class Main {
public static void main(String[] args){
ArrayList<String> arrList = new ArrayList<>();
arrList.add("Mango");
arrList.add("Apple");
arrList.add("Orange");
System.out.println(arrList);
// ArrayList to LinkedList
LinkedList<String> linkList = new LinkedList<>(arrList);
System.out.println("Linked List:");
System.out.println(linkList);
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us