mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-10-04 12:13:11 +00:00
Just formatting App classes to be like the other class files on the project
This commit is contained in:
1 parent
52f0923df9
commit
bde5b343d0
24 files changed
+466
-508
No files matched your search
@@ -1,25 +1,23 @@
|
||||
package com.iluwatar;
|
||||
|
||||
/**
|
||||
*
|
||||
* Observer pattern defines one-to-many relationship
|
||||
* between objects. The target object sends change
|
||||
* notifications to its registered observers.
|
||||
*
|
||||
* Observer pattern defines one-to-many relationship between objects. The target
|
||||
* object sends change notifications to its registered observers.
|
||||
*
|
||||
*/
|
||||
public class App
|
||||
{
|
||||
public static void main( String[] args )
|
||||
{
|
||||
public class App {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
Weather weather = new Weather();
|
||||
weather.addObserver(new Orcs());
|
||||
weather.addObserver(new Hobbits());
|
||||
|
||||
weather.timePasses();
|
||||
weather.timePasses();
|
||||
weather.timePasses();
|
||||
weather.timePasses();
|
||||
|
||||
Weather weather = new Weather();
|
||||
weather.addObserver(new Orcs());
|
||||
weather.addObserver(new Hobbits());
|
||||
|
||||
weather.timePasses();
|
||||
weather.timePasses();
|
||||
weather.timePasses();
|
||||
weather.timePasses();
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user