Personal notes on software development.
For Java technologies check my dedicated site

Pages

Showing posts with label Java SE. Show all posts
Showing posts with label Java SE. Show all posts

Interfaces

  • An interface can extend another interface:
public interface IQuackable extends IQuackObservable {
    public void quack();
}

For "each"

private ArrayList <IBeatObserver> beatObservers = new ArrayList<IBeatObserver>();
for(IBeatObserver o : beatObservers)
           o.updateBeat();

ArrayList Vs Vector

Main difference: ArrayList is not synchronized (not thread safe) and (because of this) is faster than Vector. Vector is thread safe and slower than ArrayList.