Skip to content

Commit

Permalink
LinkedList in java
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathur777 authored Oct 13, 2020
1 parent 8dc138b commit d4f95cb
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Java/LinkedList.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import java.util.LinkedList;

class Linked {
public static void main(String[] args){

// create linkedlist
LinkedList<String> animals = new LinkedList<>();

// Add elements to LinkedList
animals.add("Dog");
animals.add("Cat");
animals.add("Cow");
System.out.println("LinkedList: " + animals);
}
}

0 comments on commit d4f95cb

Please sign in to comment.