Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdm/src/java/iterator/ITicketIterator.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import java.util.Iterator;

public interface ITicketIterator extends Iterator<Integer>
public interface ITicketIterator extends Iterator<Integer> // Is this interface really necessary? In any case you could keep it though!
{
boolean hasNext();

Expand Down
10 changes: 5 additions & 5 deletions sdm/src/java/singleton/Singleton.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
import java.util.Random;

public class Singleton {
int behaviour;
private static final Singleton new_singleton = new Singleton();
int behaviour; // Visibility
private static final Singleton new_singleton = new Singleton(); // NewSingleton or UniqueInstance
private Singleton()
{
Random rand = new Random();
behaviour = rand.nextInt(50);
}
Random rand = new Random(); // Remove
behaviour = rand.nextInt(50); // this.behaviour
}
public static Singleton getInstance()
{
return new_singleton;
Expand Down