MCPcopy Index your code
hub / github.com/BruceEckel/OnJava8-Examples / main

Method main

collectiontopics/ToDoList.java:34–45  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

32
33class ToDoList {
34 public static void main(String[] args) {
35 PriorityQueue<ToDoItem> toDo =
36 new PriorityQueue<>();
37 toDo.add(new ToDoItem("Empty trash", 'C', 4));
38 toDo.add(new ToDoItem("Feed dog", 'A', 2));
39 toDo.add(new ToDoItem("Feed bird", 'B', 7));
40 toDo.add(new ToDoItem("Mow lawn", 'C', 3));
41 toDo.add(new ToDoItem("Water lawn", 'A', 1));
42 toDo.add(new ToDoItem("Feed cat", 'B', 1));
43 while(!toDo.isEmpty())
44 System.out.println(toDo.remove());
45 }
46}
47/* Output:
48A1: Water lawn

Callers

nothing calls this directly

Calls 3

isEmptyMethod · 0.80
addMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected