1
1
mirror of https://github.com/namibia/awesome-cheatsheets.git synced 2024-12-22 01:58:54 +00:00

Merge pull request #243 from V-Play-Games/master

Fixed Typos
This commit is contained in:
Julien Le Coupanec 2021-11-02 12:33:39 +01:00 committed by GitHub
commit d7fb65e5c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -578,8 +578,8 @@ class MyClass extends MySuperClass implements YourInterface {
```java
public class Queue<Item> implements Iterable<Item>
Queue() //create an emptyh queue
boolean isEmpthy() //return if the queue empthy
Queue() //create an empty queue
boolean isEmpty() //return if the queue empty
void enqueue(Item item) // insert an item onto queue
Item dequeue() //return and remove the item that was inserted least recently
int size() //number of item on queue
@ -591,7 +591,7 @@ class MyClass extends MySuperClass implements YourInterface {
//import Iterator
import java.util.Iterator;
public class Queue<Item> implements Iterable <Item> {
public class Queue<Item> implements Iterable<Item> {
//FIFO queue
private Node first;
@ -627,9 +627,9 @@ public class Queue<Item> implements Iterable <Item> {
* **SET DATA TYPE**
```java
public class SET<Key extends Comparable<Key>> implements Iterable<Key>
SET() //create an empthy set
boolean isEmpthy() //return if the set is empthy
public class Set<Key extends Comparable<Key>> implements Iterable<Key>
Set() //create an empty set
boolean isEmpty() //return if the set is empty
void add (Key key) //add key to the set
void remove(Key key) //remove key from set
boolean contains(Key key) //return if the key is in the set