diff --git a/Later/Generics/1/GenericsDemo/.classpath b/BasicJava/ClockDemo_intro/ClockDemo/.classpath
similarity index 100%
rename from Later/Generics/1/GenericsDemo/.classpath
rename to BasicJava/ClockDemo_intro/ClockDemo/.classpath
diff --git a/BasicJava/ClockDemo_intro/ClockDemo/.project b/BasicJava/ClockDemo_intro/ClockDemo/.project
new file mode 100644
index 000000000..6d8c49e0b
--- /dev/null
+++ b/BasicJava/ClockDemo_intro/ClockDemo/.project
@@ -0,0 +1,17 @@
+
+
+ ClockDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/Later/Generics/1/GenericsDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/ClockDemo_intro/ClockDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Generics/1/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/ClockDemo_intro/ClockDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/ClockDemo_intro/ClockDemo/bin/ClockDemo1.class b/BasicJava/ClockDemo_intro/ClockDemo/bin/ClockDemo1.class
new file mode 100644
index 000000000..91e4ada93
Binary files /dev/null and b/BasicJava/ClockDemo_intro/ClockDemo/bin/ClockDemo1.class differ
diff --git a/BasicJava/ClockDemo_intro/ClockDemo/bin/ClockDemo2.class b/BasicJava/ClockDemo_intro/ClockDemo/bin/ClockDemo2.class
new file mode 100644
index 000000000..dae7ac173
Binary files /dev/null and b/BasicJava/ClockDemo_intro/ClockDemo/bin/ClockDemo2.class differ
diff --git a/BasicJava/ClockDemo_intro/ClockDemo/bin/ClockDemo3.class b/BasicJava/ClockDemo_intro/ClockDemo/bin/ClockDemo3.class
new file mode 100644
index 000000000..84ccbe814
Binary files /dev/null and b/BasicJava/ClockDemo_intro/ClockDemo/bin/ClockDemo3.class differ
diff --git a/BasicJava/ClockDemo_intro/ClockDemo/src/ClockDemo1.java b/BasicJava/ClockDemo_intro/ClockDemo/src/ClockDemo1.java
new file mode 100644
index 000000000..904ea1b5a
--- /dev/null
+++ b/BasicJava/ClockDemo_intro/ClockDemo/src/ClockDemo1.java
@@ -0,0 +1,27 @@
+import java.time.Clock;
+import java.time.ZoneId;
+
+public class ClockDemo1
+{
+
+ public static void main(String[] args)
+ {
+ /*
+ * Returns:
+ *
+ * a clock that uses the best available system clock in the
+ * default zone, not null
+ */
+ Clock clock = Clock.systemDefaultZone();
+ System.out.println("clock = "+clock);
+
+ /*
+ * Returns:
+ *
+ * the time-zone being used to interpret instants, not null
+ */
+ ZoneId zoneId = clock.getZone();
+ System.out.println("zoneId = "+zoneId);
+ }
+
+}
diff --git a/BasicJava/ClockDemo_intro/ClockDemo/src/ClockDemo2.java b/BasicJava/ClockDemo_intro/ClockDemo/src/ClockDemo2.java
new file mode 100644
index 000000000..b5f8b985c
--- /dev/null
+++ b/BasicJava/ClockDemo_intro/ClockDemo/src/ClockDemo2.java
@@ -0,0 +1,26 @@
+import java.time.Clock;
+import java.time.Instant;
+
+public class ClockDemo2
+{
+
+ public static void main(String[] args)
+ {
+ /*
+ * Returns:
+ *
+ * a clock that uses the best available system clock in the
+ * UTC zone, not null
+ */
+ Clock clock = Clock.systemUTC();
+ System.out.println("clock = "+clock);
+ /*
+ * Returns:
+ *
+ * the current instant from this clock, not null
+ */
+ Instant instant = clock.instant();
+ System.out.println("instant = "+instant);
+ }
+
+}
diff --git a/BasicJava/ClockDemo_intro/ClockDemo/src/ClockDemo3.java b/BasicJava/ClockDemo_intro/ClockDemo/src/ClockDemo3.java
new file mode 100644
index 000000000..1585c2628
--- /dev/null
+++ b/BasicJava/ClockDemo_intro/ClockDemo/src/ClockDemo3.java
@@ -0,0 +1,28 @@
+import java.time.Clock;
+import java.time.ZoneId;
+
+public class ClockDemo3
+{
+
+ public static void main(String[] args)
+ {
+
+ ZoneId zoneId = ZoneId.systemDefault();
+ System.out.println("zoneId = " + zoneId);
+
+ /*
+ * Parameters:
+ *
+ * zone - the time-zone to use to convert the instant to
+ * date-time, not null
+ *
+ * Returns:
+ *
+ * a clock that uses the best available system clock in the
+ * specified zone, not null
+ */
+ Clock clock = Clock.system(zoneId);
+ System.out.println("Clock = " + clock);
+ }
+
+}
diff --git a/BasicJava/ClockDemo_intro/ClockDemo1_Output.txt b/BasicJava/ClockDemo_intro/ClockDemo1_Output.txt
new file mode 100644
index 000000000..368bdb554
--- /dev/null
+++ b/BasicJava/ClockDemo_intro/ClockDemo1_Output.txt
@@ -0,0 +1,2 @@
+clock = SystemClock[Asia/Calcutta]
+zoneId = Asia/Calcutta
diff --git a/BasicJava/ClockDemo_intro/ClockDemo2_Output.txt b/BasicJava/ClockDemo_intro/ClockDemo2_Output.txt
new file mode 100644
index 000000000..d389b5b64
--- /dev/null
+++ b/BasicJava/ClockDemo_intro/ClockDemo2_Output.txt
@@ -0,0 +1,2 @@
+clock = SystemClock[Z]
+instant = 2018-02-12T04:17:39.294Z
diff --git a/BasicJava/ClockDemo_intro/ClockDemo3_Output.txt b/BasicJava/ClockDemo_intro/ClockDemo3_Output.txt
new file mode 100644
index 000000000..ee9585684
--- /dev/null
+++ b/BasicJava/ClockDemo_intro/ClockDemo3_Output.txt
@@ -0,0 +1,2 @@
+zoneId = Asia/Calcutta
+Clock = SystemClock[Asia/Calcutta]
diff --git a/Later/Generics/2.1/GenericsDemo/.classpath b/BasicJava/ClockDemo_millis/ClockDemo/.classpath
similarity index 100%
rename from Later/Generics/2.1/GenericsDemo/.classpath
rename to BasicJava/ClockDemo_millis/ClockDemo/.classpath
diff --git a/BasicJava/ClockDemo_millis/ClockDemo/.project b/BasicJava/ClockDemo_millis/ClockDemo/.project
new file mode 100644
index 000000000..6d8c49e0b
--- /dev/null
+++ b/BasicJava/ClockDemo_millis/ClockDemo/.project
@@ -0,0 +1,17 @@
+
+
+ ClockDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/Later/Generics/2.1/GenericsDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/ClockDemo_millis/ClockDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Generics/2.1/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/ClockDemo_millis/ClockDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/ClockDemo_millis/ClockDemo/bin/ClockDemo.class b/BasicJava/ClockDemo_millis/ClockDemo/bin/ClockDemo.class
new file mode 100644
index 000000000..5a55d0dec
Binary files /dev/null and b/BasicJava/ClockDemo_millis/ClockDemo/bin/ClockDemo.class differ
diff --git a/BasicJava/ClockDemo_millis/ClockDemo/src/ClockDemo.java b/BasicJava/ClockDemo_millis/ClockDemo/src/ClockDemo.java
new file mode 100644
index 000000000..68b448f32
--- /dev/null
+++ b/BasicJava/ClockDemo_millis/ClockDemo/src/ClockDemo.java
@@ -0,0 +1,21 @@
+import java.time.Clock;
+
+public class ClockDemo
+{
+
+ public static void main(String[] args)
+ {
+ Clock clock = Clock.systemDefaultZone();
+ System.out.println("clock = " + clock);
+
+ /*
+ * Returns:
+ *
+ * the current millisecond instant from this clock, measured
+ * from the Java epoch of 1970-01-01T00:00Z (UTC), not null
+ */
+ long millis = clock.millis();
+ System.out.println("Clock millis = " + millis);
+ }
+
+}
diff --git a/BasicJava/ClockDemo_millis/Output.txt b/BasicJava/ClockDemo_millis/Output.txt
new file mode 100644
index 000000000..b3ad929bd
--- /dev/null
+++ b/BasicJava/ClockDemo_millis/Output.txt
@@ -0,0 +1,2 @@
+clock = SystemClock[Asia/Calcutta]
+Clock millis = 1518409712509
diff --git a/Later/Generics/2.2/GenericsDemo/.classpath b/BasicJava/ClockDemo_offset_duration/ClockDemo/.classpath
similarity index 100%
rename from Later/Generics/2.2/GenericsDemo/.classpath
rename to BasicJava/ClockDemo_offset_duration/ClockDemo/.classpath
diff --git a/BasicJava/ClockDemo_offset_duration/ClockDemo/.project b/BasicJava/ClockDemo_offset_duration/ClockDemo/.project
new file mode 100644
index 000000000..6d8c49e0b
--- /dev/null
+++ b/BasicJava/ClockDemo_offset_duration/ClockDemo/.project
@@ -0,0 +1,17 @@
+
+
+ ClockDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/Later/Generics/2.2/GenericsDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/ClockDemo_offset_duration/ClockDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Generics/2.2/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/ClockDemo_offset_duration/ClockDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/ClockDemo_offset_duration/ClockDemo/bin/ClockDemo.class b/BasicJava/ClockDemo_offset_duration/ClockDemo/bin/ClockDemo.class
new file mode 100644
index 000000000..ba3e8e31c
Binary files /dev/null and b/BasicJava/ClockDemo_offset_duration/ClockDemo/bin/ClockDemo.class differ
diff --git a/BasicJava/ClockDemo_offset_duration/ClockDemo/src/ClockDemo.java b/BasicJava/ClockDemo_offset_duration/ClockDemo/src/ClockDemo.java
new file mode 100644
index 000000000..6c966c38e
--- /dev/null
+++ b/BasicJava/ClockDemo_offset_duration/ClockDemo/src/ClockDemo.java
@@ -0,0 +1,33 @@
+import java.time.Clock;
+import java.time.Duration;
+
+public class ClockDemo
+{
+
+ public static void main(String[] args)
+ {
+ Clock baseClock = Clock.systemUTC();
+ System.out.println("instant of baseClock = " + baseClock.instant());
+
+ Duration duration = Duration.ofHours(6);
+ System.out.println("duration = " + duration);
+
+ /*
+ * Parameters:
+ *
+ * baseClock - the base clock to add the duration to, not null
+ * offset
+ *
+ * Duration - the duration to add, not null
+ *
+ * Returns:
+ *
+ * a clock based on the base clock with the duration added,
+ * not null
+ */
+
+ Clock clock = Clock.offset(baseClock, duration);
+ System.out.println("instant of clock = " + clock.instant());
+ }
+
+}
diff --git a/BasicJava/ClockDemo_offset_duration/Output.txt b/BasicJava/ClockDemo_offset_duration/Output.txt
new file mode 100644
index 000000000..9a506af99
--- /dev/null
+++ b/BasicJava/ClockDemo_offset_duration/Output.txt
@@ -0,0 +1,3 @@
+instant of baseClock = 2018-02-13T03:22:38.254Z
+duration = PT6H
+instant of clock = 2018-02-13T09:23:36.572Z
diff --git a/Later/Generics/2/GenericsDemo/.classpath b/BasicJava/ClockDemo_tick_duration/ClockDemo/.classpath
similarity index 100%
rename from Later/Generics/2/GenericsDemo/.classpath
rename to BasicJava/ClockDemo_tick_duration/ClockDemo/.classpath
diff --git a/BasicJava/ClockDemo_tick_duration/ClockDemo/.project b/BasicJava/ClockDemo_tick_duration/ClockDemo/.project
new file mode 100644
index 000000000..6d8c49e0b
--- /dev/null
+++ b/BasicJava/ClockDemo_tick_duration/ClockDemo/.project
@@ -0,0 +1,17 @@
+
+
+ ClockDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/Later/Generics/2/GenericsDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/ClockDemo_tick_duration/ClockDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Generics/2/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/ClockDemo_tick_duration/ClockDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/ClockDemo_tick_duration/ClockDemo/bin/ClockDemo.class b/BasicJava/ClockDemo_tick_duration/ClockDemo/bin/ClockDemo.class
new file mode 100644
index 000000000..ba5af67d0
Binary files /dev/null and b/BasicJava/ClockDemo_tick_duration/ClockDemo/bin/ClockDemo.class differ
diff --git a/BasicJava/ClockDemo_tick_duration/ClockDemo/src/ClockDemo.java b/BasicJava/ClockDemo_tick_duration/ClockDemo/src/ClockDemo.java
new file mode 100644
index 000000000..a2b0cbd3e
--- /dev/null
+++ b/BasicJava/ClockDemo_tick_duration/ClockDemo/src/ClockDemo.java
@@ -0,0 +1,35 @@
+import java.time.Clock;
+import java.time.Duration;
+
+public class ClockDemo
+{
+
+ public static void main(String[] args)
+ {
+ Clock baseClock = Clock.systemUTC();
+ System.out.println("instant of baseClock = " + baseClock.instant());
+
+ Duration tickDuration = Duration.ofDays(300);
+ System.out.println("tickDuration = " + tickDuration);
+
+ /*
+ * Parameters:
+ *
+ * baseClock - the base clock to base the ticking clock on,
+ * not null
+ *
+ * tickDuration - the duration of each visible tick, not
+ * negative, not null
+ *
+ * Returns:
+ *
+ * a clock that ticks in whole units of the duration,
+ * not null
+ */
+
+ Clock clock = Clock.tick(baseClock, tickDuration);
+
+ System.out.println("instant of clock = " + clock.instant());
+ }
+
+}
diff --git a/BasicJava/ClockDemo_tick_duration/Output.txt b/BasicJava/ClockDemo_tick_duration/Output.txt
new file mode 100644
index 000000000..cacd5fa0f
--- /dev/null
+++ b/BasicJava/ClockDemo_tick_duration/Output.txt
@@ -0,0 +1,3 @@
+instant of baseClock = 2018-02-13T03:41:00.886Z
+tickDuration = PT7200H
+instant of clock = 2017-08-22T00:00:00Z
diff --git a/Later/Generics/3/GenericsDemo/.classpath b/BasicJava/ClockDemo_tickminutes/ClockDemo/.classpath
similarity index 100%
rename from Later/Generics/3/GenericsDemo/.classpath
rename to BasicJava/ClockDemo_tickminutes/ClockDemo/.classpath
diff --git a/BasicJava/ClockDemo_tickminutes/ClockDemo/.project b/BasicJava/ClockDemo_tickminutes/ClockDemo/.project
new file mode 100644
index 000000000..6d8c49e0b
--- /dev/null
+++ b/BasicJava/ClockDemo_tickminutes/ClockDemo/.project
@@ -0,0 +1,17 @@
+
+
+ ClockDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/Later/Generics/3/GenericsDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/ClockDemo_tickminutes/ClockDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Generics/3/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/ClockDemo_tickminutes/ClockDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/ClockDemo_tickminutes/ClockDemo/bin/ClockDemo.class b/BasicJava/ClockDemo_tickminutes/ClockDemo/bin/ClockDemo.class
new file mode 100644
index 000000000..358578803
Binary files /dev/null and b/BasicJava/ClockDemo_tickminutes/ClockDemo/bin/ClockDemo.class differ
diff --git a/BasicJava/ClockDemo_tickminutes/ClockDemo/src/ClockDemo.java b/BasicJava/ClockDemo_tickminutes/ClockDemo/src/ClockDemo.java
new file mode 100644
index 000000000..4e84d2901
--- /dev/null
+++ b/BasicJava/ClockDemo_tickminutes/ClockDemo/src/ClockDemo.java
@@ -0,0 +1,27 @@
+import java.time.Clock;
+import java.time.ZoneId;
+
+public class ClockDemo
+{
+
+ public static void main(String[] args)
+ {
+ Clock clock1 = Clock.systemDefaultZone();
+ System.out.println("clock1 = " + clock1.instant());
+
+ /*
+ * Parameters:
+ *
+ * zone - the time-zone to use to convert the instant to
+ * date-time, not null
+ *
+ * Returns:
+ *
+ * a clock that ticks in whole minutes using the
+ * specified zone, not null
+ */
+ Clock clock2 = Clock.tickMinutes(ZoneId.systemDefault());
+ System.out.println("clock2 = " + clock2.instant());
+ }
+
+}
diff --git a/BasicJava/ClockDemo_tickminutes/Output.txt b/BasicJava/ClockDemo_tickminutes/Output.txt
new file mode 100644
index 000000000..e5f76748f
--- /dev/null
+++ b/BasicJava/ClockDemo_tickminutes/Output.txt
@@ -0,0 +1,2 @@
+clock1 = 2018-02-13T04:01:38.294Z
+clock2 = 2018-02-13T04:01:00Z
diff --git a/Later/Generics/4.1/GenericsDemo/.classpath b/BasicJava/ClockDemo_tickseconds/ClockDemo/.classpath
similarity index 100%
rename from Later/Generics/4.1/GenericsDemo/.classpath
rename to BasicJava/ClockDemo_tickseconds/ClockDemo/.classpath
diff --git a/BasicJava/ClockDemo_tickseconds/ClockDemo/.project b/BasicJava/ClockDemo_tickseconds/ClockDemo/.project
new file mode 100644
index 000000000..6d8c49e0b
--- /dev/null
+++ b/BasicJava/ClockDemo_tickseconds/ClockDemo/.project
@@ -0,0 +1,17 @@
+
+
+ ClockDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/Later/Generics/4.1/GenericsDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/ClockDemo_tickseconds/ClockDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Generics/4.1/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/ClockDemo_tickseconds/ClockDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/ClockDemo_tickseconds/ClockDemo/bin/ClockDemo.class b/BasicJava/ClockDemo_tickseconds/ClockDemo/bin/ClockDemo.class
new file mode 100644
index 000000000..b64cddb7a
Binary files /dev/null and b/BasicJava/ClockDemo_tickseconds/ClockDemo/bin/ClockDemo.class differ
diff --git a/BasicJava/ClockDemo_tickseconds/ClockDemo/src/ClockDemo.java b/BasicJava/ClockDemo_tickseconds/ClockDemo/src/ClockDemo.java
new file mode 100644
index 000000000..486b3f959
--- /dev/null
+++ b/BasicJava/ClockDemo_tickseconds/ClockDemo/src/ClockDemo.java
@@ -0,0 +1,27 @@
+import java.time.Clock;
+import java.time.ZoneId;
+
+public class ClockDemo
+{
+
+ public static void main(String[] args)
+ {
+ Clock clock1 = Clock.systemDefaultZone();
+ System.out.println("clock1 = " + clock1.instant());
+
+ /*
+ * Parameters:
+ *
+ * zone - the time-zone to use to convert the instant to
+ * date-time, not null
+ *
+ * Returns:
+ *
+ * a clock that ticks in whole seconds using the specified
+ * zone, not null
+ */
+ Clock clock2 = Clock.tickSeconds(ZoneId.systemDefault());
+ System.out.println("clock2 = " + clock2.instant());
+ }
+
+}
diff --git a/BasicJava/ClockDemo_tickseconds/Output.txt b/BasicJava/ClockDemo_tickseconds/Output.txt
new file mode 100644
index 000000000..8b081f302
--- /dev/null
+++ b/BasicJava/ClockDemo_tickseconds/Output.txt
@@ -0,0 +1,2 @@
+clock1 = 2018-02-13T04:12:24.569Z
+clock2 = 2018-02-13T04:12:40Z
diff --git a/Later/Generics/4.2/GenericsDemo/.classpath b/BasicJava/ClockDemo_withzone/ClockDemo/.classpath
similarity index 100%
rename from Later/Generics/4.2/GenericsDemo/.classpath
rename to BasicJava/ClockDemo_withzone/ClockDemo/.classpath
diff --git a/BasicJava/ClockDemo_withzone/ClockDemo/.project b/BasicJava/ClockDemo_withzone/ClockDemo/.project
new file mode 100644
index 000000000..6d8c49e0b
--- /dev/null
+++ b/BasicJava/ClockDemo_withzone/ClockDemo/.project
@@ -0,0 +1,17 @@
+
+
+ ClockDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/Later/Generics/4.2/GenericsDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/ClockDemo_withzone/ClockDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Generics/4.2/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/ClockDemo_withzone/ClockDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/ClockDemo_withzone/ClockDemo/bin/ClockDemo.class b/BasicJava/ClockDemo_withzone/ClockDemo/bin/ClockDemo.class
new file mode 100644
index 000000000..efaf6b50c
Binary files /dev/null and b/BasicJava/ClockDemo_withzone/ClockDemo/bin/ClockDemo.class differ
diff --git a/BasicJava/ClockDemo_withzone/ClockDemo/src/ClockDemo.java b/BasicJava/ClockDemo_withzone/ClockDemo/src/ClockDemo.java
new file mode 100644
index 000000000..a867d1f84
--- /dev/null
+++ b/BasicJava/ClockDemo_withzone/ClockDemo/src/ClockDemo.java
@@ -0,0 +1,26 @@
+import java.time.Clock;
+import java.time.ZoneId;
+
+public class ClockDemo
+{
+
+ public static void main(String[] args)
+ {
+ Clock clock1 = Clock.systemDefaultZone();
+ System.out.println("clock1 = " + clock1.instant());
+
+ /*
+ * Parameters:
+ *
+ * zone - the time-zone to change to, not null
+ *
+ * Returns:
+ *
+ * a clock based on this clock with the specified time-zone,
+ * not null
+ */
+ Clock clock2 = clock1.withZone(ZoneId.systemDefault());
+ System.out.println("clock2 = " + clock2.instant());
+ }
+
+}
diff --git a/BasicJava/ClockDemo_withzone/Output.txt b/BasicJava/ClockDemo_withzone/Output.txt
new file mode 100644
index 000000000..a69ba6bae
--- /dev/null
+++ b/BasicJava/ClockDemo_withzone/Output.txt
@@ -0,0 +1,2 @@
+clock1 = 2018-02-13T04:24:13.638Z
+clock2 = 2018-02-13T04:24:32.123Z
diff --git a/Later/Generics/4.3/GenericsDemo/.classpath b/BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo/.classpath
similarity index 100%
rename from Later/Generics/4.3/GenericsDemo/.classpath
rename to BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo/.classpath
diff --git a/BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo/.project b/BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo/.project
new file mode 100644
index 000000000..eaee21695
--- /dev/null
+++ b/BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ DateTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/Later/Generics/4.3/GenericsDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Generics/4.3/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo/bin/DateTimeDemo1.class b/BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo/bin/DateTimeDemo1.class
new file mode 100644
index 000000000..30fca6339
Binary files /dev/null and b/BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo/bin/DateTimeDemo1.class differ
diff --git a/BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo/bin/DateTimeDemo2.class b/BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo/bin/DateTimeDemo2.class
new file mode 100644
index 000000000..a6ffebb96
Binary files /dev/null and b/BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo/bin/DateTimeDemo2.class differ
diff --git a/BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo/bin/DateTimeDemo3.class b/BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo/bin/DateTimeDemo3.class
new file mode 100644
index 000000000..c563eb885
Binary files /dev/null and b/BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo/bin/DateTimeDemo3.class differ
diff --git a/BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo/bin/DateTimeDemo4.class b/BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo/bin/DateTimeDemo4.class
new file mode 100644
index 000000000..79a536d6a
Binary files /dev/null and b/BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo/bin/DateTimeDemo4.class differ
diff --git a/BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo/src/DateTimeDemo1.java b/BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo/src/DateTimeDemo1.java
new file mode 100644
index 000000000..3beb9ed82
--- /dev/null
+++ b/BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo/src/DateTimeDemo1.java
@@ -0,0 +1,37 @@
+import java.time.Clock;
+
+public class DateTimeDemo1
+{
+
+ public static void main(String[] args)
+ {
+ /*
+ * Returns:the current date using the system clock and default
+ * time-zone, not null
+ */
+ System.out.println(java.time.LocalDate.now());
+
+ /*
+ * Returns:the current time using the system clock and default
+ * time-zone, not null
+ */
+ System.out.println(java.time.LocalTime.now());
+
+ /*
+ * Returns:the current date-time using the system clock and
+ * default time-zone, not null
+ */
+ System.out.println(java.time.LocalDateTime.now());
+
+ /*
+ * systemUTC(): Returns:a clock that uses the best available
+ * system clock in the UTC zone, not null.
+ *
+ * instant(): Returns:the current instant from this clock, not
+ * null.
+ */
+ Clock clock = java.time.Clock.systemUTC();
+ System.out.println(clock.instant());
+ }
+
+}
diff --git a/BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo/src/DateTimeDemo2.java b/BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo/src/DateTimeDemo2.java
new file mode 100644
index 000000000..f4fc1e670
--- /dev/null
+++ b/BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo/src/DateTimeDemo2.java
@@ -0,0 +1,21 @@
+
+public class DateTimeDemo2
+{
+
+ public static void main(String[] args)
+ {
+ /*
+ * 1 way
+ */
+ java.util.Date date1 = new java.util.Date();
+ System.out.println(date1);
+
+ /*
+ * 2nd way
+ */
+ long millis = System.currentTimeMillis();
+ java.util.Date date2 = new java.util.Date(millis);
+ System.out.println(date2);
+ }
+
+}
diff --git a/BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo/src/DateTimeDemo3.java b/BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo/src/DateTimeDemo3.java
new file mode 100644
index 000000000..1c153832a
--- /dev/null
+++ b/BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo/src/DateTimeDemo3.java
@@ -0,0 +1,12 @@
+
+public class DateTimeDemo3
+{
+
+ public static void main(String[] args)
+ {
+ long millis = System.currentTimeMillis();
+ java.sql.Date date = new java.sql.Date(millis);
+ System.out.println(date);
+ }
+
+}
diff --git a/BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo/src/DateTimeDemo4.java b/BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo/src/DateTimeDemo4.java
new file mode 100644
index 000000000..77658425f
--- /dev/null
+++ b/BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo/src/DateTimeDemo4.java
@@ -0,0 +1,19 @@
+import java.util.Date;
+
+public class DateTimeDemo4
+{
+
+ public static void main(String[] args)
+ {
+
+ java.util.Calendar cal = java.util.Calendar.getInstance();
+ /*
+ * It is recommended to use Calendar class for getting current
+ * date and time in classical Date API. Since Java 8, you can
+ * use LocalDate, LocalTime or LocalDateTime classes.
+ */
+ Date date = cal.getTime();
+ System.out.println(date);
+ }
+
+}
diff --git a/BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo1_Output.txt b/BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo1_Output.txt
new file mode 100644
index 000000000..c5a5f470b
--- /dev/null
+++ b/BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo1_Output.txt
@@ -0,0 +1,4 @@
+2018-01-02
+08:20:52.973
+2018-01-02T08:20:52.973
+2018-01-02T02:50:52.974Z
diff --git a/BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo2_Output.txt b/BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo2_Output.txt
new file mode 100644
index 000000000..fcd50edc5
--- /dev/null
+++ b/BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo2_Output.txt
@@ -0,0 +1,2 @@
+Tue Jan 02 08:21:02 IST 2018
+Tue Jan 02 08:21:02 IST 2018
diff --git a/BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo3_Output.txt b/BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo3_Output.txt
new file mode 100644
index 000000000..674e22bc2
--- /dev/null
+++ b/BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo3_Output.txt
@@ -0,0 +1 @@
+2018-01-02
diff --git a/BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo4_Output.txt b/BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo4_Output.txt
new file mode 100644
index 000000000..a8a1b51c3
--- /dev/null
+++ b/BasicJava/DateTimeDemo_currentdatetime/DateTimeDemo4_Output.txt
@@ -0,0 +1 @@
+Tue Jan 02 08:21:24 IST 2018
diff --git a/Later/Generics/4/GenericsDemo/.classpath b/BasicJava/GenericMethodDemo_App/GenericsDemo/.classpath
similarity index 100%
rename from Later/Generics/4/GenericsDemo/.classpath
rename to BasicJava/GenericMethodDemo_App/GenericsDemo/.classpath
diff --git a/Later/Generics/1/GenericsDemo/.project b/BasicJava/GenericMethodDemo_App/GenericsDemo/.project
similarity index 100%
rename from Later/Generics/1/GenericsDemo/.project
rename to BasicJava/GenericMethodDemo_App/GenericsDemo/.project
diff --git a/Later/Generics/4/GenericsDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/GenericMethodDemo_App/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Generics/4/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/GenericMethodDemo_App/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/GenericMethodDemo_App/GenericsDemo/bin/GenericDemo.class b/BasicJava/GenericMethodDemo_App/GenericsDemo/bin/GenericDemo.class
new file mode 100644
index 000000000..cf89c7ee9
Binary files /dev/null and b/BasicJava/GenericMethodDemo_App/GenericsDemo/bin/GenericDemo.class differ
diff --git a/BasicJava/GenericMethodDemo_App/GenericsDemo/src/GenericDemo.java b/BasicJava/GenericMethodDemo_App/GenericsDemo/src/GenericDemo.java
new file mode 100644
index 000000000..e8daf8ed3
--- /dev/null
+++ b/BasicJava/GenericMethodDemo_App/GenericsDemo/src/GenericDemo.java
@@ -0,0 +1,33 @@
+/*
+ * Like generic class, we can create generic method that can accept any type
+ * of argument.
+ *
+ * Let’s see a simple example of java generic method to print
+ * array elements. We are using here E to denote the element.
+ */
+public class GenericDemo
+{
+ public static void main(String[] args)
+ {
+ Integer[] intArray =
+ { 100, 200, 300, 400, 500 };
+
+ System.out.println("Printing Integer Array");
+ printArray(intArray);
+
+ Character[] charArray =
+ { 'J', 'A', 'V', 'A' };
+
+ System.out.println("Printing Character Array");
+ printArray(charArray);
+ }
+
+ public static void printArray(E[] elements)
+ {
+ for (E element : elements)
+ {
+ System.out.println(element);
+ }
+ System.out.println();
+ }
+}
\ No newline at end of file
diff --git a/BasicJava/GenericMethodDemo_App/Output.txt b/BasicJava/GenericMethodDemo_App/Output.txt
new file mode 100644
index 000000000..aead0274b
--- /dev/null
+++ b/BasicJava/GenericMethodDemo_App/Output.txt
@@ -0,0 +1,13 @@
+Printing Integer Array
+100
+200
+300
+400
+500
+
+Printing Character Array
+J
+A
+V
+A
+
diff --git a/Later/Generics/5.1/GenericsDemo/.classpath b/BasicJava/GenericsDemo-wildcard_App/GenericsDemo/.classpath
similarity index 100%
rename from Later/Generics/5.1/GenericsDemo/.classpath
rename to BasicJava/GenericsDemo-wildcard_App/GenericsDemo/.classpath
diff --git a/Later/Generics/2.1/GenericsDemo/.project b/BasicJava/GenericsDemo-wildcard_App/GenericsDemo/.project
similarity index 100%
rename from Later/Generics/2.1/GenericsDemo/.project
rename to BasicJava/GenericsDemo-wildcard_App/GenericsDemo/.project
diff --git a/Later/Generics/5.1/GenericsDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/GenericsDemo-wildcard_App/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Generics/5.1/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/GenericsDemo-wildcard_App/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/Later/Generics/6/GenericsDemo/bin/Circle.class b/BasicJava/GenericsDemo-wildcard_App/GenericsDemo/bin/Circle.class
similarity index 100%
rename from Later/Generics/6/GenericsDemo/bin/Circle.class
rename to BasicJava/GenericsDemo-wildcard_App/GenericsDemo/bin/Circle.class
diff --git a/BasicJava/GenericsDemo-wildcard_App/GenericsDemo/bin/GenericDemo.class b/BasicJava/GenericsDemo-wildcard_App/GenericsDemo/bin/GenericDemo.class
new file mode 100644
index 000000000..612557f4b
Binary files /dev/null and b/BasicJava/GenericsDemo-wildcard_App/GenericsDemo/bin/GenericDemo.class differ
diff --git a/Later/Generics/6/GenericsDemo/bin/Rectangle.class b/BasicJava/GenericsDemo-wildcard_App/GenericsDemo/bin/Rectangle.class
similarity index 100%
rename from Later/Generics/6/GenericsDemo/bin/Rectangle.class
rename to BasicJava/GenericsDemo-wildcard_App/GenericsDemo/bin/Rectangle.class
diff --git a/Later/Generics/6/GenericsDemo/bin/Shape.class b/BasicJava/GenericsDemo-wildcard_App/GenericsDemo/bin/Shape.class
similarity index 100%
rename from Later/Generics/6/GenericsDemo/bin/Shape.class
rename to BasicJava/GenericsDemo-wildcard_App/GenericsDemo/bin/Shape.class
diff --git a/BasicJava/GenericsDemo-wildcard_App/GenericsDemo/src/GenericDemo.java b/BasicJava/GenericsDemo-wildcard_App/GenericsDemo/src/GenericDemo.java
new file mode 100644
index 000000000..e531612c6
--- /dev/null
+++ b/BasicJava/GenericsDemo-wildcard_App/GenericsDemo/src/GenericDemo.java
@@ -0,0 +1,31 @@
+import java.util.ArrayList;
+import java.util.List;
+
+public class GenericDemo
+{
+
+ public static void main(String args[])
+ {
+ List recList = new ArrayList();
+ recList.add(new Rectangle());
+ recList.add(new Rectangle());
+ drawShapes(recList);
+
+ List circleList = new ArrayList();
+ circleList.add(new Circle());
+ circleList.add(new Circle());
+ drawShapes(circleList);
+ }
+
+ /*
+ * This method accepts only the list contains child class of Shape
+ */
+ public static void drawShapes(List extends Shape> shapeList)
+ {
+ for (Shape shape : shapeList)
+ {
+ shape.draw();
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/Later/Generics/6/GenericsDemo/src/Shape.java b/BasicJava/GenericsDemo-wildcard_App/GenericsDemo/src/Shape.java
similarity index 100%
rename from Later/Generics/6/GenericsDemo/src/Shape.java
rename to BasicJava/GenericsDemo-wildcard_App/GenericsDemo/src/Shape.java
diff --git a/BasicJava/GenericsDemo-wildcard_App/Output.txt b/BasicJava/GenericsDemo-wildcard_App/Output.txt
new file mode 100644
index 000000000..5ed0c21bd
--- /dev/null
+++ b/BasicJava/GenericsDemo-wildcard_App/Output.txt
@@ -0,0 +1,4 @@
+drawing rectangle
+drawing rectangle
+drawing circle
+drawing circle
diff --git a/Later/Generics/5.2/GenericsDemo/.classpath b/BasicJava/GenericsDemo_Bounded_TP_App/GenericsDemo/.classpath
similarity index 100%
rename from Later/Generics/5.2/GenericsDemo/.classpath
rename to BasicJava/GenericsDemo_Bounded_TP_App/GenericsDemo/.classpath
diff --git a/Later/Generics/2.2/GenericsDemo/.project b/BasicJava/GenericsDemo_Bounded_TP_App/GenericsDemo/.project
similarity index 100%
rename from Later/Generics/2.2/GenericsDemo/.project
rename to BasicJava/GenericsDemo_Bounded_TP_App/GenericsDemo/.project
diff --git a/Later/Generics/5.2/GenericsDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/GenericsDemo_Bounded_TP_App/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Generics/5.2/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/GenericsDemo_Bounded_TP_App/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/Later/Generics/5.4/GenericsDemo/bin/Box.class b/BasicJava/GenericsDemo_Bounded_TP_App/GenericsDemo/bin/Box.class
similarity index 100%
rename from Later/Generics/5.4/GenericsDemo/bin/Box.class
rename to BasicJava/GenericsDemo_Bounded_TP_App/GenericsDemo/bin/Box.class
diff --git a/Later/Generics/5.4/GenericsDemo/bin/GenericDemo.class b/BasicJava/GenericsDemo_Bounded_TP_App/GenericsDemo/bin/GenericDemo.class
similarity index 100%
rename from Later/Generics/5.4/GenericsDemo/bin/GenericDemo.class
rename to BasicJava/GenericsDemo_Bounded_TP_App/GenericsDemo/bin/GenericDemo.class
diff --git a/Later/Generics/5.4/GenericsDemo/src/Box.java b/BasicJava/GenericsDemo_Bounded_TP_App/GenericsDemo/src/Box.java
similarity index 100%
rename from Later/Generics/5.4/GenericsDemo/src/Box.java
rename to BasicJava/GenericsDemo_Bounded_TP_App/GenericsDemo/src/Box.java
diff --git a/Later/Generics/5.4/GenericsDemo/src/GenericDemo.java b/BasicJava/GenericsDemo_Bounded_TP_App/GenericsDemo/src/GenericDemo.java
similarity index 100%
rename from Later/Generics/5.4/GenericsDemo/src/GenericDemo.java
rename to BasicJava/GenericsDemo_Bounded_TP_App/GenericsDemo/src/GenericDemo.java
diff --git a/BasicJava/GenericsDemo_Bounded_TP_App/Output.txt b/BasicJava/GenericsDemo_Bounded_TP_App/Output.txt
new file mode 100644
index 000000000..f037defb9
--- /dev/null
+++ b/BasicJava/GenericsDemo_Bounded_TP_App/Output.txt
@@ -0,0 +1,8 @@
+T: java.lang.Integer
+U: java.lang.Integer
+-------------------
+T: java.lang.Integer
+U: java.lang.Double
+-------------------
+T: java.lang.Integer
+U: java.lang.Long
diff --git a/Later/Generics/5.3/GenericsDemo/.classpath b/BasicJava/GenericsDemo_GenericClass_App/GenericsDemo/.classpath
similarity index 100%
rename from Later/Generics/5.3/GenericsDemo/.classpath
rename to BasicJava/GenericsDemo_GenericClass_App/GenericsDemo/.classpath
diff --git a/Later/Generics/2/GenericsDemo/.project b/BasicJava/GenericsDemo_GenericClass_App/GenericsDemo/.project
similarity index 100%
rename from Later/Generics/2/GenericsDemo/.project
rename to BasicJava/GenericsDemo_GenericClass_App/GenericsDemo/.project
diff --git a/Later/Generics/5.3/GenericsDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/GenericsDemo_GenericClass_App/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Generics/5.3/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/GenericsDemo_GenericClass_App/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/Later/Generics/4/GenericsDemo/bin/GenericDemo.class b/BasicJava/GenericsDemo_GenericClass_App/GenericsDemo/bin/GenericDemo.class
similarity index 100%
rename from Later/Generics/4/GenericsDemo/bin/GenericDemo.class
rename to BasicJava/GenericsDemo_GenericClass_App/GenericsDemo/bin/GenericDemo.class
diff --git a/Later/Generics/4/GenericsDemo/bin/MyGeneric.class b/BasicJava/GenericsDemo_GenericClass_App/GenericsDemo/bin/MyGeneric.class
similarity index 100%
rename from Later/Generics/4/GenericsDemo/bin/MyGeneric.class
rename to BasicJava/GenericsDemo_GenericClass_App/GenericsDemo/bin/MyGeneric.class
diff --git a/BasicJava/GenericsDemo_GenericClass_App/GenericsDemo/src/GenericDemo.java b/BasicJava/GenericsDemo_GenericClass_App/GenericsDemo/src/GenericDemo.java
new file mode 100644
index 000000000..b18360db7
--- /dev/null
+++ b/BasicJava/GenericsDemo_GenericClass_App/GenericsDemo/src/GenericDemo.java
@@ -0,0 +1,26 @@
+/*
+ * Code to use the generic class.
+ */
+public class GenericDemo
+{
+ public static void main(String[] args)
+ {
+ useInteger();
+ useString();
+ }
+
+ private static void useInteger()
+ {
+ MyGeneric myGeneric=new MyGeneric();
+ myGeneric.add(2);
+ //myGeneric.add("peter");//Compile time error
+ System.out.println(myGeneric.get());
+ }
+
+ private static void useString()
+ {
+ MyGeneric myGeneric=new MyGeneric();
+ myGeneric.add("Ram");
+ System.out.println(myGeneric.get());
+ }
+}
\ No newline at end of file
diff --git a/Later/Generics/4/GenericsDemo/src/MyGeneric.java b/BasicJava/GenericsDemo_GenericClass_App/GenericsDemo/src/MyGeneric.java
similarity index 100%
rename from Later/Generics/4/GenericsDemo/src/MyGeneric.java
rename to BasicJava/GenericsDemo_GenericClass_App/GenericsDemo/src/MyGeneric.java
diff --git a/BasicJava/GenericsDemo_GenericClass_App/Output.txt b/BasicJava/GenericsDemo_GenericClass_App/Output.txt
new file mode 100644
index 000000000..6b1e0fdc9
--- /dev/null
+++ b/BasicJava/GenericsDemo_GenericClass_App/Output.txt
@@ -0,0 +1,2 @@
+2
+Ram
diff --git a/Later/Generics/5.4/GenericsDemo/.classpath b/BasicJava/GenericsDemo_GenericClass_Bird_Emp_App/GenericsDemo/.classpath
similarity index 100%
rename from Later/Generics/5.4/GenericsDemo/.classpath
rename to BasicJava/GenericsDemo_GenericClass_Bird_Emp_App/GenericsDemo/.classpath
diff --git a/Later/Generics/3/GenericsDemo/.project b/BasicJava/GenericsDemo_GenericClass_Bird_Emp_App/GenericsDemo/.project
similarity index 100%
rename from Later/Generics/3/GenericsDemo/.project
rename to BasicJava/GenericsDemo_GenericClass_Bird_Emp_App/GenericsDemo/.project
diff --git a/Later/Generics/5.4/GenericsDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/GenericsDemo_GenericClass_Bird_Emp_App/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Generics/5.4/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/GenericsDemo_GenericClass_Bird_Emp_App/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/Later/Generics/4.1/GenericsDemo/bin/Bird.class b/BasicJava/GenericsDemo_GenericClass_Bird_Emp_App/GenericsDemo/bin/Bird.class
similarity index 100%
rename from Later/Generics/4.1/GenericsDemo/bin/Bird.class
rename to BasicJava/GenericsDemo_GenericClass_Bird_Emp_App/GenericsDemo/bin/Bird.class
diff --git a/Later/Generics/4.1/GenericsDemo/bin/Employee.class b/BasicJava/GenericsDemo_GenericClass_Bird_Emp_App/GenericsDemo/bin/Employee.class
similarity index 100%
rename from Later/Generics/4.1/GenericsDemo/bin/Employee.class
rename to BasicJava/GenericsDemo_GenericClass_Bird_Emp_App/GenericsDemo/bin/Employee.class
diff --git a/BasicJava/GenericsDemo_GenericClass_Bird_Emp_App/GenericsDemo/bin/GenericDemo.class b/BasicJava/GenericsDemo_GenericClass_Bird_Emp_App/GenericsDemo/bin/GenericDemo.class
new file mode 100644
index 000000000..30a99c7f8
Binary files /dev/null and b/BasicJava/GenericsDemo_GenericClass_Bird_Emp_App/GenericsDemo/bin/GenericDemo.class differ
diff --git a/Later/Generics/4.1/GenericsDemo/bin/GenericFactory.class b/BasicJava/GenericsDemo_GenericClass_Bird_Emp_App/GenericsDemo/bin/GenericFactory.class
similarity index 100%
rename from Later/Generics/4.1/GenericsDemo/bin/GenericFactory.class
rename to BasicJava/GenericsDemo_GenericClass_Bird_Emp_App/GenericsDemo/bin/GenericFactory.class
diff --git a/Later/Generics/4.1/GenericsDemo/src/Bird.java b/BasicJava/GenericsDemo_GenericClass_Bird_Emp_App/GenericsDemo/src/Bird.java
similarity index 100%
rename from Later/Generics/4.1/GenericsDemo/src/Bird.java
rename to BasicJava/GenericsDemo_GenericClass_Bird_Emp_App/GenericsDemo/src/Bird.java
diff --git a/Later/Generics/4.1/GenericsDemo/src/Employee.java b/BasicJava/GenericsDemo_GenericClass_Bird_Emp_App/GenericsDemo/src/Employee.java
similarity index 100%
rename from Later/Generics/4.1/GenericsDemo/src/Employee.java
rename to BasicJava/GenericsDemo_GenericClass_Bird_Emp_App/GenericsDemo/src/Employee.java
diff --git a/BasicJava/GenericsDemo_GenericClass_Bird_Emp_App/GenericsDemo/src/GenericDemo.java b/BasicJava/GenericsDemo_GenericClass_Bird_Emp_App/GenericsDemo/src/GenericDemo.java
new file mode 100644
index 000000000..56466f1d1
--- /dev/null
+++ b/BasicJava/GenericsDemo_GenericClass_Bird_Emp_App/GenericsDemo/src/GenericDemo.java
@@ -0,0 +1,22 @@
+public class GenericDemo
+{
+ public static void main(String[] args)
+ throws IllegalAccessException, InstantiationException
+ {
+
+ /*
+ * It is not necessary to cast the object returned from the
+ * factory.createInstance() method. The compiler can deduct the type of
+ * the object from the generic type of the GenericFactory created,
+ * because you specified the type inside the <>.
+ */
+ GenericFactory empFactory = new GenericFactory(Employee.class);
+ Employee employee = empFactory.createInstance();
+ System.out.println(employee);
+
+ GenericFactory birdFactory = new GenericFactory(Bird.class);
+ Bird bird = birdFactory.createInstance();
+ System.out.println(bird);
+ }
+
+}
\ No newline at end of file
diff --git a/Later/Generics/4.1/GenericsDemo/src/GenericFactory.java b/BasicJava/GenericsDemo_GenericClass_Bird_Emp_App/GenericsDemo/src/GenericFactory.java
similarity index 100%
rename from Later/Generics/4.1/GenericsDemo/src/GenericFactory.java
rename to BasicJava/GenericsDemo_GenericClass_Bird_Emp_App/GenericsDemo/src/GenericFactory.java
diff --git a/BasicJava/GenericsDemo_GenericClass_Bird_Emp_App/Output.txt b/BasicJava/GenericsDemo_GenericClass_Bird_Emp_App/Output.txt
new file mode 100644
index 000000000..6367d631b
--- /dev/null
+++ b/BasicJava/GenericsDemo_GenericClass_Bird_Emp_App/Output.txt
@@ -0,0 +1,2 @@
+Employee@1b701da1
+Bird@442d9b6e
diff --git a/Later/Generics/5/GenericsDemo/.classpath b/BasicJava/GenericsDemo_GenericTypes_App/GenericsDemo/.classpath
similarity index 100%
rename from Later/Generics/5/GenericsDemo/.classpath
rename to BasicJava/GenericsDemo_GenericTypes_App/GenericsDemo/.classpath
diff --git a/Later/Generics/4.1/GenericsDemo/.project b/BasicJava/GenericsDemo_GenericTypes_App/GenericsDemo/.project
similarity index 100%
rename from Later/Generics/4.1/GenericsDemo/.project
rename to BasicJava/GenericsDemo_GenericTypes_App/GenericsDemo/.project
diff --git a/Later/Generics/5/GenericsDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/GenericsDemo_GenericTypes_App/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Generics/5/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/GenericsDemo_GenericTypes_App/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/Later/Generics/4.2/GenericsDemo/bin/Box.class b/BasicJava/GenericsDemo_GenericTypes_App/GenericsDemo/bin/Box.class
similarity index 100%
rename from Later/Generics/4.2/GenericsDemo/bin/Box.class
rename to BasicJava/GenericsDemo_GenericTypes_App/GenericsDemo/bin/Box.class
diff --git a/Later/Generics/4.2/GenericsDemo/bin/GenericDemo.class b/BasicJava/GenericsDemo_GenericTypes_App/GenericsDemo/bin/GenericDemo.class
similarity index 100%
rename from Later/Generics/4.2/GenericsDemo/bin/GenericDemo.class
rename to BasicJava/GenericsDemo_GenericTypes_App/GenericsDemo/bin/GenericDemo.class
diff --git a/Later/Generics/4.2/GenericsDemo/src/Box.java b/BasicJava/GenericsDemo_GenericTypes_App/GenericsDemo/src/Box.java
similarity index 100%
rename from Later/Generics/4.2/GenericsDemo/src/Box.java
rename to BasicJava/GenericsDemo_GenericTypes_App/GenericsDemo/src/Box.java
diff --git a/Later/Generics/4.2/GenericsDemo/src/GenericDemo.java b/BasicJava/GenericsDemo_GenericTypes_App/GenericsDemo/src/GenericDemo.java
similarity index 100%
rename from Later/Generics/4.2/GenericsDemo/src/GenericDemo.java
rename to BasicJava/GenericsDemo_GenericTypes_App/GenericsDemo/src/GenericDemo.java
diff --git a/BasicJava/GenericsDemo_GenericTypes_App/Output.txt b/BasicJava/GenericsDemo_GenericTypes_App/Output.txt
new file mode 100644
index 000000000..ea1d743d7
--- /dev/null
+++ b/BasicJava/GenericsDemo_GenericTypes_App/Output.txt
@@ -0,0 +1,2 @@
+integerValue = 100
+strValue = Peter
diff --git a/Later/Generics/6.1/GenericsDemo/.classpath b/BasicJava/GenericsDemo_HashSet_App/GenericsDemo/.classpath
similarity index 100%
rename from Later/Generics/6.1/GenericsDemo/.classpath
rename to BasicJava/GenericsDemo_HashSet_App/GenericsDemo/.classpath
diff --git a/Later/Generics/4.2/GenericsDemo/.project b/BasicJava/GenericsDemo_HashSet_App/GenericsDemo/.project
similarity index 100%
rename from Later/Generics/4.2/GenericsDemo/.project
rename to BasicJava/GenericsDemo_HashSet_App/GenericsDemo/.project
diff --git a/Later/Generics/6.1/GenericsDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/GenericsDemo_HashSet_App/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Generics/6.1/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/GenericsDemo_HashSet_App/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/GenericsDemo_HashSet_App/GenericsDemo/bin/GenericDemo.class b/BasicJava/GenericsDemo_HashSet_App/GenericsDemo/bin/GenericDemo.class
new file mode 100644
index 000000000..129c05196
Binary files /dev/null and b/BasicJava/GenericsDemo_HashSet_App/GenericsDemo/bin/GenericDemo.class differ
diff --git a/BasicJava/GenericsDemo_HashSet_App/GenericsDemo/src/GenericDemo.java b/BasicJava/GenericsDemo_HashSet_App/GenericsDemo/src/GenericDemo.java
new file mode 100644
index 000000000..fb1147ba3
--- /dev/null
+++ b/BasicJava/GenericsDemo_HashSet_App/GenericsDemo/src/GenericDemo.java
@@ -0,0 +1,33 @@
+import java.util.HashSet;
+import java.util.Iterator;
+
+public class GenericDemo
+{
+ public static void main(String[] args)
+ {
+ HashSet nameSet = new HashSet();
+ nameSet.add("Peter");
+ nameSet.add("John");
+ nameSet.add("Juli");
+
+ System.out.println("----------Using for-each loop---------------");
+ /*
+ * Using for-each loop we can loop and get each name from nameSet
+ */
+ for (String name : nameSet)
+ {
+ System.out.println(name);
+ }
+
+ System.out.println("----------Using Iterator---------------------");
+ Iterator iterator = nameSet.iterator();
+
+ while (iterator.hasNext())
+ {
+ String name = iterator.next();
+ System.out.println(name);
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/GenericsDemo_HashSet_App/Output.txt b/BasicJava/GenericsDemo_HashSet_App/Output.txt
new file mode 100644
index 000000000..8a7a97237
--- /dev/null
+++ b/BasicJava/GenericsDemo_HashSet_App/Output.txt
@@ -0,0 +1,8 @@
+----------Using for-each loop---------------
+John
+Peter
+Juli
+----------Using Iterator---------------------
+John
+Peter
+Juli
diff --git a/BasicJava/GenericsDemo_List_Set_Map_App/GenericForDemo1_Output.txt b/BasicJava/GenericsDemo_List_Set_Map_App/GenericForDemo1_Output.txt
new file mode 100644
index 000000000..12ec89fb0
--- /dev/null
+++ b/BasicJava/GenericsDemo_List_Set_Map_App/GenericForDemo1_Output.txt
@@ -0,0 +1,3 @@
+Peter
+Juli
+Stephan
diff --git a/BasicJava/GenericsDemo_List_Set_Map_App/GenericForDemo2_Output.txt b/BasicJava/GenericsDemo_List_Set_Map_App/GenericForDemo2_Output.txt
new file mode 100644
index 000000000..336a4ce72
--- /dev/null
+++ b/BasicJava/GenericsDemo_List_Set_Map_App/GenericForDemo2_Output.txt
@@ -0,0 +1,3 @@
+100
+200
+300
diff --git a/BasicJava/GenericsDemo_List_Set_Map_App/GenericForDemo3_Output.txt b/BasicJava/GenericsDemo_List_Set_Map_App/GenericForDemo3_Output.txt
new file mode 100644
index 000000000..cb7a473ad
--- /dev/null
+++ b/BasicJava/GenericsDemo_List_Set_Map_App/GenericForDemo3_Output.txt
@@ -0,0 +1,7 @@
+1:Ram
+2:Peter
+3:Juli
+-------------------------------
+Ram
+Peter
+Juli
diff --git a/Later/Generics/6.2/GenericsDemo/.classpath b/BasicJava/GenericsDemo_List_Set_Map_App/GenericsDemo/.classpath
similarity index 100%
rename from Later/Generics/6.2/GenericsDemo/.classpath
rename to BasicJava/GenericsDemo_List_Set_Map_App/GenericsDemo/.classpath
diff --git a/Later/Generics/4.3/GenericsDemo/.project b/BasicJava/GenericsDemo_List_Set_Map_App/GenericsDemo/.project
similarity index 100%
rename from Later/Generics/4.3/GenericsDemo/.project
rename to BasicJava/GenericsDemo_List_Set_Map_App/GenericsDemo/.project
diff --git a/Later/Generics/6.2/GenericsDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/GenericsDemo_List_Set_Map_App/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Generics/6.2/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/GenericsDemo_List_Set_Map_App/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/GenericsDemo_List_Set_Map_App/GenericsDemo/bin/GenericForDemo1.class b/BasicJava/GenericsDemo_List_Set_Map_App/GenericsDemo/bin/GenericForDemo1.class
new file mode 100644
index 000000000..c7ecdc300
Binary files /dev/null and b/BasicJava/GenericsDemo_List_Set_Map_App/GenericsDemo/bin/GenericForDemo1.class differ
diff --git a/BasicJava/GenericsDemo_List_Set_Map_App/GenericsDemo/bin/GenericForDemo2.class b/BasicJava/GenericsDemo_List_Set_Map_App/GenericsDemo/bin/GenericForDemo2.class
new file mode 100644
index 000000000..c39c64a96
Binary files /dev/null and b/BasicJava/GenericsDemo_List_Set_Map_App/GenericsDemo/bin/GenericForDemo2.class differ
diff --git a/BasicJava/GenericsDemo_List_Set_Map_App/GenericsDemo/bin/GenericForDemo3.class b/BasicJava/GenericsDemo_List_Set_Map_App/GenericsDemo/bin/GenericForDemo3.class
new file mode 100644
index 000000000..9e3739b60
Binary files /dev/null and b/BasicJava/GenericsDemo_List_Set_Map_App/GenericsDemo/bin/GenericForDemo3.class differ
diff --git a/Later/Generics/2.2/GenericsDemo/src/GenericForDemo1.java b/BasicJava/GenericsDemo_List_Set_Map_App/GenericsDemo/src/GenericForDemo1.java
similarity index 86%
rename from Later/Generics/2.2/GenericsDemo/src/GenericForDemo1.java
rename to BasicJava/GenericsDemo_List_Set_Map_App/GenericsDemo/src/GenericForDemo1.java
index 26dc44b29..f1a5e41a2 100644
--- a/Later/Generics/2.2/GenericsDemo/src/GenericForDemo1.java
+++ b/BasicJava/GenericsDemo_List_Set_Map_App/GenericsDemo/src/GenericForDemo1.java
@@ -4,7 +4,6 @@
public class GenericForDemo1
{
public static void main(String[] args)
- throws IllegalAccessException, InstantiationException
{
List list = new ArrayList();
diff --git a/Later/Generics/2.2/GenericsDemo/src/GenericForDemo2.java b/BasicJava/GenericsDemo_List_Set_Map_App/GenericsDemo/src/GenericForDemo2.java
similarity index 86%
rename from Later/Generics/2.2/GenericsDemo/src/GenericForDemo2.java
rename to BasicJava/GenericsDemo_List_Set_Map_App/GenericsDemo/src/GenericForDemo2.java
index 6bd6aa408..d71e5754d 100644
--- a/Later/Generics/2.2/GenericsDemo/src/GenericForDemo2.java
+++ b/BasicJava/GenericsDemo_List_Set_Map_App/GenericsDemo/src/GenericForDemo2.java
@@ -4,7 +4,6 @@
public class GenericForDemo2
{
public static void main(String[] args)
- throws IllegalAccessException, InstantiationException
{
Set set = new HashSet();
diff --git a/Later/Generics/2.2/GenericsDemo/src/GenericForDemo3.java b/BasicJava/GenericsDemo_List_Set_Map_App/GenericsDemo/src/GenericForDemo3.java
similarity index 91%
rename from Later/Generics/2.2/GenericsDemo/src/GenericForDemo3.java
rename to BasicJava/GenericsDemo_List_Set_Map_App/GenericsDemo/src/GenericForDemo3.java
index e8b583bf4..b65f5c7a3 100644
--- a/Later/Generics/2.2/GenericsDemo/src/GenericForDemo3.java
+++ b/BasicJava/GenericsDemo_List_Set_Map_App/GenericsDemo/src/GenericForDemo3.java
@@ -4,9 +4,7 @@
public class GenericForDemo3
{
public static void main(String[] args)
- throws IllegalAccessException, InstantiationException
{
-
Map map = new HashMap();
map.put(1, "Ram");
map.put(2, "Peter");
diff --git a/Later/Generics/6.3/GenericsDemo/.classpath b/BasicJava/GenericsDemo_Map_App/GenericsDemo/.classpath
similarity index 100%
rename from Later/Generics/6.3/GenericsDemo/.classpath
rename to BasicJava/GenericsDemo_Map_App/GenericsDemo/.classpath
diff --git a/Later/Generics/4/GenericsDemo/.project b/BasicJava/GenericsDemo_Map_App/GenericsDemo/.project
similarity index 100%
rename from Later/Generics/4/GenericsDemo/.project
rename to BasicJava/GenericsDemo_Map_App/GenericsDemo/.project
diff --git a/Later/Generics/6.3/GenericsDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/GenericsDemo_Map_App/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Generics/6.3/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/GenericsDemo_Map_App/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/GenericsDemo_Map_App/GenericsDemo/bin/GenericDemo.class b/BasicJava/GenericsDemo_Map_App/GenericsDemo/bin/GenericDemo.class
new file mode 100644
index 000000000..8f1d2e713
Binary files /dev/null and b/BasicJava/GenericsDemo_Map_App/GenericsDemo/bin/GenericDemo.class differ
diff --git a/BasicJava/GenericsDemo_Map_App/GenericsDemo/src/GenericDemo.java b/BasicJava/GenericsDemo_Map_App/GenericsDemo/src/GenericDemo.java
new file mode 100644
index 000000000..8ea2ff239
--- /dev/null
+++ b/BasicJava/GenericsDemo_Map_App/GenericsDemo/src/GenericDemo.java
@@ -0,0 +1,28 @@
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+/*
+ * Example of Java Generics using Map
+ */
+public class GenericDemo
+{
+ public static void main(String[] args)
+ {
+ Map map = new HashMap();
+ map.put(1, "Peter");
+ map.put(2, "Stephan");
+ map.put(3, "Sara");
+
+ Set> set = map.entrySet();
+
+ Iterator> itr = set.iterator();
+ while (itr.hasNext())
+ {
+ // no need to typecast
+ Map.Entry e = itr.next();
+ System.out.println(e.getKey() + " " + e.getValue());
+ }
+ }
+}
\ No newline at end of file
diff --git a/BasicJava/GenericsDemo_Map_App/Output.txt b/BasicJava/GenericsDemo_Map_App/Output.txt
new file mode 100644
index 000000000..36f21d529
--- /dev/null
+++ b/BasicJava/GenericsDemo_Map_App/Output.txt
@@ -0,0 +1,3 @@
+1 Peter
+2 Stephan
+3 Sara
diff --git a/Later/Generics/6/GenericsDemo/.classpath b/BasicJava/GenericsDemo_extends_wildcard_boundary_App/GenericsDemo/.classpath
similarity index 100%
rename from Later/Generics/6/GenericsDemo/.classpath
rename to BasicJava/GenericsDemo_extends_wildcard_boundary_App/GenericsDemo/.classpath
diff --git a/Later/Generics/5.1/GenericsDemo/.project b/BasicJava/GenericsDemo_extends_wildcard_boundary_App/GenericsDemo/.project
similarity index 100%
rename from Later/Generics/5.1/GenericsDemo/.project
rename to BasicJava/GenericsDemo_extends_wildcard_boundary_App/GenericsDemo/.project
diff --git a/Later/Generics/6/GenericsDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/GenericsDemo_extends_wildcard_boundary_App/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Generics/6/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/GenericsDemo_extends_wildcard_boundary_App/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/Later/Generics/8/GenericsDemo/bin/A.class b/BasicJava/GenericsDemo_extends_wildcard_boundary_App/GenericsDemo/bin/A.class
similarity index 100%
rename from Later/Generics/8/GenericsDemo/bin/A.class
rename to BasicJava/GenericsDemo_extends_wildcard_boundary_App/GenericsDemo/bin/A.class
diff --git a/Later/Generics/8/GenericsDemo/bin/B.class b/BasicJava/GenericsDemo_extends_wildcard_boundary_App/GenericsDemo/bin/B.class
similarity index 100%
rename from Later/Generics/8/GenericsDemo/bin/B.class
rename to BasicJava/GenericsDemo_extends_wildcard_boundary_App/GenericsDemo/bin/B.class
diff --git a/Later/Generics/8/GenericsDemo/bin/C.class b/BasicJava/GenericsDemo_extends_wildcard_boundary_App/GenericsDemo/bin/C.class
similarity index 100%
rename from Later/Generics/8/GenericsDemo/bin/C.class
rename to BasicJava/GenericsDemo_extends_wildcard_boundary_App/GenericsDemo/bin/C.class
diff --git a/Later/Generics/8/GenericsDemo/bin/GenericDemo.class b/BasicJava/GenericsDemo_extends_wildcard_boundary_App/GenericsDemo/bin/GenericDemo.class
similarity index 100%
rename from Later/Generics/8/GenericsDemo/bin/GenericDemo.class
rename to BasicJava/GenericsDemo_extends_wildcard_boundary_App/GenericsDemo/bin/GenericDemo.class
diff --git a/Later/Generics/8/GenericsDemo/src/A.java b/BasicJava/GenericsDemo_extends_wildcard_boundary_App/GenericsDemo/src/A.java
similarity index 100%
rename from Later/Generics/8/GenericsDemo/src/A.java
rename to BasicJava/GenericsDemo_extends_wildcard_boundary_App/GenericsDemo/src/A.java
diff --git a/Later/Generics/8/GenericsDemo/src/B.java b/BasicJava/GenericsDemo_extends_wildcard_boundary_App/GenericsDemo/src/B.java
similarity index 100%
rename from Later/Generics/8/GenericsDemo/src/B.java
rename to BasicJava/GenericsDemo_extends_wildcard_boundary_App/GenericsDemo/src/B.java
diff --git a/Later/Generics/8/GenericsDemo/src/C.java b/BasicJava/GenericsDemo_extends_wildcard_boundary_App/GenericsDemo/src/C.java
similarity index 100%
rename from Later/Generics/8/GenericsDemo/src/C.java
rename to BasicJava/GenericsDemo_extends_wildcard_boundary_App/GenericsDemo/src/C.java
diff --git a/Later/Generics/8/GenericsDemo/src/GenericDemo.java b/BasicJava/GenericsDemo_extends_wildcard_boundary_App/GenericsDemo/src/GenericDemo.java
similarity index 100%
rename from Later/Generics/8/GenericsDemo/src/GenericDemo.java
rename to BasicJava/GenericsDemo_extends_wildcard_boundary_App/GenericsDemo/src/GenericDemo.java
diff --git a/BasicJava/GenericsDemo_extends_wildcard_boundary_App/Output.txt b/BasicJava/GenericsDemo_extends_wildcard_boundary_App/Output.txt
new file mode 100644
index 000000000..3c47be243
--- /dev/null
+++ b/BasicJava/GenericsDemo_extends_wildcard_boundary_App/Output.txt
@@ -0,0 +1,9 @@
+class A
+value = 10
+------------
+class B
+value = 10
+------------
+class C
+value = 10
+------------
diff --git a/Later/Generics/7/GenericsDemo/.classpath b/BasicJava/GenericsDemo_lower_bounded_wildcard_App/GenericsDemo/.classpath
similarity index 100%
rename from Later/Generics/7/GenericsDemo/.classpath
rename to BasicJava/GenericsDemo_lower_bounded_wildcard_App/GenericsDemo/.classpath
diff --git a/Later/Generics/5.2/GenericsDemo/.project b/BasicJava/GenericsDemo_lower_bounded_wildcard_App/GenericsDemo/.project
similarity index 100%
rename from Later/Generics/5.2/GenericsDemo/.project
rename to BasicJava/GenericsDemo_lower_bounded_wildcard_App/GenericsDemo/.project
diff --git a/Later/Generics/7/GenericsDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/GenericsDemo_lower_bounded_wildcard_App/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Generics/7/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/GenericsDemo_lower_bounded_wildcard_App/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/GenericsDemo_lower_bounded_wildcard_App/GenericsDemo/bin/GenericDemo.class b/BasicJava/GenericsDemo_lower_bounded_wildcard_App/GenericsDemo/bin/GenericDemo.class
new file mode 100644
index 000000000..9c3be945a
Binary files /dev/null and b/BasicJava/GenericsDemo_lower_bounded_wildcard_App/GenericsDemo/bin/GenericDemo.class differ
diff --git a/BasicJava/GenericsDemo_lower_bounded_wildcard_App/GenericsDemo/src/GenericDemo.java b/BasicJava/GenericsDemo_lower_bounded_wildcard_App/GenericsDemo/src/GenericDemo.java
new file mode 100644
index 000000000..8099c0bcd
--- /dev/null
+++ b/BasicJava/GenericsDemo_lower_bounded_wildcard_App/GenericsDemo/src/GenericDemo.java
@@ -0,0 +1,24 @@
+import java.util.ArrayList;
+import java.util.List;
+
+public class GenericDemo
+{
+
+ public static void main(String[] args)
+ {
+
+ List integerList = new ArrayList();
+ addIntegers(integerList);
+
+ List numberList = new ArrayList();
+ addIntegers(numberList);
+
+ }
+
+ public static void addIntegers(List super Integer> list)
+ {
+ list.add(new Integer(50));
+ System.out.println(list);
+ }
+
+}
diff --git a/BasicJava/GenericsDemo_lower_bounded_wildcard_App/Output.txt b/BasicJava/GenericsDemo_lower_bounded_wildcard_App/Output.txt
new file mode 100644
index 000000000..9ec991fc8
--- /dev/null
+++ b/BasicJava/GenericsDemo_lower_bounded_wildcard_App/Output.txt
@@ -0,0 +1,2 @@
+[50]
+[50]
diff --git a/Later/Generics/8/GenericsDemo/.classpath b/BasicJava/GenericsDemo_multi_type_param_App/GenericsDemo/.classpath
similarity index 100%
rename from Later/Generics/8/GenericsDemo/.classpath
rename to BasicJava/GenericsDemo_multi_type_param_App/GenericsDemo/.classpath
diff --git a/Later/Generics/5.3/GenericsDemo/.project b/BasicJava/GenericsDemo_multi_type_param_App/GenericsDemo/.project
similarity index 100%
rename from Later/Generics/5.3/GenericsDemo/.project
rename to BasicJava/GenericsDemo_multi_type_param_App/GenericsDemo/.project
diff --git a/Later/Generics/8/GenericsDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/GenericsDemo_multi_type_param_App/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Generics/8/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/GenericsDemo_multi_type_param_App/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/GenericsDemo_multi_type_param_App/GenericsDemo/bin/GenericDemo.class b/BasicJava/GenericsDemo_multi_type_param_App/GenericsDemo/bin/GenericDemo.class
new file mode 100644
index 000000000..8353bdb9c
Binary files /dev/null and b/BasicJava/GenericsDemo_multi_type_param_App/GenericsDemo/bin/GenericDemo.class differ
diff --git a/Later/Generics/4.3/GenericsDemo/bin/OrderedPair.class b/BasicJava/GenericsDemo_multi_type_param_App/GenericsDemo/bin/OrderedPair.class
similarity index 100%
rename from Later/Generics/4.3/GenericsDemo/bin/OrderedPair.class
rename to BasicJava/GenericsDemo_multi_type_param_App/GenericsDemo/bin/OrderedPair.class
diff --git a/Later/Generics/4.3/GenericsDemo/bin/Pair.class b/BasicJava/GenericsDemo_multi_type_param_App/GenericsDemo/bin/Pair.class
similarity index 100%
rename from Later/Generics/4.3/GenericsDemo/bin/Pair.class
rename to BasicJava/GenericsDemo_multi_type_param_App/GenericsDemo/bin/Pair.class
diff --git a/BasicJava/GenericsDemo_multi_type_param_App/GenericsDemo/src/GenericDemo.java b/BasicJava/GenericsDemo_multi_type_param_App/GenericsDemo/src/GenericDemo.java
new file mode 100644
index 000000000..898d58635
--- /dev/null
+++ b/BasicJava/GenericsDemo_multi_type_param_App/GenericsDemo/src/GenericDemo.java
@@ -0,0 +1,29 @@
+import java.util.ArrayList;
+import java.util.List;
+
+public class GenericDemo
+{
+
+ public static void main(String[] args)
+ {
+ Pair pair1 = new OrderedPair("age", 12);
+ System.out.println(pair1.getKey() + "=" + pair1.getValue());
+
+ Pair pair2 = new OrderedPair("user", "root");
+ System.out.println(pair2.getKey() + "=" + pair2.getValue());
+
+ List nameList = new ArrayList<>();
+ nameList.add("Peter");
+ nameList.add("Ram");
+
+ /*
+ * We can also substitute a type parameter (i.e., K or V) with
+ * a parameterized type (i.e., List).
+ */
+ Pair> pair3 = new OrderedPair>(
+ "names", nameList);
+ System.out.println(pair3.getKey() + "=" + pair3.getValue());
+
+ }
+
+}
diff --git a/Later/Generics/4.3/GenericsDemo/src/OrderedPair.java b/BasicJava/GenericsDemo_multi_type_param_App/GenericsDemo/src/OrderedPair.java
similarity index 100%
rename from Later/Generics/4.3/GenericsDemo/src/OrderedPair.java
rename to BasicJava/GenericsDemo_multi_type_param_App/GenericsDemo/src/OrderedPair.java
diff --git a/BasicJava/GenericsDemo_multi_type_param_App/Output.txt b/BasicJava/GenericsDemo_multi_type_param_App/Output.txt
new file mode 100644
index 000000000..26aa8d329
--- /dev/null
+++ b/BasicJava/GenericsDemo_multi_type_param_App/Output.txt
@@ -0,0 +1,3 @@
+age=12
+user=root
+names=[Peter, Ram]
diff --git a/Later/Generics/9/GenericsDemo/.classpath b/BasicJava/GenericsDemo_super_wildcard_boundary_App/GenericsDemo/.classpath
similarity index 100%
rename from Later/Generics/9/GenericsDemo/.classpath
rename to BasicJava/GenericsDemo_super_wildcard_boundary_App/GenericsDemo/.classpath
diff --git a/Later/Generics/5.4/GenericsDemo/.project b/BasicJava/GenericsDemo_super_wildcard_boundary_App/GenericsDemo/.project
similarity index 100%
rename from Later/Generics/5.4/GenericsDemo/.project
rename to BasicJava/GenericsDemo_super_wildcard_boundary_App/GenericsDemo/.project
diff --git a/Later/Generics/9/GenericsDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/GenericsDemo_super_wildcard_boundary_App/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Generics/9/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/GenericsDemo_super_wildcard_boundary_App/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/Later/Generics/9/GenericsDemo/bin/A.class b/BasicJava/GenericsDemo_super_wildcard_boundary_App/GenericsDemo/bin/A.class
similarity index 100%
rename from Later/Generics/9/GenericsDemo/bin/A.class
rename to BasicJava/GenericsDemo_super_wildcard_boundary_App/GenericsDemo/bin/A.class
diff --git a/Later/Generics/9/GenericsDemo/bin/B.class b/BasicJava/GenericsDemo_super_wildcard_boundary_App/GenericsDemo/bin/B.class
similarity index 100%
rename from Later/Generics/9/GenericsDemo/bin/B.class
rename to BasicJava/GenericsDemo_super_wildcard_boundary_App/GenericsDemo/bin/B.class
diff --git a/Later/Generics/9/GenericsDemo/bin/C.class b/BasicJava/GenericsDemo_super_wildcard_boundary_App/GenericsDemo/bin/C.class
similarity index 100%
rename from Later/Generics/9/GenericsDemo/bin/C.class
rename to BasicJava/GenericsDemo_super_wildcard_boundary_App/GenericsDemo/bin/C.class
diff --git a/Later/Generics/9/GenericsDemo/bin/GenericDemo.class b/BasicJava/GenericsDemo_super_wildcard_boundary_App/GenericsDemo/bin/GenericDemo.class
similarity index 100%
rename from Later/Generics/9/GenericsDemo/bin/GenericDemo.class
rename to BasicJava/GenericsDemo_super_wildcard_boundary_App/GenericsDemo/bin/GenericDemo.class
diff --git a/Later/Generics/9/GenericsDemo/src/A.java b/BasicJava/GenericsDemo_super_wildcard_boundary_App/GenericsDemo/src/A.java
similarity index 100%
rename from Later/Generics/9/GenericsDemo/src/A.java
rename to BasicJava/GenericsDemo_super_wildcard_boundary_App/GenericsDemo/src/A.java
diff --git a/Later/Generics/9/GenericsDemo/src/B.java b/BasicJava/GenericsDemo_super_wildcard_boundary_App/GenericsDemo/src/B.java
similarity index 100%
rename from Later/Generics/9/GenericsDemo/src/B.java
rename to BasicJava/GenericsDemo_super_wildcard_boundary_App/GenericsDemo/src/B.java
diff --git a/Later/Generics/9/GenericsDemo/src/C.java b/BasicJava/GenericsDemo_super_wildcard_boundary_App/GenericsDemo/src/C.java
similarity index 100%
rename from Later/Generics/9/GenericsDemo/src/C.java
rename to BasicJava/GenericsDemo_super_wildcard_boundary_App/GenericsDemo/src/C.java
diff --git a/Later/Generics/9/GenericsDemo/src/GenericDemo.java b/BasicJava/GenericsDemo_super_wildcard_boundary_App/GenericsDemo/src/GenericDemo.java
similarity index 100%
rename from Later/Generics/9/GenericsDemo/src/GenericDemo.java
rename to BasicJava/GenericsDemo_super_wildcard_boundary_App/GenericsDemo/src/GenericDemo.java
diff --git a/BasicJava/GenericsDemo_super_wildcard_boundary_App/Output.txt b/BasicJava/GenericsDemo_super_wildcard_boundary_App/Output.txt
new file mode 100644
index 000000000..b5c858630
--- /dev/null
+++ b/BasicJava/GenericsDemo_super_wildcard_boundary_App/Output.txt
@@ -0,0 +1,2 @@
+listA = [A@15db9742, B@6d06d69c, C@7852e922]
+listObject = [A@4e25154f, B@70dea4e, C@5c647e05]
diff --git a/Later/Lambda/1.1/LambdaDemo/.classpath b/BasicJava/GenericsDemo_unbounded_wildcard_App/GenericsDemo/.classpath
similarity index 100%
rename from Later/Lambda/1.1/LambdaDemo/.classpath
rename to BasicJava/GenericsDemo_unbounded_wildcard_App/GenericsDemo/.classpath
diff --git a/Later/Generics/5/GenericsDemo/.project b/BasicJava/GenericsDemo_unbounded_wildcard_App/GenericsDemo/.project
similarity index 100%
rename from Later/Generics/5/GenericsDemo/.project
rename to BasicJava/GenericsDemo_unbounded_wildcard_App/GenericsDemo/.project
diff --git a/Later/Lambda/1.1/LambdaDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/GenericsDemo_unbounded_wildcard_App/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Lambda/1.1/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/GenericsDemo_unbounded_wildcard_App/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/Later/Generics/6.2/GenericsDemo/bin/GenericDemo.class b/BasicJava/GenericsDemo_unbounded_wildcard_App/GenericsDemo/bin/GenericDemo.class
similarity index 100%
rename from Later/Generics/6.2/GenericsDemo/bin/GenericDemo.class
rename to BasicJava/GenericsDemo_unbounded_wildcard_App/GenericsDemo/bin/GenericDemo.class
diff --git a/Later/Generics/6.2/GenericsDemo/src/GenericDemo.java b/BasicJava/GenericsDemo_unbounded_wildcard_App/GenericsDemo/src/GenericDemo.java
similarity index 100%
rename from Later/Generics/6.2/GenericsDemo/src/GenericDemo.java
rename to BasicJava/GenericsDemo_unbounded_wildcard_App/GenericsDemo/src/GenericDemo.java
diff --git a/BasicJava/GenericsDemo_unbounded_wildcard_App/Output.txt b/BasicJava/GenericsDemo_unbounded_wildcard_App/Output.txt
new file mode 100644
index 000000000..e35189a25
--- /dev/null
+++ b/BasicJava/GenericsDemo_unbounded_wildcard_App/Output.txt
@@ -0,0 +1,6 @@
+Peter
+Ram
+--------------------------
+2
+3
+5
diff --git a/Later/Lambda/1/LambdaDemo/.classpath b/BasicJava/GenericsDemo_unknown_wildcard_App/GenericsDemo/.classpath
similarity index 100%
rename from Later/Lambda/1/LambdaDemo/.classpath
rename to BasicJava/GenericsDemo_unknown_wildcard_App/GenericsDemo/.classpath
diff --git a/Later/Generics/6.1/GenericsDemo/.project b/BasicJava/GenericsDemo_unknown_wildcard_App/GenericsDemo/.project
similarity index 100%
rename from Later/Generics/6.1/GenericsDemo/.project
rename to BasicJava/GenericsDemo_unknown_wildcard_App/GenericsDemo/.project
diff --git a/Later/Lambda/1/LambdaDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/GenericsDemo_unknown_wildcard_App/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Lambda/1/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/GenericsDemo_unknown_wildcard_App/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/Later/Generics/7/GenericsDemo/bin/GenericDemo.class b/BasicJava/GenericsDemo_unknown_wildcard_App/GenericsDemo/bin/GenericDemo.class
similarity index 100%
rename from Later/Generics/7/GenericsDemo/bin/GenericDemo.class
rename to BasicJava/GenericsDemo_unknown_wildcard_App/GenericsDemo/bin/GenericDemo.class
diff --git a/Later/Generics/7/GenericsDemo/src/GenericDemo.java b/BasicJava/GenericsDemo_unknown_wildcard_App/GenericsDemo/src/GenericDemo.java
similarity index 100%
rename from Later/Generics/7/GenericsDemo/src/GenericDemo.java
rename to BasicJava/GenericsDemo_unknown_wildcard_App/GenericsDemo/src/GenericDemo.java
diff --git a/BasicJava/GenericsDemo_unknown_wildcard_App/Output.txt b/BasicJava/GenericsDemo_unknown_wildcard_App/Output.txt
new file mode 100644
index 000000000..7fd0c812b
--- /dev/null
+++ b/BasicJava/GenericsDemo_unknown_wildcard_App/Output.txt
@@ -0,0 +1,5 @@
+100
+200
+--------------------------------
+Peter
+Ram
diff --git a/BasicJava/GenericsDemo_upper_bounded_wildcard_App/GenericDemo1_Output.txt b/BasicJava/GenericsDemo_upper_bounded_wildcard_App/GenericDemo1_Output.txt
new file mode 100644
index 000000000..2fb1cc286
--- /dev/null
+++ b/BasicJava/GenericsDemo_upper_bounded_wildcard_App/GenericDemo1_Output.txt
@@ -0,0 +1,5 @@
+Exception in thread "main" java.lang.Error: Unresolved compilation problem:
+ The method sum(List) in the type GenericDemo1
+ is not applicable for the arguments (List)
+
+ at GenericDemo1.main(GenericDemo1.java:20)
diff --git a/BasicJava/GenericsDemo_upper_bounded_wildcard_App/GenericDemo2_Output.txt b/BasicJava/GenericsDemo_upper_bounded_wildcard_App/GenericDemo2_Output.txt
new file mode 100644
index 000000000..41528c0a7
--- /dev/null
+++ b/BasicJava/GenericsDemo_upper_bounded_wildcard_App/GenericDemo2_Output.txt
@@ -0,0 +1,2 @@
+sum = 10.0
+sum = 103.0
diff --git a/Later/Lambda/10/LambdaDemo/.classpath b/BasicJava/GenericsDemo_upper_bounded_wildcard_App/GenericsDemo/.classpath
similarity index 100%
rename from Later/Lambda/10/LambdaDemo/.classpath
rename to BasicJava/GenericsDemo_upper_bounded_wildcard_App/GenericsDemo/.classpath
diff --git a/Later/Generics/6.2/GenericsDemo/.project b/BasicJava/GenericsDemo_upper_bounded_wildcard_App/GenericsDemo/.project
similarity index 100%
rename from Later/Generics/6.2/GenericsDemo/.project
rename to BasicJava/GenericsDemo_upper_bounded_wildcard_App/GenericsDemo/.project
diff --git a/Later/Lambda/10/LambdaDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/GenericsDemo_upper_bounded_wildcard_App/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Lambda/10/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/GenericsDemo_upper_bounded_wildcard_App/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/GenericsDemo_upper_bounded_wildcard_App/GenericsDemo/bin/GenericDemo1.class b/BasicJava/GenericsDemo_upper_bounded_wildcard_App/GenericsDemo/bin/GenericDemo1.class
new file mode 100644
index 000000000..58629589a
Binary files /dev/null and b/BasicJava/GenericsDemo_upper_bounded_wildcard_App/GenericsDemo/bin/GenericDemo1.class differ
diff --git a/Later/Generics/6.1/GenericsDemo/bin/GenericDemo2.class b/BasicJava/GenericsDemo_upper_bounded_wildcard_App/GenericsDemo/bin/GenericDemo2.class
similarity index 100%
rename from Later/Generics/6.1/GenericsDemo/bin/GenericDemo2.class
rename to BasicJava/GenericsDemo_upper_bounded_wildcard_App/GenericsDemo/bin/GenericDemo2.class
diff --git a/Later/Generics/6.1/GenericsDemo/src/GenericDemo1.java b/BasicJava/GenericsDemo_upper_bounded_wildcard_App/GenericsDemo/src/GenericDemo1.java
similarity index 75%
rename from Later/Generics/6.1/GenericsDemo/src/GenericDemo1.java
rename to BasicJava/GenericsDemo_upper_bounded_wildcard_App/GenericsDemo/src/GenericDemo1.java
index f4920f4c6..2308ccb60 100644
--- a/Later/Generics/6.1/GenericsDemo/src/GenericDemo1.java
+++ b/BasicJava/GenericsDemo_upper_bounded_wildcard_App/GenericsDemo/src/GenericDemo1.java
@@ -7,18 +7,18 @@ public class GenericDemo1
public static void main(String[] args)
{
List numberList= new ArrayList();
- numberList.add(2);
- numberList.add(3);
- numberList.add(5);
+ numberList.add(2.2);
+ numberList.add(3.3);
+ numberList.add(5.5);
double sum = sum(numberList);
System.out.println("sum = " + sum);
- /*List integerList= new ArrayList();
+ List integerList= new ArrayList();
integerList.add(2);
integerList.add(3);
integerList.add(5);
sum = sum(integerList);
- System.out.println("sum = " + sum);*/
+ System.out.println("sum = " + sum);
}
diff --git a/Later/Generics/6.1/GenericsDemo/src/GenericDemo2.java b/BasicJava/GenericsDemo_upper_bounded_wildcard_App/GenericsDemo/src/GenericDemo2.java
similarity index 100%
rename from Later/Generics/6.1/GenericsDemo/src/GenericDemo2.java
rename to BasicJava/GenericsDemo_upper_bounded_wildcard_App/GenericsDemo/src/GenericDemo2.java
diff --git a/Later/Lambda/11/LambdaDemo/.classpath b/BasicJava/GenericsMethodDemo_Add_R_App/GenericsDemo/.classpath
similarity index 100%
rename from Later/Lambda/11/LambdaDemo/.classpath
rename to BasicJava/GenericsMethodDemo_Add_R_App/GenericsDemo/.classpath
diff --git a/Later/Generics/6.3/GenericsDemo/.project b/BasicJava/GenericsMethodDemo_Add_R_App/GenericsDemo/.project
similarity index 100%
rename from Later/Generics/6.3/GenericsDemo/.project
rename to BasicJava/GenericsMethodDemo_Add_R_App/GenericsDemo/.project
diff --git a/Later/Lambda/11/LambdaDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/GenericsMethodDemo_Add_R_App/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Lambda/11/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/GenericsMethodDemo_Add_R_App/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/Later/Generics/5.1/GenericsDemo/bin/GenericDemo.class b/BasicJava/GenericsMethodDemo_Add_R_App/GenericsDemo/bin/GenericDemo.class
similarity index 100%
rename from Later/Generics/5.1/GenericsDemo/bin/GenericDemo.class
rename to BasicJava/GenericsMethodDemo_Add_R_App/GenericsDemo/bin/GenericDemo.class
diff --git a/Later/Generics/5.1/GenericsDemo/src/GenericDemo.java b/BasicJava/GenericsMethodDemo_Add_R_App/GenericsDemo/src/GenericDemo.java
similarity index 100%
rename from Later/Generics/5.1/GenericsDemo/src/GenericDemo.java
rename to BasicJava/GenericsMethodDemo_Add_R_App/GenericsDemo/src/GenericDemo.java
diff --git a/BasicJava/GenericsMethodDemo_Add_R_App/Output.txt b/BasicJava/GenericsMethodDemo_Add_R_App/Output.txt
new file mode 100644
index 000000000..0f7dede9c
--- /dev/null
+++ b/BasicJava/GenericsMethodDemo_Add_R_App/Output.txt
@@ -0,0 +1,2 @@
+Peter
+500
diff --git a/Later/Lambda/12/LambdaDemo/.classpath b/BasicJava/GenericsMethodDemo_Bird_emp_App/GenericsDemo/.classpath
similarity index 100%
rename from Later/Lambda/12/LambdaDemo/.classpath
rename to BasicJava/GenericsMethodDemo_Bird_emp_App/GenericsDemo/.classpath
diff --git a/Later/Generics/6/GenericsDemo/.project b/BasicJava/GenericsMethodDemo_Bird_emp_App/GenericsDemo/.project
similarity index 100%
rename from Later/Generics/6/GenericsDemo/.project
rename to BasicJava/GenericsMethodDemo_Bird_emp_App/GenericsDemo/.project
diff --git a/Later/Lambda/12/LambdaDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/GenericsMethodDemo_Bird_emp_App/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Lambda/12/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/GenericsMethodDemo_Bird_emp_App/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/Later/Generics/5.2/GenericsDemo/bin/Bird.class b/BasicJava/GenericsMethodDemo_Bird_emp_App/GenericsDemo/bin/Bird.class
similarity index 100%
rename from Later/Generics/5.2/GenericsDemo/bin/Bird.class
rename to BasicJava/GenericsMethodDemo_Bird_emp_App/GenericsDemo/bin/Bird.class
diff --git a/Later/Generics/5.2/GenericsDemo/bin/Employee.class b/BasicJava/GenericsMethodDemo_Bird_emp_App/GenericsDemo/bin/Employee.class
similarity index 100%
rename from Later/Generics/5.2/GenericsDemo/bin/Employee.class
rename to BasicJava/GenericsMethodDemo_Bird_emp_App/GenericsDemo/bin/Employee.class
diff --git a/Later/Generics/5.2/GenericsDemo/bin/GenericDemo.class b/BasicJava/GenericsMethodDemo_Bird_emp_App/GenericsDemo/bin/GenericDemo.class
similarity index 100%
rename from Later/Generics/5.2/GenericsDemo/bin/GenericDemo.class
rename to BasicJava/GenericsMethodDemo_Bird_emp_App/GenericsDemo/bin/GenericDemo.class
diff --git a/Later/Generics/5.2/GenericsDemo/src/Bird.java b/BasicJava/GenericsMethodDemo_Bird_emp_App/GenericsDemo/src/Bird.java
similarity index 100%
rename from Later/Generics/5.2/GenericsDemo/src/Bird.java
rename to BasicJava/GenericsMethodDemo_Bird_emp_App/GenericsDemo/src/Bird.java
diff --git a/Later/Generics/5.2/GenericsDemo/src/Employee.java b/BasicJava/GenericsMethodDemo_Bird_emp_App/GenericsDemo/src/Employee.java
similarity index 100%
rename from Later/Generics/5.2/GenericsDemo/src/Employee.java
rename to BasicJava/GenericsMethodDemo_Bird_emp_App/GenericsDemo/src/Employee.java
diff --git a/Later/Generics/5.2/GenericsDemo/src/GenericDemo.java b/BasicJava/GenericsMethodDemo_Bird_emp_App/GenericsDemo/src/GenericDemo.java
similarity index 100%
rename from Later/Generics/5.2/GenericsDemo/src/GenericDemo.java
rename to BasicJava/GenericsMethodDemo_Bird_emp_App/GenericsDemo/src/GenericDemo.java
diff --git a/BasicJava/GenericsMethodDemo_Bird_emp_App/Output.txt b/BasicJava/GenericsMethodDemo_Bird_emp_App/Output.txt
new file mode 100644
index 000000000..acb865209
--- /dev/null
+++ b/BasicJava/GenericsMethodDemo_Bird_emp_App/Output.txt
@@ -0,0 +1,2 @@
+Bird@58d25a40
+Employee@726f3b58
diff --git a/Later/Lambda/13/LambdaDemo/.classpath b/BasicJava/GenericsMethodDemo_OP_App/GenericsDemo/.classpath
similarity index 100%
rename from Later/Lambda/13/LambdaDemo/.classpath
rename to BasicJava/GenericsMethodDemo_OP_App/GenericsDemo/.classpath
diff --git a/Later/Generics/7/GenericsDemo/.project b/BasicJava/GenericsMethodDemo_OP_App/GenericsDemo/.project
similarity index 100%
rename from Later/Generics/7/GenericsDemo/.project
rename to BasicJava/GenericsMethodDemo_OP_App/GenericsDemo/.project
diff --git a/Later/Lambda/13/LambdaDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/GenericsMethodDemo_OP_App/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Lambda/13/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/GenericsMethodDemo_OP_App/GenericsDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/GenericsMethodDemo_OP_App/GenericsDemo/bin/GenericDemo.class b/BasicJava/GenericsMethodDemo_OP_App/GenericsDemo/bin/GenericDemo.class
new file mode 100644
index 000000000..f025f05a9
Binary files /dev/null and b/BasicJava/GenericsMethodDemo_OP_App/GenericsDemo/bin/GenericDemo.class differ
diff --git a/Later/Generics/5.3/GenericsDemo/bin/OrderPair.class b/BasicJava/GenericsMethodDemo_OP_App/GenericsDemo/bin/OrderPair.class
similarity index 100%
rename from Later/Generics/5.3/GenericsDemo/bin/OrderPair.class
rename to BasicJava/GenericsMethodDemo_OP_App/GenericsDemo/bin/OrderPair.class
diff --git a/BasicJava/GenericsMethodDemo_OP_App/GenericsDemo/src/GenericDemo.java b/BasicJava/GenericsMethodDemo_OP_App/GenericsDemo/src/GenericDemo.java
new file mode 100644
index 000000000..8a1998b7b
--- /dev/null
+++ b/BasicJava/GenericsMethodDemo_OP_App/GenericsDemo/src/GenericDemo.java
@@ -0,0 +1,23 @@
+public class GenericDemo
+{
+
+ public static void main(String[] args)
+ {
+ OrderPair p1 = new OrderPair(1, "apple");
+ OrderPair p2 = new OrderPair(1, "apple");
+ boolean same = GenericDemo.compare(p1, p2);
+
+ //Like below also we can invoke.
+ //boolean same = GenericDemo.compare(p1, p2);
+ System.out.println("is p1 and p2 are same? = " + same);
+
+ }
+
+ public static boolean compare(OrderPair p1,
+ OrderPair p2)
+ {
+ return p1.getKey().equals(p2.getKey())
+ && p1.getValue().equals(p2.getValue());
+ }
+
+}
diff --git a/Later/Generics/5.3/GenericsDemo/src/OrderPair.java b/BasicJava/GenericsMethodDemo_OP_App/GenericsDemo/src/OrderPair.java
similarity index 100%
rename from Later/Generics/5.3/GenericsDemo/src/OrderPair.java
rename to BasicJava/GenericsMethodDemo_OP_App/GenericsDemo/src/OrderPair.java
diff --git a/BasicJava/GenericsMethodDemo_OP_App/Output.txt b/BasicJava/GenericsMethodDemo_OP_App/Output.txt
new file mode 100644
index 000000000..fc36d71d0
--- /dev/null
+++ b/BasicJava/GenericsMethodDemo_OP_App/Output.txt
@@ -0,0 +1 @@
+is p1 and p2 are same? = true
diff --git a/BasicJava/HelloWorld_JDK_Install/HelloWorld.java b/BasicJava/HelloWorld_JDK_Install/HelloWorld.java
new file mode 100644
index 000000000..0ee26ba66
--- /dev/null
+++ b/BasicJava/HelloWorld_JDK_Install/HelloWorld.java
@@ -0,0 +1,7 @@
+public class HelloWorld
+{
+ public static void main(String[] args)
+ {
+ System.out.println("Hello, World");
+ }
+}
\ No newline at end of file
diff --git a/Later/Lambda/14/LambdaDemo/.classpath b/BasicJava/LambdaDemo_Cons_ref_app/LambdaDemo/.classpath
similarity index 100%
rename from Later/Lambda/14/LambdaDemo/.classpath
rename to BasicJava/LambdaDemo_Cons_ref_app/LambdaDemo/.classpath
diff --git a/Later/Lambda/1.1/LambdaDemo/.project b/BasicJava/LambdaDemo_Cons_ref_app/LambdaDemo/.project
similarity index 100%
rename from Later/Lambda/1.1/LambdaDemo/.project
rename to BasicJava/LambdaDemo_Cons_ref_app/LambdaDemo/.project
diff --git a/Later/Lambda/14/LambdaDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LambdaDemo_Cons_ref_app/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Lambda/14/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LambdaDemo_Cons_ref_app/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/LambdaDemo_Cons_ref_app/LambdaDemo/bin/LambdaDemo.class b/BasicJava/LambdaDemo_Cons_ref_app/LambdaDemo/bin/LambdaDemo.class
new file mode 100644
index 000000000..3a4afaf29
Binary files /dev/null and b/BasicJava/LambdaDemo_Cons_ref_app/LambdaDemo/bin/LambdaDemo.class differ
diff --git a/BasicJava/LambdaDemo_Cons_ref_app/LambdaDemo/bin/Message.class b/BasicJava/LambdaDemo_Cons_ref_app/LambdaDemo/bin/Message.class
new file mode 100644
index 000000000..583ba146c
Binary files /dev/null and b/BasicJava/LambdaDemo_Cons_ref_app/LambdaDemo/bin/Message.class differ
diff --git a/BasicJava/LambdaDemo_Cons_ref_app/LambdaDemo/src/LambdaDemo.java b/BasicJava/LambdaDemo_Cons_ref_app/LambdaDemo/src/LambdaDemo.java
new file mode 100644
index 000000000..40d20ab51
--- /dev/null
+++ b/BasicJava/LambdaDemo_Cons_ref_app/LambdaDemo/src/LambdaDemo.java
@@ -0,0 +1,34 @@
+@FunctionalInterface
+interface Message
+{
+ String displayMessage(char[] chArray);
+}
+
+public class LambdaDemo
+{
+ public static void main(String[] args)
+ {
+
+ /*
+ * Note that, in this program strFunc() of FunctionalInterface
+ * returns a reference of type String. In this program, the
+ * expression "String::new" creates a constructor reference to
+ * the String's constructor.
+ */
+ Message message = String::new;
+
+ char[] charArray = { 'P', 'e', 't', 'e', 'r' };
+
+ /*
+ * Here the method StrFunc() takes a Character array as an
+ * argument, so the parameterized constructor
+ * String(char[] charArray) is referred here.
+ *
+ * So finally, when ever you call the method strFunc() on
+ * FunctionalInterface reference, a String object is
+ * constructed and returned.
+ */
+ System.out.println(message.displayMessage(charArray));
+ }
+
+}
diff --git a/BasicJava/LambdaDemo_Cons_ref_app/Output.txt b/BasicJava/LambdaDemo_Cons_ref_app/Output.txt
new file mode 100644
index 000000000..5089231f7
--- /dev/null
+++ b/BasicJava/LambdaDemo_Cons_ref_app/Output.txt
@@ -0,0 +1 @@
+Peter
diff --git a/Later/Lambda/15/LambdaDemo/.classpath b/BasicJava/LambdaDemo_FI_App/LambdaDemo/.classpath
similarity index 100%
rename from Later/Lambda/15/LambdaDemo/.classpath
rename to BasicJava/LambdaDemo_FI_App/LambdaDemo/.classpath
diff --git a/Later/Lambda/1/LambdaDemo/.project b/BasicJava/LambdaDemo_FI_App/LambdaDemo/.project
similarity index 100%
rename from Later/Lambda/1/LambdaDemo/.project
rename to BasicJava/LambdaDemo_FI_App/LambdaDemo/.project
diff --git a/Later/Lambda/15/LambdaDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LambdaDemo_FI_App/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Lambda/15/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LambdaDemo_FI_App/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/Later/Lambda/1.1/LambdaDemo/bin/StringLengthLambda.class b/BasicJava/LambdaDemo_FI_App/LambdaDemo/bin/StringLengthLambda.class
similarity index 100%
rename from Later/Lambda/1.1/LambdaDemo/bin/StringLengthLambda.class
rename to BasicJava/LambdaDemo_FI_App/LambdaDemo/bin/StringLengthLambda.class
diff --git a/Later/Lambda/1.1/LambdaDemo/src/StringLengthLambda.java b/BasicJava/LambdaDemo_FI_App/LambdaDemo/src/StringLengthLambda.java
similarity index 100%
rename from Later/Lambda/1.1/LambdaDemo/src/StringLengthLambda.java
rename to BasicJava/LambdaDemo_FI_App/LambdaDemo/src/StringLengthLambda.java
diff --git a/Later/Lambda/16/LambdaDemo/.classpath b/BasicJava/LambdaDemo_Instance_method_ref_mechanic-app/LambdaDemo/.classpath
similarity index 100%
rename from Later/Lambda/16/LambdaDemo/.classpath
rename to BasicJava/LambdaDemo_Instance_method_ref_mechanic-app/LambdaDemo/.classpath
diff --git a/Later/Lambda/10/LambdaDemo/.project b/BasicJava/LambdaDemo_Instance_method_ref_mechanic-app/LambdaDemo/.project
similarity index 100%
rename from Later/Lambda/10/LambdaDemo/.project
rename to BasicJava/LambdaDemo_Instance_method_ref_mechanic-app/LambdaDemo/.project
diff --git a/Later/Lambda/16/LambdaDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LambdaDemo_Instance_method_ref_mechanic-app/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Lambda/16/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LambdaDemo_Instance_method_ref_mechanic-app/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/Later/Lambda/22/LambdaDemo/bin/Car.class b/BasicJava/LambdaDemo_Instance_method_ref_mechanic-app/LambdaDemo/bin/Car.class
similarity index 100%
rename from Later/Lambda/22/LambdaDemo/bin/Car.class
rename to BasicJava/LambdaDemo_Instance_method_ref_mechanic-app/LambdaDemo/bin/Car.class
diff --git a/Later/Lambda/22/LambdaDemo/bin/LambdaDemo$1.class b/BasicJava/LambdaDemo_Instance_method_ref_mechanic-app/LambdaDemo/bin/LambdaDemo$1.class
similarity index 100%
rename from Later/Lambda/22/LambdaDemo/bin/LambdaDemo$1.class
rename to BasicJava/LambdaDemo_Instance_method_ref_mechanic-app/LambdaDemo/bin/LambdaDemo$1.class
diff --git a/Later/Lambda/22/LambdaDemo/bin/LambdaDemo.class b/BasicJava/LambdaDemo_Instance_method_ref_mechanic-app/LambdaDemo/bin/LambdaDemo.class
similarity index 100%
rename from Later/Lambda/22/LambdaDemo/bin/LambdaDemo.class
rename to BasicJava/LambdaDemo_Instance_method_ref_mechanic-app/LambdaDemo/bin/LambdaDemo.class
diff --git a/Later/Lambda/22/LambdaDemo/bin/Mechanic.class b/BasicJava/LambdaDemo_Instance_method_ref_mechanic-app/LambdaDemo/bin/Mechanic.class
similarity index 100%
rename from Later/Lambda/22/LambdaDemo/bin/Mechanic.class
rename to BasicJava/LambdaDemo_Instance_method_ref_mechanic-app/LambdaDemo/bin/Mechanic.class
diff --git a/Later/Lambda/22/LambdaDemo/src/LambdaDemo.java b/BasicJava/LambdaDemo_Instance_method_ref_mechanic-app/LambdaDemo/src/LambdaDemo.java
similarity index 100%
rename from Later/Lambda/22/LambdaDemo/src/LambdaDemo.java
rename to BasicJava/LambdaDemo_Instance_method_ref_mechanic-app/LambdaDemo/src/LambdaDemo.java
diff --git a/Later/Lambda/22/LambdaDemo/src/Mechanic.java b/BasicJava/LambdaDemo_Instance_method_ref_mechanic-app/LambdaDemo/src/Mechanic.java
similarity index 100%
rename from Later/Lambda/22/LambdaDemo/src/Mechanic.java
rename to BasicJava/LambdaDemo_Instance_method_ref_mechanic-app/LambdaDemo/src/Mechanic.java
diff --git a/BasicJava/LambdaDemo_Instance_method_ref_mechanic-app/Output.txt b/BasicJava/LambdaDemo_Instance_method_ref_mechanic-app/Output.txt
new file mode 100644
index 000000000..78ad47a6b
--- /dev/null
+++ b/BasicJava/LambdaDemo_Instance_method_ref_mechanic-app/Output.txt
@@ -0,0 +1,3 @@
+Mechanic is fixing Honda Jazz
+Mechanic is fixing Honda Jazz
+Mechanic is fixing Honda Jazz
diff --git a/Later/Lambda/17/LambdaDemo/.classpath b/BasicJava/LambdaDemo_consumer_App/LambdaDemo/.classpath
similarity index 100%
rename from Later/Lambda/17/LambdaDemo/.classpath
rename to BasicJava/LambdaDemo_consumer_App/LambdaDemo/.classpath
diff --git a/Later/Lambda/11/LambdaDemo/.project b/BasicJava/LambdaDemo_consumer_App/LambdaDemo/.project
similarity index 100%
rename from Later/Lambda/11/LambdaDemo/.project
rename to BasicJava/LambdaDemo_consumer_App/LambdaDemo/.project
diff --git a/Later/Lambda/17/LambdaDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LambdaDemo_consumer_App/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Lambda/17/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LambdaDemo_consumer_App/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/LambdaDemo_consumer_App/LambdaDemo/bin/LambdaPredicateConsumerDemo.class b/BasicJava/LambdaDemo_consumer_App/LambdaDemo/bin/LambdaPredicateConsumerDemo.class
new file mode 100644
index 000000000..2a7515e23
Binary files /dev/null and b/BasicJava/LambdaDemo_consumer_App/LambdaDemo/bin/LambdaPredicateConsumerDemo.class differ
diff --git a/Later/Lambda/16/LambdaDemo/bin/Person.class b/BasicJava/LambdaDemo_consumer_App/LambdaDemo/bin/Person.class
similarity index 100%
rename from Later/Lambda/16/LambdaDemo/bin/Person.class
rename to BasicJava/LambdaDemo_consumer_App/LambdaDemo/bin/Person.class
diff --git a/Later/Lambda/9.4/LambdaDemo/src/LambdaPredicateConsumerDemo.java b/BasicJava/LambdaDemo_consumer_App/LambdaDemo/src/LambdaPredicateConsumerDemo.java
similarity index 88%
rename from Later/Lambda/9.4/LambdaDemo/src/LambdaPredicateConsumerDemo.java
rename to BasicJava/LambdaDemo_consumer_App/LambdaDemo/src/LambdaPredicateConsumerDemo.java
index 2854a75ed..6607885e8 100644
--- a/Later/Lambda/9.4/LambdaDemo/src/LambdaPredicateConsumerDemo.java
+++ b/BasicJava/LambdaDemo_consumer_App/LambdaDemo/src/LambdaPredicateConsumerDemo.java
@@ -20,15 +20,13 @@ public static void main(String[] args)
p -> p.getName().startsWith("B"),
p -> System.out.println(p));
- System.out
- .println("----------------------------------------");
+ System.out.println("----------------------------------------");
printNameBeginWith_B(personList,
p -> p.getName().startsWith("B"),
p -> System.out.println(p.getName()));
- System.out
- .println("----------------------------------------");
+ System.out.println("----------------------------------------");
printNameBeginWith_B(personList,
p -> p.getName().startsWith("B"),
diff --git a/Later/Lambda/16/LambdaDemo/src/Person.java b/BasicJava/LambdaDemo_consumer_App/LambdaDemo/src/Person.java
similarity index 100%
rename from Later/Lambda/16/LambdaDemo/src/Person.java
rename to BasicJava/LambdaDemo_consumer_App/LambdaDemo/src/Person.java
diff --git a/BasicJava/LambdaDemo_consumer_App/Output.txt b/BasicJava/LambdaDemo_consumer_App/Output.txt
new file mode 100644
index 000000000..09a3dd324
--- /dev/null
+++ b/BasicJava/LambdaDemo_consumer_App/Output.txt
@@ -0,0 +1,9 @@
+------------Name Starts with B---------
+Person [name=Balu, age=32]
+Person [name=Bharth, age=40]
+----------------------------------------
+Balu
+Bharth
+----------------------------------------
+32
+40
diff --git a/Later/Lambda/18.1/LambdaDemo/.classpath b/BasicJava/LambdaDemo_filter_list_person_startswith_app/LambdaDemo/.classpath
similarity index 100%
rename from Later/Lambda/18.1/LambdaDemo/.classpath
rename to BasicJava/LambdaDemo_filter_list_person_startswith_app/LambdaDemo/.classpath
diff --git a/Later/Lambda/12/LambdaDemo/.project b/BasicJava/LambdaDemo_filter_list_person_startswith_app/LambdaDemo/.project
similarity index 100%
rename from Later/Lambda/12/LambdaDemo/.project
rename to BasicJava/LambdaDemo_filter_list_person_startswith_app/LambdaDemo/.project
diff --git a/Later/Lambda/18.1/LambdaDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LambdaDemo_filter_list_person_startswith_app/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Lambda/18.1/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LambdaDemo_filter_list_person_startswith_app/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/LambdaDemo_filter_list_person_startswith_app/LambdaDemo/bin/LambdaDemo.class b/BasicJava/LambdaDemo_filter_list_person_startswith_app/LambdaDemo/bin/LambdaDemo.class
new file mode 100644
index 000000000..7e234e35b
Binary files /dev/null and b/BasicJava/LambdaDemo_filter_list_person_startswith_app/LambdaDemo/bin/LambdaDemo.class differ
diff --git a/Later/Lambda/17/LambdaDemo/bin/Person.class b/BasicJava/LambdaDemo_filter_list_person_startswith_app/LambdaDemo/bin/Person.class
similarity index 100%
rename from Later/Lambda/17/LambdaDemo/bin/Person.class
rename to BasicJava/LambdaDemo_filter_list_person_startswith_app/LambdaDemo/bin/Person.class
diff --git a/BasicJava/LambdaDemo_filter_list_person_startswith_app/LambdaDemo/src/LambdaDemo.java b/BasicJava/LambdaDemo_filter_list_person_startswith_app/LambdaDemo/src/LambdaDemo.java
new file mode 100644
index 000000000..4423bfd5d
--- /dev/null
+++ b/BasicJava/LambdaDemo_filter_list_person_startswith_app/LambdaDemo/src/LambdaDemo.java
@@ -0,0 +1,17 @@
+import java.util.Arrays;
+import java.util.List;
+
+public class LambdaDemo
+{
+ public static void main(String[] args)
+ {
+
+ List personList = Arrays.asList(new Person("Carla", 33),
+ new Person("Balu", 32), new Person("Bharth", 40),
+ new Person("Ajay", 31));
+
+ personList.stream().filter(person -> person.getName().startsWith("B"))
+ .forEach(person -> System.out.println(person));
+ }
+
+}
diff --git a/Later/Lambda/17/LambdaDemo/src/Person.java b/BasicJava/LambdaDemo_filter_list_person_startswith_app/LambdaDemo/src/Person.java
similarity index 100%
rename from Later/Lambda/17/LambdaDemo/src/Person.java
rename to BasicJava/LambdaDemo_filter_list_person_startswith_app/LambdaDemo/src/Person.java
diff --git a/BasicJava/LambdaDemo_filter_list_person_startswith_app/Output.txt b/BasicJava/LambdaDemo_filter_list_person_startswith_app/Output.txt
new file mode 100644
index 000000000..90b3cf25c
--- /dev/null
+++ b/BasicJava/LambdaDemo_filter_list_person_startswith_app/Output.txt
@@ -0,0 +1,2 @@
+Person [name=Balu, age=32]
+Person [name=Bharth, age=40]
diff --git a/Later/Lambda/18.2/LambdaDemo/.classpath b/BasicJava/LambdaDemo_filter_person_App/LambdaDemo/.classpath
similarity index 100%
rename from Later/Lambda/18.2/LambdaDemo/.classpath
rename to BasicJava/LambdaDemo_filter_person_App/LambdaDemo/.classpath
diff --git a/Later/Lambda/13/LambdaDemo/.project b/BasicJava/LambdaDemo_filter_person_App/LambdaDemo/.project
similarity index 100%
rename from Later/Lambda/13/LambdaDemo/.project
rename to BasicJava/LambdaDemo_filter_person_App/LambdaDemo/.project
diff --git a/Later/Lambda/18.2/LambdaDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LambdaDemo_filter_person_App/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Lambda/18.2/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LambdaDemo_filter_person_App/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/LambdaDemo_filter_person_App/LambdaDemo/bin/LambdaDemo.class b/BasicJava/LambdaDemo_filter_person_App/LambdaDemo/bin/LambdaDemo.class
new file mode 100644
index 000000000..a7969d18a
Binary files /dev/null and b/BasicJava/LambdaDemo_filter_person_App/LambdaDemo/bin/LambdaDemo.class differ
diff --git a/BasicJava/LambdaDemo_filter_person_App/LambdaDemo/bin/NonLambdaDemo$1.class b/BasicJava/LambdaDemo_filter_person_App/LambdaDemo/bin/NonLambdaDemo$1.class
new file mode 100644
index 000000000..27fce4617
Binary files /dev/null and b/BasicJava/LambdaDemo_filter_person_App/LambdaDemo/bin/NonLambdaDemo$1.class differ
diff --git a/BasicJava/LambdaDemo_filter_person_App/LambdaDemo/bin/NonLambdaDemo.class b/BasicJava/LambdaDemo_filter_person_App/LambdaDemo/bin/NonLambdaDemo.class
new file mode 100644
index 000000000..a811a8154
Binary files /dev/null and b/BasicJava/LambdaDemo_filter_person_App/LambdaDemo/bin/NonLambdaDemo.class differ
diff --git a/Later/Lambda/9.3/LambdaDemo/bin/Person.class b/BasicJava/LambdaDemo_filter_person_App/LambdaDemo/bin/Person.class
similarity index 100%
rename from Later/Lambda/9.3/LambdaDemo/bin/Person.class
rename to BasicJava/LambdaDemo_filter_person_App/LambdaDemo/bin/Person.class
diff --git a/BasicJava/LambdaDemo_filter_person_App/LambdaDemo/bin/PersonFilter.class b/BasicJava/LambdaDemo_filter_person_App/LambdaDemo/bin/PersonFilter.class
new file mode 100644
index 000000000..d896250fd
Binary files /dev/null and b/BasicJava/LambdaDemo_filter_person_App/LambdaDemo/bin/PersonFilter.class differ
diff --git a/BasicJava/LambdaDemo_filter_person_App/LambdaDemo/src/LambdaDemo.java b/BasicJava/LambdaDemo_filter_person_App/LambdaDemo/src/LambdaDemo.java
new file mode 100644
index 000000000..7af923e14
--- /dev/null
+++ b/BasicJava/LambdaDemo_filter_person_App/LambdaDemo/src/LambdaDemo.java
@@ -0,0 +1,37 @@
+import java.util.Arrays;
+import java.util.List;
+
+public class LambdaDemo
+{
+ public static void main(String[] args)
+ {
+ List personList = Arrays.asList(
+ new Person("Carla", 33), new Person("Balu", 32),
+ new Person("Bharth", 40), new Person("Ajay", 31));
+
+ System.out.println("------------Name Starts with B---------");
+
+ PersonFilter personFilter = person -> person.getName().startsWith("B");
+ printNameBeginWith_B(personList,personFilter);
+
+ System.out.println("----------------------------------------");
+
+ }
+
+ /*
+ * Method to print all people that have name begins with B.
+ */
+ private static void printNameBeginWith_B(List personList,
+ PersonFilter personFilter)
+ {
+ for (Person person : personList)
+ {
+ if (personFilter.filter(person))
+ {
+ System.out.println(person);
+ }
+ }
+
+ }
+
+}
diff --git a/BasicJava/LambdaDemo_filter_person_App/LambdaDemo/src/NonLambdaDemo.java b/BasicJava/LambdaDemo_filter_person_App/LambdaDemo/src/NonLambdaDemo.java
new file mode 100644
index 000000000..95a5cde2c
--- /dev/null
+++ b/BasicJava/LambdaDemo_filter_person_App/LambdaDemo/src/NonLambdaDemo.java
@@ -0,0 +1,44 @@
+import java.util.Arrays;
+import java.util.List;
+
+public class NonLambdaDemo
+{
+ public static void main(String[] args)
+ {
+ List personList = Arrays.asList(
+ new Person("Carla", 33), new Person("Balu", 32),
+ new Person("Bharth", 40), new Person("Ajay", 31));
+
+ System.out.println("------------Name Starts with B---------");
+
+ PersonFilter personFilter = new PersonFilter()
+ {
+ @Override
+ public boolean filter(Person person)
+ {
+ return person.getName().startsWith("B");
+ }
+ };
+
+ printNameBeginWith_B(personList, personFilter);
+ System.out.println("---------------------------------");
+
+ }
+
+ /*
+ * Method to print all people that have name begins with B.
+ */
+ private static void printNameBeginWith_B(List personList,
+ PersonFilter personFilter)
+ {
+ for (Person person : personList)
+ {
+ if (personFilter.filter(person))
+ {
+ System.out.println(person);
+ }
+ }
+
+ }
+
+}
diff --git a/Later/Lambda/9.3/LambdaDemo/src/Person.java b/BasicJava/LambdaDemo_filter_person_App/LambdaDemo/src/Person.java
similarity index 100%
rename from Later/Lambda/9.3/LambdaDemo/src/Person.java
rename to BasicJava/LambdaDemo_filter_person_App/LambdaDemo/src/Person.java
diff --git a/BasicJava/LambdaDemo_filter_person_App/LambdaDemo/src/PersonFilter.java b/BasicJava/LambdaDemo_filter_person_App/LambdaDemo/src/PersonFilter.java
new file mode 100644
index 000000000..ccd4bb9b3
--- /dev/null
+++ b/BasicJava/LambdaDemo_filter_person_App/LambdaDemo/src/PersonFilter.java
@@ -0,0 +1,5 @@
+@FunctionalInterface
+public interface PersonFilter
+{
+ public boolean filter(Person person);
+}
\ No newline at end of file
diff --git a/BasicJava/LambdaDemo_filter_person_App/LambdaDemo_Output.txt b/BasicJava/LambdaDemo_filter_person_App/LambdaDemo_Output.txt
new file mode 100644
index 000000000..53a385bbb
--- /dev/null
+++ b/BasicJava/LambdaDemo_filter_person_App/LambdaDemo_Output.txt
@@ -0,0 +1,4 @@
+------------Name Starts with B---------
+Person [name=Balu, age=32]
+Person [name=Bharth, age=40]
+----------------------------------------
diff --git a/BasicJava/LambdaDemo_filter_person_App/NonLambdaDemo_Output.txt b/BasicJava/LambdaDemo_filter_person_App/NonLambdaDemo_Output.txt
new file mode 100644
index 000000000..3de1140ce
--- /dev/null
+++ b/BasicJava/LambdaDemo_filter_person_App/NonLambdaDemo_Output.txt
@@ -0,0 +1,4 @@
+------------Name Starts with B---------
+Person [name=Balu, age=32]
+Person [name=Bharth, age=40]
+---------------------------------
diff --git a/Later/Lambda/18.3/LambdaDemo/.classpath b/BasicJava/LambdaDemo_filter_product_App/LambdaDemo/.classpath
similarity index 100%
rename from Later/Lambda/18.3/LambdaDemo/.classpath
rename to BasicJava/LambdaDemo_filter_product_App/LambdaDemo/.classpath
diff --git a/Later/Lambda/14/LambdaDemo/.project b/BasicJava/LambdaDemo_filter_product_App/LambdaDemo/.project
similarity index 100%
rename from Later/Lambda/14/LambdaDemo/.project
rename to BasicJava/LambdaDemo_filter_product_App/LambdaDemo/.project
diff --git a/Later/Lambda/18.3/LambdaDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LambdaDemo_filter_product_App/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Lambda/18.3/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LambdaDemo_filter_product_App/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/LambdaDemo_filter_product_App/LambdaDemo/bin/LambdaDemo.class b/BasicJava/LambdaDemo_filter_product_App/LambdaDemo/bin/LambdaDemo.class
new file mode 100644
index 000000000..0588a2c22
Binary files /dev/null and b/BasicJava/LambdaDemo_filter_product_App/LambdaDemo/bin/LambdaDemo.class differ
diff --git a/Later/Lambda/10/LambdaDemo/bin/Product.class b/BasicJava/LambdaDemo_filter_product_App/LambdaDemo/bin/Product.class
similarity index 100%
rename from Later/Lambda/10/LambdaDemo/bin/Product.class
rename to BasicJava/LambdaDemo_filter_product_App/LambdaDemo/bin/Product.class
diff --git a/BasicJava/LambdaDemo_filter_product_App/LambdaDemo/src/LambdaDemo.java b/BasicJava/LambdaDemo_filter_product_App/LambdaDemo/src/LambdaDemo.java
new file mode 100644
index 000000000..e03d6001c
--- /dev/null
+++ b/BasicJava/LambdaDemo_filter_product_App/LambdaDemo/src/LambdaDemo.java
@@ -0,0 +1,36 @@
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Stream;
+
+/**
+ * Java Lambda Expression Example: Filter Collection Data
+ *
+ */
+public class LambdaDemo
+{
+
+ public static void main(String[] args)
+ {
+ List list = new ArrayList();
+
+ // Adding Products
+ list.add(new Product(1, "Sony LED TV", 60000f));
+ list.add(new Product(2, "Radio", 3000f));
+ list.add(new Product(3, "Laptop", 80000f));
+ list.add(new Product(4, "Smart phone", 70000f));
+ list.add(new Product(5, "Mouse", 1500f));
+
+ /*
+ * Using lambda to filter data
+ */
+ Stream filteredStream = list.stream()
+ .filter(p -> p.getPrice() > 50000);
+
+ /*
+ * Using lambda to iterate through collection
+ */
+ filteredStream.forEach(product -> System.out.println(
+ product.getName() + ": " + product.getPrice()));
+ }
+
+}
diff --git a/Later/Lambda/10/LambdaDemo/src/Product.java b/BasicJava/LambdaDemo_filter_product_App/LambdaDemo/src/Product.java
similarity index 100%
rename from Later/Lambda/10/LambdaDemo/src/Product.java
rename to BasicJava/LambdaDemo_filter_product_App/LambdaDemo/src/Product.java
diff --git a/BasicJava/LambdaDemo_filter_product_App/Output.txt b/BasicJava/LambdaDemo_filter_product_App/Output.txt
new file mode 100644
index 000000000..935adf5e8
--- /dev/null
+++ b/BasicJava/LambdaDemo_filter_product_App/Output.txt
@@ -0,0 +1,3 @@
+Sony LED TV: 60000.0
+Laptop: 80000.0
+Smart phone: 70000.0
diff --git a/Later/Lambda/18.4/LambdaDemo/.classpath b/BasicJava/LambdaDemo_for_each_App/LambdaDemo/.classpath
similarity index 100%
rename from Later/Lambda/18.4/LambdaDemo/.classpath
rename to BasicJava/LambdaDemo_for_each_App/LambdaDemo/.classpath
diff --git a/Later/Lambda/15/LambdaDemo/.project b/BasicJava/LambdaDemo_for_each_App/LambdaDemo/.project
similarity index 100%
rename from Later/Lambda/15/LambdaDemo/.project
rename to BasicJava/LambdaDemo_for_each_App/LambdaDemo/.project
diff --git a/Later/Lambda/18.4/LambdaDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LambdaDemo_for_each_App/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Lambda/18.4/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LambdaDemo_for_each_App/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/Later/Lambda/7/LambdaDemo/bin/LambdaDemo.class b/BasicJava/LambdaDemo_for_each_App/LambdaDemo/bin/LambdaDemo.class
similarity index 100%
rename from Later/Lambda/7/LambdaDemo/bin/LambdaDemo.class
rename to BasicJava/LambdaDemo_for_each_App/LambdaDemo/bin/LambdaDemo.class
diff --git a/Later/Lambda/7/LambdaDemo/src/LambdaDemo.java b/BasicJava/LambdaDemo_for_each_App/LambdaDemo/src/LambdaDemo.java
similarity index 100%
rename from Later/Lambda/7/LambdaDemo/src/LambdaDemo.java
rename to BasicJava/LambdaDemo_for_each_App/LambdaDemo/src/LambdaDemo.java
diff --git a/BasicJava/LambdaDemo_for_each_App/Output.txt b/BasicJava/LambdaDemo_for_each_App/Output.txt
new file mode 100644
index 000000000..c579986ed
--- /dev/null
+++ b/BasicJava/LambdaDemo_for_each_App/Output.txt
@@ -0,0 +1,3 @@
+Ram
+Peter
+John
diff --git a/Later/Lambda/18.5/LambdaDemo/.classpath b/BasicJava/LambdaDemo_intro_App/LambdaDemo/.classpath
similarity index 100%
rename from Later/Lambda/18.5/LambdaDemo/.classpath
rename to BasicJava/LambdaDemo_intro_App/LambdaDemo/.classpath
diff --git a/Later/Lambda/16/LambdaDemo/.project b/BasicJava/LambdaDemo_intro_App/LambdaDemo/.project
similarity index 100%
rename from Later/Lambda/16/LambdaDemo/.project
rename to BasicJava/LambdaDemo_intro_App/LambdaDemo/.project
diff --git a/Later/Lambda/18.5/LambdaDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LambdaDemo_intro_App/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Lambda/18.5/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LambdaDemo_intro_App/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/Later/Lambda/1/LambdaDemo/bin/Dog.class b/BasicJava/LambdaDemo_intro_App/LambdaDemo/bin/Dog.class
similarity index 100%
rename from Later/Lambda/1/LambdaDemo/bin/Dog.class
rename to BasicJava/LambdaDemo_intro_App/LambdaDemo/bin/Dog.class
diff --git a/BasicJava/LambdaDemo_intro_App/LambdaDemo/bin/LambdaDemo.class b/BasicJava/LambdaDemo_intro_App/LambdaDemo/bin/LambdaDemo.class
new file mode 100644
index 000000000..f0027efd6
Binary files /dev/null and b/BasicJava/LambdaDemo_intro_App/LambdaDemo/bin/LambdaDemo.class differ
diff --git a/Later/Lambda/1/LambdaDemo/bin/NoLambdaDemo$1.class b/BasicJava/LambdaDemo_intro_App/LambdaDemo/bin/NoLambdaDemo$1.class
similarity index 91%
rename from Later/Lambda/1/LambdaDemo/bin/NoLambdaDemo$1.class
rename to BasicJava/LambdaDemo_intro_App/LambdaDemo/bin/NoLambdaDemo$1.class
index c058e8319..5b178c546 100644
Binary files a/Later/Lambda/1/LambdaDemo/bin/NoLambdaDemo$1.class and b/BasicJava/LambdaDemo_intro_App/LambdaDemo/bin/NoLambdaDemo$1.class differ
diff --git a/Later/Lambda/1/LambdaDemo/bin/NoLambdaDemo.class b/BasicJava/LambdaDemo_intro_App/LambdaDemo/bin/NoLambdaDemo.class
similarity index 87%
rename from Later/Lambda/1/LambdaDemo/bin/NoLambdaDemo.class
rename to BasicJava/LambdaDemo_intro_App/LambdaDemo/bin/NoLambdaDemo.class
index 3fa13d0d2..e782eca6a 100644
Binary files a/Later/Lambda/1/LambdaDemo/bin/NoLambdaDemo.class and b/BasicJava/LambdaDemo_intro_App/LambdaDemo/bin/NoLambdaDemo.class differ
diff --git a/Later/Lambda/1/LambdaDemo/src/Dog.java b/BasicJava/LambdaDemo_intro_App/LambdaDemo/src/Dog.java
similarity index 100%
rename from Later/Lambda/1/LambdaDemo/src/Dog.java
rename to BasicJava/LambdaDemo_intro_App/LambdaDemo/src/Dog.java
diff --git a/BasicJava/LambdaDemo_intro_App/LambdaDemo/src/LambdaDemo.java b/BasicJava/LambdaDemo_intro_App/LambdaDemo/src/LambdaDemo.java
new file mode 100644
index 000000000..c5e07412f
--- /dev/null
+++ b/BasicJava/LambdaDemo_intro_App/LambdaDemo/src/LambdaDemo.java
@@ -0,0 +1,19 @@
+public class LambdaDemo
+{
+
+ public static void main(String[] args)
+ {
+
+ /*
+ * With lambda
+ */
+ Dog dog = () ->
+ {
+ System.out.println("eating chicken");
+ };
+
+ dog.eat();
+
+ }
+
+}
diff --git a/Later/Lambda/1/LambdaDemo/src/NoLambdaDemo.java b/BasicJava/LambdaDemo_intro_App/LambdaDemo/src/NoLambdaDemo.java
similarity index 95%
rename from Later/Lambda/1/LambdaDemo/src/NoLambdaDemo.java
rename to BasicJava/LambdaDemo_intro_App/LambdaDemo/src/NoLambdaDemo.java
index abd127ed5..5af42388a 100644
--- a/Later/Lambda/1/LambdaDemo/src/NoLambdaDemo.java
+++ b/BasicJava/LambdaDemo_intro_App/LambdaDemo/src/NoLambdaDemo.java
@@ -10,6 +10,7 @@ public static void main(String[] args)
*/
Dog dog = new Dog()
{
+ @Override
public void eat()
{
System.out.println("eating chicken");
diff --git a/BasicJava/LambdaDemo_intro_App/LambdaDemo_Output.txt b/BasicJava/LambdaDemo_intro_App/LambdaDemo_Output.txt
new file mode 100644
index 000000000..f6c9f5c9a
--- /dev/null
+++ b/BasicJava/LambdaDemo_intro_App/LambdaDemo_Output.txt
@@ -0,0 +1 @@
+eating chicken
diff --git a/BasicJava/LambdaDemo_intro_App/NoLambdaDemo_Output.txt b/BasicJava/LambdaDemo_intro_App/NoLambdaDemo_Output.txt
new file mode 100644
index 000000000..f6c9f5c9a
--- /dev/null
+++ b/BasicJava/LambdaDemo_intro_App/NoLambdaDemo_Output.txt
@@ -0,0 +1 @@
+eating chicken
diff --git a/Later/Lambda/18.6/LambdaDemo/.classpath b/BasicJava/LambdaDemo_list_foreach_app/LambdaDemo/.classpath
similarity index 100%
rename from Later/Lambda/18.6/LambdaDemo/.classpath
rename to BasicJava/LambdaDemo_list_foreach_app/LambdaDemo/.classpath
diff --git a/Later/Lambda/17/LambdaDemo/.project b/BasicJava/LambdaDemo_list_foreach_app/LambdaDemo/.project
similarity index 100%
rename from Later/Lambda/17/LambdaDemo/.project
rename to BasicJava/LambdaDemo_list_foreach_app/LambdaDemo/.project
diff --git a/Later/Lambda/18.6/LambdaDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LambdaDemo_list_foreach_app/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Lambda/18.6/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LambdaDemo_list_foreach_app/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/Later/Lambda/15/LambdaDemo/bin/LambdaDemo1.class b/BasicJava/LambdaDemo_list_foreach_app/LambdaDemo/bin/LambdaDemo1.class
similarity index 100%
rename from Later/Lambda/15/LambdaDemo/bin/LambdaDemo1.class
rename to BasicJava/LambdaDemo_list_foreach_app/LambdaDemo/bin/LambdaDemo1.class
diff --git a/Later/Lambda/15/LambdaDemo/bin/LambdaDemo2.class b/BasicJava/LambdaDemo_list_foreach_app/LambdaDemo/bin/LambdaDemo2.class
similarity index 100%
rename from Later/Lambda/15/LambdaDemo/bin/LambdaDemo2.class
rename to BasicJava/LambdaDemo_list_foreach_app/LambdaDemo/bin/LambdaDemo2.class
diff --git a/Later/Lambda/15/LambdaDemo/bin/LambdaDemo3.class b/BasicJava/LambdaDemo_list_foreach_app/LambdaDemo/bin/LambdaDemo3.class
similarity index 100%
rename from Later/Lambda/15/LambdaDemo/bin/LambdaDemo3.class
rename to BasicJava/LambdaDemo_list_foreach_app/LambdaDemo/bin/LambdaDemo3.class
diff --git a/Later/Lambda/15/LambdaDemo/bin/LambdaDemo4.class b/BasicJava/LambdaDemo_list_foreach_app/LambdaDemo/bin/LambdaDemo4.class
similarity index 100%
rename from Later/Lambda/15/LambdaDemo/bin/LambdaDemo4.class
rename to BasicJava/LambdaDemo_list_foreach_app/LambdaDemo/bin/LambdaDemo4.class
diff --git a/BasicJava/LambdaDemo_list_foreach_app/LambdaDemo/src/LambdaDemo1.java b/BasicJava/LambdaDemo_list_foreach_app/LambdaDemo/src/LambdaDemo1.java
new file mode 100644
index 000000000..0f6e36c6f
--- /dev/null
+++ b/BasicJava/LambdaDemo_list_foreach_app/LambdaDemo/src/LambdaDemo1.java
@@ -0,0 +1,34 @@
+import java.util.ArrayList;
+import java.util.List;
+
+public class LambdaDemo1
+{
+
+ public static void main(String[] args)
+ {
+
+ List nameList = new ArrayList<>();
+ nameList.add("Peter");
+ nameList.add("John");
+ nameList.add("Juli");
+ nameList.add("Stephan");
+
+ /*
+ * Before Java 8, Normal way to loop a list.
+ */
+ for (String name : nameList)
+ {
+ System.out.println(name);
+ }
+
+ System.out.println("------------------------------------");
+
+ /*
+ * In Java 8, we can loop a List with forEach + lambda
+ * expression or method reference.
+ */
+ nameList.forEach(name -> System.out.println(name));
+
+ }
+
+}
diff --git a/Later/Lambda/15/LambdaDemo/src/LambdaDemo2.java b/BasicJava/LambdaDemo_list_foreach_app/LambdaDemo/src/LambdaDemo2.java
similarity index 100%
rename from Later/Lambda/15/LambdaDemo/src/LambdaDemo2.java
rename to BasicJava/LambdaDemo_list_foreach_app/LambdaDemo/src/LambdaDemo2.java
diff --git a/Later/Lambda/15/LambdaDemo/src/LambdaDemo3.java b/BasicJava/LambdaDemo_list_foreach_app/LambdaDemo/src/LambdaDemo3.java
similarity index 100%
rename from Later/Lambda/15/LambdaDemo/src/LambdaDemo3.java
rename to BasicJava/LambdaDemo_list_foreach_app/LambdaDemo/src/LambdaDemo3.java
diff --git a/Later/Lambda/15/LambdaDemo/src/LambdaDemo4.java b/BasicJava/LambdaDemo_list_foreach_app/LambdaDemo/src/LambdaDemo4.java
similarity index 100%
rename from Later/Lambda/15/LambdaDemo/src/LambdaDemo4.java
rename to BasicJava/LambdaDemo_list_foreach_app/LambdaDemo/src/LambdaDemo4.java
diff --git a/BasicJava/LambdaDemo_list_foreach_app/LambdaDemo1_Output.txt b/BasicJava/LambdaDemo_list_foreach_app/LambdaDemo1_Output.txt
new file mode 100644
index 000000000..2409b100d
--- /dev/null
+++ b/BasicJava/LambdaDemo_list_foreach_app/LambdaDemo1_Output.txt
@@ -0,0 +1,9 @@
+Peter
+John
+Juli
+Stephan
+------------------------------------
+Peter
+John
+Juli
+Stephan
diff --git a/BasicJava/LambdaDemo_list_foreach_app/LambdaDemo2_Output.txt b/BasicJava/LambdaDemo_list_foreach_app/LambdaDemo2_Output.txt
new file mode 100644
index 000000000..009ad52c0
--- /dev/null
+++ b/BasicJava/LambdaDemo_list_foreach_app/LambdaDemo2_Output.txt
@@ -0,0 +1 @@
+Hello John
diff --git a/BasicJava/LambdaDemo_list_foreach_app/LambdaDemo3_Output.txt b/BasicJava/LambdaDemo_list_foreach_app/LambdaDemo3_Output.txt
new file mode 100644
index 000000000..5141b3f47
--- /dev/null
+++ b/BasicJava/LambdaDemo_list_foreach_app/LambdaDemo3_Output.txt
@@ -0,0 +1,4 @@
+Peter
+John
+Juli
+Stephan
diff --git a/BasicJava/LambdaDemo_list_foreach_app/LambdaDemo4_Output.txt b/BasicJava/LambdaDemo_list_foreach_app/LambdaDemo4_Output.txt
new file mode 100644
index 000000000..518b8912f
--- /dev/null
+++ b/BasicJava/LambdaDemo_list_foreach_app/LambdaDemo4_Output.txt
@@ -0,0 +1 @@
+Juli
diff --git a/Later/Lambda/18.7/LambdaDemo/.classpath b/BasicJava/LambdaDemo_list_foreach_person_app/LambdaDemo/.classpath
similarity index 100%
rename from Later/Lambda/18.7/LambdaDemo/.classpath
rename to BasicJava/LambdaDemo_list_foreach_person_app/LambdaDemo/.classpath
diff --git a/Later/Lambda/18.1/LambdaDemo/.project b/BasicJava/LambdaDemo_list_foreach_person_app/LambdaDemo/.project
similarity index 100%
rename from Later/Lambda/18.1/LambdaDemo/.project
rename to BasicJava/LambdaDemo_list_foreach_person_app/LambdaDemo/.project
diff --git a/Later/Lambda/18.7/LambdaDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LambdaDemo_list_foreach_person_app/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Lambda/18.7/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LambdaDemo_list_foreach_person_app/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/Later/Lambda/16/LambdaDemo/bin/LambdaDemo.class b/BasicJava/LambdaDemo_list_foreach_person_app/LambdaDemo/bin/LambdaDemo.class
similarity index 100%
rename from Later/Lambda/16/LambdaDemo/bin/LambdaDemo.class
rename to BasicJava/LambdaDemo_list_foreach_person_app/LambdaDemo/bin/LambdaDemo.class
diff --git a/Later/Lambda/9.4/LambdaDemo/bin/Person.class b/BasicJava/LambdaDemo_list_foreach_person_app/LambdaDemo/bin/Person.class
similarity index 100%
rename from Later/Lambda/9.4/LambdaDemo/bin/Person.class
rename to BasicJava/LambdaDemo_list_foreach_person_app/LambdaDemo/bin/Person.class
diff --git a/BasicJava/LambdaDemo_list_foreach_person_app/LambdaDemo/src/LambdaDemo.java b/BasicJava/LambdaDemo_list_foreach_person_app/LambdaDemo/src/LambdaDemo.java
new file mode 100644
index 000000000..e27f83213
--- /dev/null
+++ b/BasicJava/LambdaDemo_list_foreach_person_app/LambdaDemo/src/LambdaDemo.java
@@ -0,0 +1,39 @@
+import java.util.Arrays;
+import java.util.List;
+
+public class LambdaDemo
+{
+ public static void main(String[] args)
+ {
+
+ List personList = Arrays.asList(
+ new Person("Carla", 33), new Person("Balu", 32),
+ new Person("Bharth", 40), new Person("Ajay", 31));
+
+
+ System.out.println("---------- With out lambda-----------------");
+ /*
+ * Before JDK 8, With out lambda
+ */
+ for (Person person : personList)
+ {
+ System.out.println(person);
+ }
+
+ System.out.println("\n----------With lambda-----------------");
+
+ /*
+ * Now JDK 8 , With lambda
+ */
+ personList.forEach(person -> System.out.println(person));
+
+ System.out.println("\n----------Method Reference-------------");
+
+ /*
+ * Method Reference
+ */
+ personList.forEach(System.out::println);
+
+ }
+
+}
diff --git a/Later/Lambda/9.4/LambdaDemo/src/Person.java b/BasicJava/LambdaDemo_list_foreach_person_app/LambdaDemo/src/Person.java
similarity index 100%
rename from Later/Lambda/9.4/LambdaDemo/src/Person.java
rename to BasicJava/LambdaDemo_list_foreach_person_app/LambdaDemo/src/Person.java
diff --git a/BasicJava/LambdaDemo_list_foreach_person_app/Output.txt b/BasicJava/LambdaDemo_list_foreach_person_app/Output.txt
new file mode 100644
index 000000000..0f813666f
--- /dev/null
+++ b/BasicJava/LambdaDemo_list_foreach_person_app/Output.txt
@@ -0,0 +1,17 @@
+---------- With out lambda-----------------
+Person [name=Carla, age=33]
+Person [name=Balu, age=32]
+Person [name=Bharth, age=40]
+Person [name=Ajay, age=31]
+
+----------With lambda-----------------
+Person [name=Carla, age=33]
+Person [name=Balu, age=32]
+Person [name=Bharth, age=40]
+Person [name=Ajay, age=31]
+
+----------Method Reference-------------
+Person [name=Carla, age=33]
+Person [name=Balu, age=32]
+Person [name=Bharth, age=40]
+Person [name=Ajay, age=31]
diff --git a/Later/Lambda/18.8/LambdaDemo/.classpath b/BasicJava/LambdaDemo_map_foreach_app/LambdaDemo/.classpath
similarity index 100%
rename from Later/Lambda/18.8/LambdaDemo/.classpath
rename to BasicJava/LambdaDemo_map_foreach_app/LambdaDemo/.classpath
diff --git a/Later/Lambda/18.2/LambdaDemo/.project b/BasicJava/LambdaDemo_map_foreach_app/LambdaDemo/.project
similarity index 100%
rename from Later/Lambda/18.2/LambdaDemo/.project
rename to BasicJava/LambdaDemo_map_foreach_app/LambdaDemo/.project
diff --git a/Later/Lambda/18.8/LambdaDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LambdaDemo_map_foreach_app/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Lambda/18.8/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LambdaDemo_map_foreach_app/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/LambdaDemo_map_foreach_app/LambdaDemo/bin/LambdaDemo1.class b/BasicJava/LambdaDemo_map_foreach_app/LambdaDemo/bin/LambdaDemo1.class
new file mode 100644
index 000000000..8b94bc7ef
Binary files /dev/null and b/BasicJava/LambdaDemo_map_foreach_app/LambdaDemo/bin/LambdaDemo1.class differ
diff --git a/Later/Lambda/14/LambdaDemo/bin/LambdaDemo2.class b/BasicJava/LambdaDemo_map_foreach_app/LambdaDemo/bin/LambdaDemo2.class
similarity index 85%
rename from Later/Lambda/14/LambdaDemo/bin/LambdaDemo2.class
rename to BasicJava/LambdaDemo_map_foreach_app/LambdaDemo/bin/LambdaDemo2.class
index db7da6f90..bdd1090dd 100644
Binary files a/Later/Lambda/14/LambdaDemo/bin/LambdaDemo2.class and b/BasicJava/LambdaDemo_map_foreach_app/LambdaDemo/bin/LambdaDemo2.class differ
diff --git a/BasicJava/LambdaDemo_map_foreach_app/LambdaDemo/src/LambdaDemo1.java b/BasicJava/LambdaDemo_map_foreach_app/LambdaDemo/src/LambdaDemo1.java
new file mode 100644
index 000000000..a94c5a7a6
--- /dev/null
+++ b/BasicJava/LambdaDemo_map_foreach_app/LambdaDemo/src/LambdaDemo1.java
@@ -0,0 +1,34 @@
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+public class LambdaDemo1
+{
+
+ public static void main(String[] args)
+ {
+
+ Map map = new LinkedHashMap<>();
+ map.put(1, "Peter");
+ map.put(2, "John");
+ map.put(3, "Juli");
+ map.put(4, "Stephan");
+
+ /*
+ * Normal way to loop a Map.Before Java 8
+ */
+ for (Map.Entry entry : map.entrySet())
+ {
+ System.out.println("key : " + entry.getKey() + ", value : "
+ + entry.getValue());
+ }
+
+ System.out.println("------------------------------------");
+
+ /*
+ * In Java 8, we can loop a Map with forEach + lambda expression.
+ */
+ map.forEach((k, v) -> System.out.println("key : " + k + " value : " + v));
+
+ }
+
+}
diff --git a/BasicJava/LambdaDemo_map_foreach_app/LambdaDemo/src/LambdaDemo2.java b/BasicJava/LambdaDemo_map_foreach_app/LambdaDemo/src/LambdaDemo2.java
new file mode 100644
index 000000000..f3e265c19
--- /dev/null
+++ b/BasicJava/LambdaDemo_map_foreach_app/LambdaDemo/src/LambdaDemo2.java
@@ -0,0 +1,30 @@
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+public class LambdaDemo2
+{
+
+ public static void main(String[] args)
+ {
+
+ Map map = new LinkedHashMap<>();
+ map.put(1, "Peter");
+ map.put(2, "John");
+ map.put(3, "Juli");
+ map.put(4, "Stephan");
+
+ /*
+ * In Java 8, we can loop a Map with forEach + lambda
+ * expression+multiple statements.
+ */
+
+ map.forEach((k, v) -> {
+ System.out.println("key : " + k + " value : " + v);
+ if ("John".equals(v))
+ {
+ System.out.println("Hello John");
+ }
+ });
+ }
+
+}
diff --git a/BasicJava/LambdaDemo_map_foreach_app/LambdaDemo1_Output.txt b/BasicJava/LambdaDemo_map_foreach_app/LambdaDemo1_Output.txt
new file mode 100644
index 000000000..0b08d6875
--- /dev/null
+++ b/BasicJava/LambdaDemo_map_foreach_app/LambdaDemo1_Output.txt
@@ -0,0 +1,9 @@
+key : 1, value : Peter
+key : 2, value : John
+key : 3, value : Juli
+key : 4, value : Stephan
+------------------------------------
+key : 1 value : Peter
+key : 2 value : John
+key : 3 value : Juli
+key : 4 value : Stephan
diff --git a/BasicJava/LambdaDemo_map_foreach_app/LambdaDemo2_Output.txt b/BasicJava/LambdaDemo_map_foreach_app/LambdaDemo2_Output.txt
new file mode 100644
index 000000000..9e12b4acc
--- /dev/null
+++ b/BasicJava/LambdaDemo_map_foreach_app/LambdaDemo2_Output.txt
@@ -0,0 +1,5 @@
+key : 1 value : Peter
+key : 2 value : John
+Hello John
+key : 3 value : Juli
+key : 4 value : Stephan
diff --git a/Later/Lambda/18.9/LambdaDemo/.classpath b/BasicJava/LambdaDemo_math_App/LambdaDemo/.classpath
similarity index 100%
rename from Later/Lambda/18.9/LambdaDemo/.classpath
rename to BasicJava/LambdaDemo_math_App/LambdaDemo/.classpath
diff --git a/Later/Lambda/18.3/LambdaDemo/.project b/BasicJava/LambdaDemo_math_App/LambdaDemo/.project
similarity index 100%
rename from Later/Lambda/18.3/LambdaDemo/.project
rename to BasicJava/LambdaDemo_math_App/LambdaDemo/.project
diff --git a/Later/Lambda/18.9/LambdaDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LambdaDemo_math_App/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Lambda/18.9/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LambdaDemo_math_App/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/LambdaDemo_math_App/LambdaDemo/bin/LambdaDemo.class b/BasicJava/LambdaDemo_math_App/LambdaDemo/bin/LambdaDemo.class
new file mode 100644
index 000000000..040cb622d
Binary files /dev/null and b/BasicJava/LambdaDemo_math_App/LambdaDemo/bin/LambdaDemo.class differ
diff --git a/BasicJava/LambdaDemo_math_App/LambdaDemo/bin/MathOperation.class b/BasicJava/LambdaDemo_math_App/LambdaDemo/bin/MathOperation.class
new file mode 100644
index 000000000..6f477742a
Binary files /dev/null and b/BasicJava/LambdaDemo_math_App/LambdaDemo/bin/MathOperation.class differ
diff --git a/BasicJava/LambdaDemo_math_App/LambdaDemo/src/LambdaDemo.java b/BasicJava/LambdaDemo_math_App/LambdaDemo/src/LambdaDemo.java
new file mode 100644
index 000000000..d05999ef6
--- /dev/null
+++ b/BasicJava/LambdaDemo_math_App/LambdaDemo/src/LambdaDemo.java
@@ -0,0 +1,43 @@
+@FunctionalInterface
+interface MathOperation
+{
+ int operation(int a, int b);
+}
+
+public class LambdaDemo
+{
+
+ public static void main(String[] args)
+ {
+
+ LambdaDemo lambdaDemo = new LambdaDemo();
+
+ // with type declaration
+ MathOperation addition = (int a, int b) -> a + b;
+
+ // with out type declaration
+ MathOperation subtraction = (a, b) -> a - b;
+
+ // with return statement along with curly braces
+ MathOperation multiplication = (int a, int b) -> {
+ return a * b;
+ };
+
+ // without return statement and without curly braces
+ MathOperation division = (int a, int b) -> a / b;
+
+ System.out.println("10 + 5 = " + lambdaDemo.operate(10, 5, addition));
+
+ System.out.println("10 - 5 = " + lambdaDemo.operate(10, 5, subtraction));
+
+ System.out.println("10 x 5 = " + lambdaDemo.operate(10, 5, multiplication));
+
+ System.out.println("10 / 5 = " + lambdaDemo.operate(10, 5, division));
+ }
+
+ private int operate(int a, int b, MathOperation mathOperation)
+ {
+ return mathOperation.operation(a, b);
+ }
+
+}
diff --git a/BasicJava/LambdaDemo_math_App/Output.txt b/BasicJava/LambdaDemo_math_App/Output.txt
new file mode 100644
index 000000000..69b9c439c
--- /dev/null
+++ b/BasicJava/LambdaDemo_math_App/Output.txt
@@ -0,0 +1,4 @@
+10 + 5 = 15
+10 - 5 = 5
+10 x 5 = 50
+10 / 5 = 2
diff --git a/Later/Lambda/18/LambdaDemo/.classpath b/BasicJava/LambdaDemo_method_accept_lambda_App/LambdaDemo/.classpath
similarity index 100%
rename from Later/Lambda/18/LambdaDemo/.classpath
rename to BasicJava/LambdaDemo_method_accept_lambda_App/LambdaDemo/.classpath
diff --git a/Later/Lambda/18.4/LambdaDemo/.project b/BasicJava/LambdaDemo_method_accept_lambda_App/LambdaDemo/.project
similarity index 100%
rename from Later/Lambda/18.4/LambdaDemo/.project
rename to BasicJava/LambdaDemo_method_accept_lambda_App/LambdaDemo/.project
diff --git a/Later/Lambda/18/LambdaDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LambdaDemo_method_accept_lambda_App/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Lambda/18/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LambdaDemo_method_accept_lambda_App/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/LambdaDemo_method_accept_lambda_App/LambdaDemo/bin/LambdaDemo.class b/BasicJava/LambdaDemo_method_accept_lambda_App/LambdaDemo/bin/LambdaDemo.class
new file mode 100644
index 000000000..e5499920a
Binary files /dev/null and b/BasicJava/LambdaDemo_method_accept_lambda_App/LambdaDemo/bin/LambdaDemo.class differ
diff --git a/BasicJava/LambdaDemo_method_accept_lambda_App/LambdaDemo/bin/StringLengthLambda.class b/BasicJava/LambdaDemo_method_accept_lambda_App/LambdaDemo/bin/StringLengthLambda.class
new file mode 100644
index 000000000..ba967f9fe
Binary files /dev/null and b/BasicJava/LambdaDemo_method_accept_lambda_App/LambdaDemo/bin/StringLengthLambda.class differ
diff --git a/BasicJava/LambdaDemo_method_accept_lambda_App/LambdaDemo/src/LambdaDemo.java b/BasicJava/LambdaDemo_method_accept_lambda_App/LambdaDemo/src/LambdaDemo.java
new file mode 100644
index 000000000..d1824b5e9
--- /dev/null
+++ b/BasicJava/LambdaDemo_method_accept_lambda_App/LambdaDemo/src/LambdaDemo.java
@@ -0,0 +1,21 @@
+@FunctionalInterface
+interface StringLengthLambda
+{
+ int getLength(String str);
+}
+
+public class LambdaDemo
+{
+
+ public static void main(String[] args)
+ {
+ printLambda(str -> str.length());
+ }
+
+ private static void printLambda(StringLengthLambda stringLengthLambda)
+ {
+ int length = stringLengthLambda.getLength("Welcome");
+ System.out.println("length = " + length);
+ }
+
+}
diff --git a/BasicJava/LambdaDemo_method_accept_lambda_App/Output.txt b/BasicJava/LambdaDemo_method_accept_lambda_App/Output.txt
new file mode 100644
index 000000000..ba7867137
--- /dev/null
+++ b/BasicJava/LambdaDemo_method_accept_lambda_App/Output.txt
@@ -0,0 +1 @@
+length = 7
diff --git a/Later/Lambda/19/LambdaDemo/.classpath b/BasicJava/LambdaDemo_method_ref_constructor_app/LambdaDemo/.classpath
similarity index 100%
rename from Later/Lambda/19/LambdaDemo/.classpath
rename to BasicJava/LambdaDemo_method_ref_constructor_app/LambdaDemo/.classpath
diff --git a/Later/Lambda/18.5/LambdaDemo/.project b/BasicJava/LambdaDemo_method_ref_constructor_app/LambdaDemo/.project
similarity index 100%
rename from Later/Lambda/18.5/LambdaDemo/.project
rename to BasicJava/LambdaDemo_method_ref_constructor_app/LambdaDemo/.project
diff --git a/Later/Lambda/19/LambdaDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LambdaDemo_method_ref_constructor_app/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Lambda/19/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LambdaDemo_method_ref_constructor_app/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/LambdaDemo_method_ref_constructor_app/LambdaDemo/bin/Message.class b/BasicJava/LambdaDemo_method_ref_constructor_app/LambdaDemo/bin/Message.class
new file mode 100644
index 000000000..341c13d1d
Binary files /dev/null and b/BasicJava/LambdaDemo_method_ref_constructor_app/LambdaDemo/bin/Message.class differ
diff --git a/BasicJava/LambdaDemo_method_ref_constructor_app/LambdaDemo/bin/Messageable.class b/BasicJava/LambdaDemo_method_ref_constructor_app/LambdaDemo/bin/Messageable.class
new file mode 100644
index 000000000..23d46a212
Binary files /dev/null and b/BasicJava/LambdaDemo_method_ref_constructor_app/LambdaDemo/bin/Messageable.class differ
diff --git a/BasicJava/LambdaDemo_method_ref_constructor_app/LambdaDemo/bin/MethodReferenceDemo.class b/BasicJava/LambdaDemo_method_ref_constructor_app/LambdaDemo/bin/MethodReferenceDemo.class
new file mode 100644
index 000000000..6b4506468
Binary files /dev/null and b/BasicJava/LambdaDemo_method_ref_constructor_app/LambdaDemo/bin/MethodReferenceDemo.class differ
diff --git a/BasicJava/LambdaDemo_method_ref_constructor_app/LambdaDemo/src/MethodReferenceDemo.java b/BasicJava/LambdaDemo_method_ref_constructor_app/LambdaDemo/src/MethodReferenceDemo.java
new file mode 100644
index 000000000..4755ec0ba
--- /dev/null
+++ b/BasicJava/LambdaDemo_method_ref_constructor_app/LambdaDemo/src/MethodReferenceDemo.java
@@ -0,0 +1,28 @@
+/**
+ *
+ * We are using functional interface Messageable and referring constructor with
+ * the help of functional interface.
+ *
+ */
+@FunctionalInterface
+interface Messageable
+{
+ Message getMessage(String msg);
+}
+
+class Message
+{
+ public Message(String msg)
+ {
+ System.out.print(msg);
+ }
+}
+
+public class MethodReferenceDemo
+{
+ public static void main(String[] args)
+ {
+ Messageable messageable = Message::new;
+ messageable.getMessage("Hello");
+ }
+}
\ No newline at end of file
diff --git a/BasicJava/LambdaDemo_method_ref_constructor_app/Output.txt b/BasicJava/LambdaDemo_method_ref_constructor_app/Output.txt
new file mode 100644
index 000000000..5ab2f8a43
--- /dev/null
+++ b/BasicJava/LambdaDemo_method_ref_constructor_app/Output.txt
@@ -0,0 +1 @@
+Hello
\ No newline at end of file
diff --git a/Later/Lambda/2/LambdaDemo/.classpath b/BasicJava/LambdaDemo_method_ref_list_foreach_app/LambdaDemo/.classpath
similarity index 100%
rename from Later/Lambda/2/LambdaDemo/.classpath
rename to BasicJava/LambdaDemo_method_ref_list_foreach_app/LambdaDemo/.classpath
diff --git a/Later/Lambda/18.6/LambdaDemo/.project b/BasicJava/LambdaDemo_method_ref_list_foreach_app/LambdaDemo/.project
similarity index 100%
rename from Later/Lambda/18.6/LambdaDemo/.project
rename to BasicJava/LambdaDemo_method_ref_list_foreach_app/LambdaDemo/.project
diff --git a/Later/Lambda/2/LambdaDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LambdaDemo_method_ref_list_foreach_app/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Lambda/2/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LambdaDemo_method_ref_list_foreach_app/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/Later/Lambda/19/LambdaDemo/bin/LambdaDemo.class b/BasicJava/LambdaDemo_method_ref_list_foreach_app/LambdaDemo/bin/LambdaDemo.class
similarity index 100%
rename from Later/Lambda/19/LambdaDemo/bin/LambdaDemo.class
rename to BasicJava/LambdaDemo_method_ref_list_foreach_app/LambdaDemo/bin/LambdaDemo.class
diff --git a/BasicJava/LambdaDemo_method_ref_list_foreach_app/LambdaDemo/bin/MethodReferenceDemo.class b/BasicJava/LambdaDemo_method_ref_list_foreach_app/LambdaDemo/bin/MethodReferenceDemo.class
new file mode 100644
index 000000000..d05a70462
Binary files /dev/null and b/BasicJava/LambdaDemo_method_ref_list_foreach_app/LambdaDemo/bin/MethodReferenceDemo.class differ
diff --git a/BasicJava/LambdaDemo_method_ref_list_foreach_app/LambdaDemo/src/MethodReferenceDemo.java b/BasicJava/LambdaDemo_method_ref_list_foreach_app/LambdaDemo/src/MethodReferenceDemo.java
new file mode 100644
index 000000000..5300a3a57
--- /dev/null
+++ b/BasicJava/LambdaDemo_method_ref_list_foreach_app/LambdaDemo/src/MethodReferenceDemo.java
@@ -0,0 +1,23 @@
+import java.util.ArrayList;
+import java.util.List;
+
+public class MethodReferenceDemo
+{
+ public static void main(String[] args)
+ {
+
+ List nameList = new ArrayList<>();
+ nameList.add("Peter");
+ nameList.add("John");
+ nameList.add("Juli");
+ nameList.add("Stephan");
+
+ nameList.forEach(name -> System.out.println(name));
+
+ System.out.println("------------------------");
+
+ // method reference
+ nameList.forEach(System.out::println);
+ }
+
+}
diff --git a/BasicJava/LambdaDemo_method_ref_list_foreach_app/Output.txt b/BasicJava/LambdaDemo_method_ref_list_foreach_app/Output.txt
new file mode 100644
index 000000000..4d05dc725
--- /dev/null
+++ b/BasicJava/LambdaDemo_method_ref_list_foreach_app/Output.txt
@@ -0,0 +1,9 @@
+Peter
+John
+Juli
+Stephan
+------------------------
+Peter
+John
+Juli
+Stephan
diff --git a/Later/Lambda/20/LambdaDemo/.classpath b/BasicJava/LambdaDemo_method_ref_nonstatic_Bifunction_app/LambdaDemo/.classpath
similarity index 100%
rename from Later/Lambda/20/LambdaDemo/.classpath
rename to BasicJava/LambdaDemo_method_ref_nonstatic_Bifunction_app/LambdaDemo/.classpath
diff --git a/Later/Lambda/18.7/LambdaDemo/.project b/BasicJava/LambdaDemo_method_ref_nonstatic_Bifunction_app/LambdaDemo/.project
similarity index 100%
rename from Later/Lambda/18.7/LambdaDemo/.project
rename to BasicJava/LambdaDemo_method_ref_nonstatic_Bifunction_app/LambdaDemo/.project
diff --git a/Later/Lambda/20/LambdaDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LambdaDemo_method_ref_nonstatic_Bifunction_app/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Lambda/20/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LambdaDemo_method_ref_nonstatic_Bifunction_app/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/Later/Lambda/18.8/LambdaDemo/bin/Arithmetic.class b/BasicJava/LambdaDemo_method_ref_nonstatic_Bifunction_app/LambdaDemo/bin/Arithmetic.class
similarity index 100%
rename from Later/Lambda/18.8/LambdaDemo/bin/Arithmetic.class
rename to BasicJava/LambdaDemo_method_ref_nonstatic_Bifunction_app/LambdaDemo/bin/Arithmetic.class
diff --git a/Later/Lambda/18.8/LambdaDemo/bin/MethodReferenceDemo.class b/BasicJava/LambdaDemo_method_ref_nonstatic_Bifunction_app/LambdaDemo/bin/MethodReferenceDemo.class
similarity index 100%
rename from Later/Lambda/18.8/LambdaDemo/bin/MethodReferenceDemo.class
rename to BasicJava/LambdaDemo_method_ref_nonstatic_Bifunction_app/LambdaDemo/bin/MethodReferenceDemo.class
diff --git a/Later/Lambda/18.8/LambdaDemo/src/MethodReferenceDemo.java b/BasicJava/LambdaDemo_method_ref_nonstatic_Bifunction_app/LambdaDemo/src/MethodReferenceDemo.java
similarity index 100%
rename from Later/Lambda/18.8/LambdaDemo/src/MethodReferenceDemo.java
rename to BasicJava/LambdaDemo_method_ref_nonstatic_Bifunction_app/LambdaDemo/src/MethodReferenceDemo.java
diff --git a/BasicJava/LambdaDemo_method_ref_nonstatic_Bifunction_app/Output.txt b/BasicJava/LambdaDemo_method_ref_nonstatic_Bifunction_app/Output.txt
new file mode 100644
index 000000000..d411bb7c1
--- /dev/null
+++ b/BasicJava/LambdaDemo_method_ref_nonstatic_Bifunction_app/Output.txt
@@ -0,0 +1 @@
+400
diff --git a/Later/Lambda/21/LambdaDemo/.classpath b/BasicJava/LambdaDemo_method_ref_nonstatic_dog_app/LambdaDemo/.classpath
similarity index 100%
rename from Later/Lambda/21/LambdaDemo/.classpath
rename to BasicJava/LambdaDemo_method_ref_nonstatic_dog_app/LambdaDemo/.classpath
diff --git a/Later/Lambda/18.8/LambdaDemo/.project b/BasicJava/LambdaDemo_method_ref_nonstatic_dog_app/LambdaDemo/.project
similarity index 100%
rename from Later/Lambda/18.8/LambdaDemo/.project
rename to BasicJava/LambdaDemo_method_ref_nonstatic_dog_app/LambdaDemo/.project
diff --git a/Later/Lambda/21/LambdaDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LambdaDemo_method_ref_nonstatic_dog_app/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Lambda/21/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LambdaDemo_method_ref_nonstatic_dog_app/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/Later/Lambda/18.1/LambdaDemo/bin/Dog.class b/BasicJava/LambdaDemo_method_ref_nonstatic_dog_app/LambdaDemo/bin/Dog.class
similarity index 100%
rename from Later/Lambda/18.1/LambdaDemo/bin/Dog.class
rename to BasicJava/LambdaDemo_method_ref_nonstatic_dog_app/LambdaDemo/bin/Dog.class
diff --git a/Later/Lambda/18.6/LambdaDemo/bin/MethodReferenceDemo.class b/BasicJava/LambdaDemo_method_ref_nonstatic_dog_app/LambdaDemo/bin/MethodReferenceDemo.class
similarity index 100%
rename from Later/Lambda/18.6/LambdaDemo/bin/MethodReferenceDemo.class
rename to BasicJava/LambdaDemo_method_ref_nonstatic_dog_app/LambdaDemo/bin/MethodReferenceDemo.class
diff --git a/Later/Lambda/18.6/LambdaDemo/src/MethodReferenceDemo.java b/BasicJava/LambdaDemo_method_ref_nonstatic_dog_app/LambdaDemo/src/MethodReferenceDemo.java
similarity index 100%
rename from Later/Lambda/18.6/LambdaDemo/src/MethodReferenceDemo.java
rename to BasicJava/LambdaDemo_method_ref_nonstatic_dog_app/LambdaDemo/src/MethodReferenceDemo.java
diff --git a/BasicJava/LambdaDemo_method_ref_nonstatic_dog_app/Output.txt b/BasicJava/LambdaDemo_method_ref_nonstatic_dog_app/Output.txt
new file mode 100644
index 000000000..e0a58b080
--- /dev/null
+++ b/BasicJava/LambdaDemo_method_ref_nonstatic_dog_app/Output.txt
@@ -0,0 +1 @@
+Dog is eating chicken.
diff --git a/Later/Lambda/22/LambdaDemo/.classpath b/BasicJava/LambdaDemo_method_ref_nonstatic_runnable_app/LambdaDemo/.classpath
similarity index 100%
rename from Later/Lambda/22/LambdaDemo/.classpath
rename to BasicJava/LambdaDemo_method_ref_nonstatic_runnable_app/LambdaDemo/.classpath
diff --git a/Later/Lambda/18.9/LambdaDemo/.project b/BasicJava/LambdaDemo_method_ref_nonstatic_runnable_app/LambdaDemo/.project
similarity index 100%
rename from Later/Lambda/18.9/LambdaDemo/.project
rename to BasicJava/LambdaDemo_method_ref_nonstatic_runnable_app/LambdaDemo/.project
diff --git a/Later/Lambda/22/LambdaDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LambdaDemo_method_ref_nonstatic_runnable_app/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Lambda/22/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LambdaDemo_method_ref_nonstatic_runnable_app/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/Later/Lambda/18.7/LambdaDemo/bin/MethodReferenceDemo.class b/BasicJava/LambdaDemo_method_ref_nonstatic_runnable_app/LambdaDemo/bin/MethodReferenceDemo.class
similarity index 100%
rename from Later/Lambda/18.7/LambdaDemo/bin/MethodReferenceDemo.class
rename to BasicJava/LambdaDemo_method_ref_nonstatic_runnable_app/LambdaDemo/bin/MethodReferenceDemo.class
diff --git a/Later/Lambda/18.7/LambdaDemo/src/MethodReferenceDemo.java b/BasicJava/LambdaDemo_method_ref_nonstatic_runnable_app/LambdaDemo/src/MethodReferenceDemo.java
similarity index 100%
rename from Later/Lambda/18.7/LambdaDemo/src/MethodReferenceDemo.java
rename to BasicJava/LambdaDemo_method_ref_nonstatic_runnable_app/LambdaDemo/src/MethodReferenceDemo.java
diff --git a/BasicJava/LambdaDemo_method_ref_nonstatic_runnable_app/Output.txt b/BasicJava/LambdaDemo_method_ref_nonstatic_runnable_app/Output.txt
new file mode 100644
index 000000000..1a8759810
--- /dev/null
+++ b/BasicJava/LambdaDemo_method_ref_nonstatic_runnable_app/Output.txt
@@ -0,0 +1 @@
+Thread is running...
diff --git a/Later/Lambda/23/LambdaDemo/.classpath b/BasicJava/LambdaDemo_method_ref_static_BiFunc_app/LambdaDemo/.classpath
similarity index 100%
rename from Later/Lambda/23/LambdaDemo/.classpath
rename to BasicJava/LambdaDemo_method_ref_static_BiFunc_app/LambdaDemo/.classpath
diff --git a/Later/Lambda/18/LambdaDemo/.project b/BasicJava/LambdaDemo_method_ref_static_BiFunc_app/LambdaDemo/.project
similarity index 100%
rename from Later/Lambda/18/LambdaDemo/.project
rename to BasicJava/LambdaDemo_method_ref_static_BiFunc_app/LambdaDemo/.project
diff --git a/Later/Lambda/23/LambdaDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LambdaDemo_method_ref_static_BiFunc_app/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Lambda/23/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LambdaDemo_method_ref_static_BiFunc_app/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/Later/Lambda/18.4/LambdaDemo/bin/Arithmetic.class b/BasicJava/LambdaDemo_method_ref_static_BiFunc_app/LambdaDemo/bin/Arithmetic.class
similarity index 100%
rename from Later/Lambda/18.4/LambdaDemo/bin/Arithmetic.class
rename to BasicJava/LambdaDemo_method_ref_static_BiFunc_app/LambdaDemo/bin/Arithmetic.class
diff --git a/Later/Lambda/18.4/LambdaDemo/bin/MethodReferenceDemo.class b/BasicJava/LambdaDemo_method_ref_static_BiFunc_app/LambdaDemo/bin/MethodReferenceDemo.class
similarity index 100%
rename from Later/Lambda/18.4/LambdaDemo/bin/MethodReferenceDemo.class
rename to BasicJava/LambdaDemo_method_ref_static_BiFunc_app/LambdaDemo/bin/MethodReferenceDemo.class
diff --git a/Later/Lambda/18.4/LambdaDemo/src/MethodReferenceDemo.java b/BasicJava/LambdaDemo_method_ref_static_BiFunc_app/LambdaDemo/src/MethodReferenceDemo.java
similarity index 100%
rename from Later/Lambda/18.4/LambdaDemo/src/MethodReferenceDemo.java
rename to BasicJava/LambdaDemo_method_ref_static_BiFunc_app/LambdaDemo/src/MethodReferenceDemo.java
diff --git a/BasicJava/LambdaDemo_method_ref_static_BiFunc_app/Output.txt b/BasicJava/LambdaDemo_method_ref_static_BiFunc_app/Output.txt
new file mode 100644
index 000000000..425151f3a
--- /dev/null
+++ b/BasicJava/LambdaDemo_method_ref_static_BiFunc_app/Output.txt
@@ -0,0 +1 @@
+40
diff --git a/Later/Lambda/3/LambdaDemo/.classpath b/BasicJava/LambdaDemo_method_ref_static_BiFunc_overload_app/LambdaDemo/.classpath
similarity index 100%
rename from Later/Lambda/3/LambdaDemo/.classpath
rename to BasicJava/LambdaDemo_method_ref_static_BiFunc_overload_app/LambdaDemo/.classpath
diff --git a/Later/Lambda/19/LambdaDemo/.project b/BasicJava/LambdaDemo_method_ref_static_BiFunc_overload_app/LambdaDemo/.project
similarity index 100%
rename from Later/Lambda/19/LambdaDemo/.project
rename to BasicJava/LambdaDemo_method_ref_static_BiFunc_overload_app/LambdaDemo/.project
diff --git a/Later/Lambda/3/LambdaDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LambdaDemo_method_ref_static_BiFunc_overload_app/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Lambda/3/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LambdaDemo_method_ref_static_BiFunc_overload_app/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/Later/Lambda/18.5/LambdaDemo/bin/Arithmetic.class b/BasicJava/LambdaDemo_method_ref_static_BiFunc_overload_app/LambdaDemo/bin/Arithmetic.class
similarity index 100%
rename from Later/Lambda/18.5/LambdaDemo/bin/Arithmetic.class
rename to BasicJava/LambdaDemo_method_ref_static_BiFunc_overload_app/LambdaDemo/bin/Arithmetic.class
diff --git a/BasicJava/LambdaDemo_method_ref_static_BiFunc_overload_app/LambdaDemo/bin/MethodReferenceDemo.class b/BasicJava/LambdaDemo_method_ref_static_BiFunc_overload_app/LambdaDemo/bin/MethodReferenceDemo.class
new file mode 100644
index 000000000..8e28a25b0
Binary files /dev/null and b/BasicJava/LambdaDemo_method_ref_static_BiFunc_overload_app/LambdaDemo/bin/MethodReferenceDemo.class differ
diff --git a/BasicJava/LambdaDemo_method_ref_static_BiFunc_overload_app/LambdaDemo/src/MethodReferenceDemo.java b/BasicJava/LambdaDemo_method_ref_static_BiFunc_overload_app/LambdaDemo/src/MethodReferenceDemo.java
new file mode 100644
index 000000000..09554b86e
--- /dev/null
+++ b/BasicJava/LambdaDemo_method_ref_static_BiFunc_overload_app/LambdaDemo/src/MethodReferenceDemo.java
@@ -0,0 +1,46 @@
+import java.util.function.BiFunction;
+
+/**
+ *
+ * We can also override static methods by referring methods. In the
+ * following example, we have defined and overloaded three add
+ * methods.
+ *
+ */
+
+class Arithmetic
+{
+ public static int add(int a, int b)
+ {
+ return a + b;
+ }
+
+ public static float add(int a, float b)
+ {
+ return a + b;
+ }
+
+ public static float add(float a, float b)
+ {
+ return a + b;
+ }
+}
+
+public class MethodReferenceDemo
+{
+ public static void main(String[] args)
+ {
+ BiFunction adder1 = Arithmetic::add;
+ BiFunction adder2 = Arithmetic::add;
+ BiFunction adder3 = Arithmetic::add;
+
+ int result1 = adder1.apply(10, 20);
+ System.out.println(result1);
+
+ float result2 = adder2.apply(10, 20.3f);
+ System.out.println(result2);
+
+ float result3 = adder3.apply(10.6f, 20.8f);
+ System.out.println(result3);
+ }
+}
\ No newline at end of file
diff --git a/BasicJava/LambdaDemo_method_ref_static_BiFunc_overload_app/Output.txt b/BasicJava/LambdaDemo_method_ref_static_BiFunc_overload_app/Output.txt
new file mode 100644
index 000000000..bed10b49a
--- /dev/null
+++ b/BasicJava/LambdaDemo_method_ref_static_BiFunc_overload_app/Output.txt
@@ -0,0 +1,3 @@
+30
+30.3
+31.4
diff --git a/Later/Lambda/4/LambdaDemo/.classpath b/BasicJava/LambdaDemo_method_ref_static_Runnable_app/LambdaDemo/.classpath
similarity index 100%
rename from Later/Lambda/4/LambdaDemo/.classpath
rename to BasicJava/LambdaDemo_method_ref_static_Runnable_app/LambdaDemo/.classpath
diff --git a/Later/Lambda/2/LambdaDemo/.project b/BasicJava/LambdaDemo_method_ref_static_Runnable_app/LambdaDemo/.project
similarity index 100%
rename from Later/Lambda/2/LambdaDemo/.project
rename to BasicJava/LambdaDemo_method_ref_static_Runnable_app/LambdaDemo/.project
diff --git a/Later/Lambda/4/LambdaDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LambdaDemo_method_ref_static_Runnable_app/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Lambda/4/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LambdaDemo_method_ref_static_Runnable_app/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/Later/Lambda/18.3/LambdaDemo/bin/MethodReferenceDemo.class b/BasicJava/LambdaDemo_method_ref_static_Runnable_app/LambdaDemo/bin/MethodReferenceDemo.class
similarity index 100%
rename from Later/Lambda/18.3/LambdaDemo/bin/MethodReferenceDemo.class
rename to BasicJava/LambdaDemo_method_ref_static_Runnable_app/LambdaDemo/bin/MethodReferenceDemo.class
diff --git a/Later/Lambda/18.3/LambdaDemo/src/MethodReferenceDemo.java b/BasicJava/LambdaDemo_method_ref_static_Runnable_app/LambdaDemo/src/MethodReferenceDemo.java
similarity index 100%
rename from Later/Lambda/18.3/LambdaDemo/src/MethodReferenceDemo.java
rename to BasicJava/LambdaDemo_method_ref_static_Runnable_app/LambdaDemo/src/MethodReferenceDemo.java
diff --git a/BasicJava/LambdaDemo_method_ref_static_Runnable_app/Output.txt b/BasicJava/LambdaDemo_method_ref_static_Runnable_app/Output.txt
new file mode 100644
index 000000000..1a8759810
--- /dev/null
+++ b/BasicJava/LambdaDemo_method_ref_static_Runnable_app/Output.txt
@@ -0,0 +1 @@
+Thread is running...
diff --git a/Later/Lambda/5/LambdaDemo/.classpath b/BasicJava/LambdaDemo_method_ref_static_dog_app/LambdaDemo/.classpath
similarity index 100%
rename from Later/Lambda/5/LambdaDemo/.classpath
rename to BasicJava/LambdaDemo_method_ref_static_dog_app/LambdaDemo/.classpath
diff --git a/Later/Lambda/20/LambdaDemo/.project b/BasicJava/LambdaDemo_method_ref_static_dog_app/LambdaDemo/.project
similarity index 100%
rename from Later/Lambda/20/LambdaDemo/.project
rename to BasicJava/LambdaDemo_method_ref_static_dog_app/LambdaDemo/.project
diff --git a/Later/Lambda/5/LambdaDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LambdaDemo_method_ref_static_dog_app/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Lambda/5/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LambdaDemo_method_ref_static_dog_app/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/Later/Lambda/18.6/LambdaDemo/bin/Dog.class b/BasicJava/LambdaDemo_method_ref_static_dog_app/LambdaDemo/bin/Dog.class
similarity index 100%
rename from Later/Lambda/18.6/LambdaDemo/bin/Dog.class
rename to BasicJava/LambdaDemo_method_ref_static_dog_app/LambdaDemo/bin/Dog.class
diff --git a/BasicJava/LambdaDemo_method_ref_static_dog_app/LambdaDemo/bin/MethodReferenceDemo.class b/BasicJava/LambdaDemo_method_ref_static_dog_app/LambdaDemo/bin/MethodReferenceDemo.class
new file mode 100644
index 000000000..d8ffcc559
Binary files /dev/null and b/BasicJava/LambdaDemo_method_ref_static_dog_app/LambdaDemo/bin/MethodReferenceDemo.class differ
diff --git a/Later/Lambda/18.1/LambdaDemo/src/MethodReferenceDemo.java b/BasicJava/LambdaDemo_method_ref_static_dog_app/LambdaDemo/src/MethodReferenceDemo.java
similarity index 100%
rename from Later/Lambda/18.1/LambdaDemo/src/MethodReferenceDemo.java
rename to BasicJava/LambdaDemo_method_ref_static_dog_app/LambdaDemo/src/MethodReferenceDemo.java
diff --git a/BasicJava/LambdaDemo_method_ref_static_dog_app/Output.txt b/BasicJava/LambdaDemo_method_ref_static_dog_app/Output.txt
new file mode 100644
index 000000000..e0a58b080
--- /dev/null
+++ b/BasicJava/LambdaDemo_method_ref_static_dog_app/Output.txt
@@ -0,0 +1 @@
+Dog is eating chicken.
diff --git a/Later/Lambda/6.1/LambdaDemo/.classpath b/BasicJava/LambdaDemo_method_ref_static_person_app/LambdaDemo/.classpath
similarity index 100%
rename from Later/Lambda/6.1/LambdaDemo/.classpath
rename to BasicJava/LambdaDemo_method_ref_static_person_app/LambdaDemo/.classpath
diff --git a/Later/Lambda/21/LambdaDemo/.project b/BasicJava/LambdaDemo_method_ref_static_person_app/LambdaDemo/.project
similarity index 100%
rename from Later/Lambda/21/LambdaDemo/.project
rename to BasicJava/LambdaDemo_method_ref_static_person_app/LambdaDemo/.project
diff --git a/Later/Lambda/6.1/LambdaDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LambdaDemo_method_ref_static_person_app/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Lambda/6.1/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LambdaDemo_method_ref_static_person_app/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/Later/Lambda/18.2/LambdaDemo/bin/MethodReferenceDemo.class b/BasicJava/LambdaDemo_method_ref_static_person_app/LambdaDemo/bin/MethodReferenceDemo.class
similarity index 100%
rename from Later/Lambda/18.2/LambdaDemo/bin/MethodReferenceDemo.class
rename to BasicJava/LambdaDemo_method_ref_static_person_app/LambdaDemo/bin/MethodReferenceDemo.class
diff --git a/Later/Lambda/18.2/LambdaDemo/bin/Person.class b/BasicJava/LambdaDemo_method_ref_static_person_app/LambdaDemo/bin/Person.class
similarity index 100%
rename from Later/Lambda/18.2/LambdaDemo/bin/Person.class
rename to BasicJava/LambdaDemo_method_ref_static_person_app/LambdaDemo/bin/Person.class
diff --git a/Later/Lambda/18.2/LambdaDemo/src/MethodReferenceDemo.java b/BasicJava/LambdaDemo_method_ref_static_person_app/LambdaDemo/src/MethodReferenceDemo.java
similarity index 100%
rename from Later/Lambda/18.2/LambdaDemo/src/MethodReferenceDemo.java
rename to BasicJava/LambdaDemo_method_ref_static_person_app/LambdaDemo/src/MethodReferenceDemo.java
diff --git a/BasicJava/LambdaDemo_method_ref_static_person_app/Output.txt b/BasicJava/LambdaDemo_method_ref_static_person_app/Output.txt
new file mode 100644
index 000000000..1a2f88911
--- /dev/null
+++ b/BasicJava/LambdaDemo_method_ref_static_person_app/Output.txt
@@ -0,0 +1 @@
+Walking on the road.
diff --git a/Later/Lambda/6.2/LambdaDemo/.classpath b/BasicJava/LambdaDemo_multi_param_App/LambdaDemo/.classpath
similarity index 100%
rename from Later/Lambda/6.2/LambdaDemo/.classpath
rename to BasicJava/LambdaDemo_multi_param_App/LambdaDemo/.classpath
diff --git a/Later/Lambda/22/LambdaDemo/.project b/BasicJava/LambdaDemo_multi_param_App/LambdaDemo/.project
similarity index 100%
rename from Later/Lambda/22/LambdaDemo/.project
rename to BasicJava/LambdaDemo_multi_param_App/LambdaDemo/.project
diff --git a/Later/Lambda/6.2/LambdaDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LambdaDemo_multi_param_App/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Lambda/6.2/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LambdaDemo_multi_param_App/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/Later/Lambda/4/LambdaDemo/bin/Dog.class b/BasicJava/LambdaDemo_multi_param_App/LambdaDemo/bin/Dog.class
similarity index 100%
rename from Later/Lambda/4/LambdaDemo/bin/Dog.class
rename to BasicJava/LambdaDemo_multi_param_App/LambdaDemo/bin/Dog.class
diff --git a/BasicJava/LambdaDemo_multi_param_App/LambdaDemo/bin/LambdaDemo.class b/BasicJava/LambdaDemo_multi_param_App/LambdaDemo/bin/LambdaDemo.class
new file mode 100644
index 000000000..16d0c94a2
Binary files /dev/null and b/BasicJava/LambdaDemo_multi_param_App/LambdaDemo/bin/LambdaDemo.class differ
diff --git a/BasicJava/LambdaDemo_multi_param_App/LambdaDemo/src/LambdaDemo.java b/BasicJava/LambdaDemo_multi_param_App/LambdaDemo/src/LambdaDemo.java
new file mode 100644
index 000000000..45be3303e
--- /dev/null
+++ b/BasicJava/LambdaDemo_multi_param_App/LambdaDemo/src/LambdaDemo.java
@@ -0,0 +1,28 @@
+@FunctionalInterface
+interface Dog
+{
+ public void eat(String foodName1, String foodName2);
+}
+
+/**
+ *
+ * A lambda expression can have zero or any number of arguments.
+ *
+ */
+public class LambdaDemo
+{
+
+ public static void main(String[] args)
+ {
+ /*
+ * Java Lambda Expression Example: Multiple Parameters.
+ */
+ Dog dog = (foodName1, foodName2) ->
+ {
+ System.out.println(
+ "eating " + foodName1 + " and " + foodName2);
+ };
+ dog.eat("Mutton", "Biscuit");
+ }
+
+}
diff --git a/BasicJava/LambdaDemo_multi_param_App/Output.txt b/BasicJava/LambdaDemo_multi_param_App/Output.txt
new file mode 100644
index 000000000..5855f24cf
--- /dev/null
+++ b/BasicJava/LambdaDemo_multi_param_App/Output.txt
@@ -0,0 +1 @@
+eating Mutton and Biscuit
diff --git a/Later/Lambda/6/LambdaDemo/.classpath b/BasicJava/LambdaDemo_multi_statement_App/LambdaDemo/.classpath
similarity index 100%
rename from Later/Lambda/6/LambdaDemo/.classpath
rename to BasicJava/LambdaDemo_multi_statement_App/LambdaDemo/.classpath
diff --git a/Later/Lambda/23/LambdaDemo/.project b/BasicJava/LambdaDemo_multi_statement_App/LambdaDemo/.project
similarity index 100%
rename from Later/Lambda/23/LambdaDemo/.project
rename to BasicJava/LambdaDemo_multi_statement_App/LambdaDemo/.project
diff --git a/Later/Lambda/6/LambdaDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LambdaDemo_multi_statement_App/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Lambda/6/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LambdaDemo_multi_statement_App/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/Later/Lambda/8/LambdaDemo/bin/LambdaDemo.class b/BasicJava/LambdaDemo_multi_statement_App/LambdaDemo/bin/LambdaDemo.class
similarity index 100%
rename from Later/Lambda/8/LambdaDemo/bin/LambdaDemo.class
rename to BasicJava/LambdaDemo_multi_statement_App/LambdaDemo/bin/LambdaDemo.class
diff --git a/Later/Lambda/10/LambdaDemo/bin/Message.class b/BasicJava/LambdaDemo_multi_statement_App/LambdaDemo/bin/Message.class
similarity index 100%
rename from Later/Lambda/10/LambdaDemo/bin/Message.class
rename to BasicJava/LambdaDemo_multi_statement_App/LambdaDemo/bin/Message.class
diff --git a/Later/Lambda/8/LambdaDemo/src/LambdaDemo.java b/BasicJava/LambdaDemo_multi_statement_App/LambdaDemo/src/LambdaDemo.java
similarity index 100%
rename from Later/Lambda/8/LambdaDemo/src/LambdaDemo.java
rename to BasicJava/LambdaDemo_multi_statement_App/LambdaDemo/src/LambdaDemo.java
diff --git a/BasicJava/LambdaDemo_multi_statement_App/Output.txt b/BasicJava/LambdaDemo_multi_statement_App/Output.txt
new file mode 100644
index 000000000..a86c89cf2
--- /dev/null
+++ b/BasicJava/LambdaDemo_multi_statement_App/Output.txt
@@ -0,0 +1 @@
+Welcome to India.
diff --git a/Later/Lambda/7/LambdaDemo/.classpath b/BasicJava/LambdaDemo_no_param_App/LambdaDemo/.classpath
similarity index 100%
rename from Later/Lambda/7/LambdaDemo/.classpath
rename to BasicJava/LambdaDemo_no_param_App/LambdaDemo/.classpath
diff --git a/Later/Lambda/3/LambdaDemo/.project b/BasicJava/LambdaDemo_no_param_App/LambdaDemo/.project
similarity index 100%
rename from Later/Lambda/3/LambdaDemo/.project
rename to BasicJava/LambdaDemo_no_param_App/LambdaDemo/.project
diff --git a/Later/Lambda/7/LambdaDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LambdaDemo_no_param_App/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Lambda/7/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LambdaDemo_no_param_App/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/Later/Lambda/2/LambdaDemo/bin/Dog.class b/BasicJava/LambdaDemo_no_param_App/LambdaDemo/bin/Dog.class
similarity index 100%
rename from Later/Lambda/2/LambdaDemo/bin/Dog.class
rename to BasicJava/LambdaDemo_no_param_App/LambdaDemo/bin/Dog.class
diff --git a/BasicJava/LambdaDemo_no_param_App/LambdaDemo/bin/LambdaDemo.class b/BasicJava/LambdaDemo_no_param_App/LambdaDemo/bin/LambdaDemo.class
new file mode 100644
index 000000000..a188ba6c2
Binary files /dev/null and b/BasicJava/LambdaDemo_no_param_App/LambdaDemo/bin/LambdaDemo.class differ
diff --git a/BasicJava/LambdaDemo_no_param_App/LambdaDemo/src/LambdaDemo.java b/BasicJava/LambdaDemo_no_param_App/LambdaDemo/src/LambdaDemo.java
new file mode 100644
index 000000000..85748e39e
--- /dev/null
+++ b/BasicJava/LambdaDemo_no_param_App/LambdaDemo/src/LambdaDemo.java
@@ -0,0 +1,27 @@
+@FunctionalInterface
+interface Dog
+{
+ public void eat();
+}
+
+/**
+ *
+ * A lambda expression can have zero or any number of arguments.
+ *
+ */
+public class LambdaDemo
+{
+
+ public static void main(String[] args)
+ {
+ /*
+ * Java Lambda Expression Example: No Parameter.
+ */
+ Dog dog = () ->
+ {
+ System.out.println("eating chicken");
+ };
+ dog.eat();
+ }
+
+}
diff --git a/BasicJava/LambdaDemo_no_param_App/Output.txt b/BasicJava/LambdaDemo_no_param_App/Output.txt
new file mode 100644
index 000000000..f6c9f5c9a
--- /dev/null
+++ b/BasicJava/LambdaDemo_no_param_App/Output.txt
@@ -0,0 +1 @@
+eating chicken
diff --git a/Later/Lambda/8/LambdaDemo/.classpath b/BasicJava/LambdaDemo_one_param_App/LambdaDemo/.classpath
similarity index 100%
rename from Later/Lambda/8/LambdaDemo/.classpath
rename to BasicJava/LambdaDemo_one_param_App/LambdaDemo/.classpath
diff --git a/Later/Lambda/4/LambdaDemo/.project b/BasicJava/LambdaDemo_one_param_App/LambdaDemo/.project
similarity index 100%
rename from Later/Lambda/4/LambdaDemo/.project
rename to BasicJava/LambdaDemo_one_param_App/LambdaDemo/.project
diff --git a/Later/Lambda/8/LambdaDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LambdaDemo_one_param_App/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Lambda/8/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LambdaDemo_one_param_App/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/Later/Lambda/3/LambdaDemo/bin/Dog.class b/BasicJava/LambdaDemo_one_param_App/LambdaDemo/bin/Dog.class
similarity index 100%
rename from Later/Lambda/3/LambdaDemo/bin/Dog.class
rename to BasicJava/LambdaDemo_one_param_App/LambdaDemo/bin/Dog.class
diff --git a/BasicJava/LambdaDemo_one_param_App/LambdaDemo/bin/LambdaDemo.class b/BasicJava/LambdaDemo_one_param_App/LambdaDemo/bin/LambdaDemo.class
new file mode 100644
index 000000000..0a70598aa
Binary files /dev/null and b/BasicJava/LambdaDemo_one_param_App/LambdaDemo/bin/LambdaDemo.class differ
diff --git a/BasicJava/LambdaDemo_one_param_App/LambdaDemo/src/LambdaDemo.java b/BasicJava/LambdaDemo_one_param_App/LambdaDemo/src/LambdaDemo.java
new file mode 100644
index 000000000..e8497d318
--- /dev/null
+++ b/BasicJava/LambdaDemo_one_param_App/LambdaDemo/src/LambdaDemo.java
@@ -0,0 +1,27 @@
+@FunctionalInterface
+interface Dog
+{
+ public void eat(String foodName);
+}
+
+/**
+ *
+ * A lambda expression can have zero or any number of arguments.
+ *
+ */
+public class LambdaDemo
+{
+
+ public static void main(String[] args)
+ {
+ /*
+ * Java Lambda Expression Example: Single Parameter.
+ */
+ Dog dog = (foodName) ->
+ {
+ System.out.println("eating " + foodName);
+ };
+ dog.eat("Mutton");
+ }
+
+}
diff --git a/BasicJava/LambdaDemo_one_param_App/Output.txt b/BasicJava/LambdaDemo_one_param_App/Output.txt
new file mode 100644
index 000000000..2ac2aeac3
--- /dev/null
+++ b/BasicJava/LambdaDemo_one_param_App/Output.txt
@@ -0,0 +1 @@
+eating Mutton
diff --git a/Later/Lambda/9.3/LambdaDemo/.classpath b/BasicJava/LambdaDemo_parenthesis_app/LambdaDemo/.classpath
similarity index 100%
rename from Later/Lambda/9.3/LambdaDemo/.classpath
rename to BasicJava/LambdaDemo_parenthesis_app/LambdaDemo/.classpath
diff --git a/Later/Lambda/5/LambdaDemo/.project b/BasicJava/LambdaDemo_parenthesis_app/LambdaDemo/.project
similarity index 100%
rename from Later/Lambda/5/LambdaDemo/.project
rename to BasicJava/LambdaDemo_parenthesis_app/LambdaDemo/.project
diff --git a/Later/Lambda/9.3/LambdaDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LambdaDemo_parenthesis_app/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Lambda/9.3/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LambdaDemo_parenthesis_app/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/LambdaDemo_parenthesis_app/LambdaDemo/bin/GreetingService.class b/BasicJava/LambdaDemo_parenthesis_app/LambdaDemo/bin/GreetingService.class
new file mode 100644
index 000000000..e5af5f211
Binary files /dev/null and b/BasicJava/LambdaDemo_parenthesis_app/LambdaDemo/bin/GreetingService.class differ
diff --git a/BasicJava/LambdaDemo_parenthesis_app/LambdaDemo/bin/LambdaDemo.class b/BasicJava/LambdaDemo_parenthesis_app/LambdaDemo/bin/LambdaDemo.class
new file mode 100644
index 000000000..260470419
Binary files /dev/null and b/BasicJava/LambdaDemo_parenthesis_app/LambdaDemo/bin/LambdaDemo.class differ
diff --git a/BasicJava/LambdaDemo_parenthesis_app/LambdaDemo/src/LambdaDemo.java b/BasicJava/LambdaDemo_parenthesis_app/LambdaDemo/src/LambdaDemo.java
new file mode 100644
index 000000000..fbce02d8e
--- /dev/null
+++ b/BasicJava/LambdaDemo_parenthesis_app/LambdaDemo/src/LambdaDemo.java
@@ -0,0 +1,25 @@
+@FunctionalInterface
+interface GreetingService
+{
+ void sayMessage(String message);
+}
+
+public class LambdaDemo
+{
+
+ public static void main(String[] args)
+ {
+
+ // with parenthesis
+ GreetingService greetService1 = message ->
+ System.out.println("Hello " + message);
+
+ // without parenthesis
+ GreetingService greetService2 = (message) ->
+ System.out.println("Hello " + message);
+
+ greetService1.sayMessage("Peter");
+ greetService2.sayMessage("John");
+ }
+
+}
diff --git a/BasicJava/LambdaDemo_parenthesis_app/Output.txt b/BasicJava/LambdaDemo_parenthesis_app/Output.txt
new file mode 100644
index 000000000..6e3e7ee87
--- /dev/null
+++ b/BasicJava/LambdaDemo_parenthesis_app/Output.txt
@@ -0,0 +1,2 @@
+Hello Peter
+Hello John
diff --git a/Later/Lambda/9.4/LambdaDemo/.classpath b/BasicJava/LambdaDemo_predicate_App/LambdaDemo/.classpath
similarity index 100%
rename from Later/Lambda/9.4/LambdaDemo/.classpath
rename to BasicJava/LambdaDemo_predicate_App/LambdaDemo/.classpath
diff --git a/Later/Lambda/6.1/LambdaDemo/.project b/BasicJava/LambdaDemo_predicate_App/LambdaDemo/.project
similarity index 100%
rename from Later/Lambda/6.1/LambdaDemo/.project
rename to BasicJava/LambdaDemo_predicate_App/LambdaDemo/.project
diff --git a/Later/Lambda/9.4/LambdaDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LambdaDemo_predicate_App/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Lambda/9.4/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LambdaDemo_predicate_App/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/LambdaDemo_predicate_App/LambdaDemo/bin/LambdaPredicateDemo.class b/BasicJava/LambdaDemo_predicate_App/LambdaDemo/bin/LambdaPredicateDemo.class
new file mode 100644
index 000000000..00f0e1005
Binary files /dev/null and b/BasicJava/LambdaDemo_predicate_App/LambdaDemo/bin/LambdaPredicateDemo.class differ
diff --git a/BasicJava/LambdaDemo_predicate_App/LambdaDemo/bin/Person.class b/BasicJava/LambdaDemo_predicate_App/LambdaDemo/bin/Person.class
new file mode 100644
index 000000000..943cff944
Binary files /dev/null and b/BasicJava/LambdaDemo_predicate_App/LambdaDemo/bin/Person.class differ
diff --git a/BasicJava/LambdaDemo_predicate_App/LambdaDemo/src/LambdaPredicateDemo.java b/BasicJava/LambdaDemo_predicate_App/LambdaDemo/src/LambdaPredicateDemo.java
new file mode 100644
index 000000000..6d3a98ff6
--- /dev/null
+++ b/BasicJava/LambdaDemo_predicate_App/LambdaDemo/src/LambdaPredicateDemo.java
@@ -0,0 +1,39 @@
+import java.util.Arrays;
+import java.util.List;
+import java.util.function.Predicate;
+
+public class LambdaPredicateDemo
+{
+ public static void main(String[] args)
+ {
+ List personList = Arrays.asList(
+ new Person("Carla", 33), new Person("Balu", 32),
+ new Person("Bharth", 40), new Person("Ajay", 31));
+
+ System.out.println("------------Name Starts with B---------");
+
+ Predicate predicate = person -> person.getName().startsWith("B");
+
+ printNameBeginWith_B(personList, predicate);
+
+ System.out.println("----------------------------------------");
+
+ }
+
+ /*
+ * Method to print all people that have name begins with B.
+ */
+ private static void printNameBeginWith_B(List personList,
+ Predicate predicate)
+ {
+ for (Person person : personList)
+ {
+ if (predicate.test(person))
+ {
+ System.out.println(person);
+ }
+ }
+
+ }
+
+}
diff --git a/BasicJava/LambdaDemo_predicate_App/LambdaDemo/src/Person.java b/BasicJava/LambdaDemo_predicate_App/LambdaDemo/src/Person.java
new file mode 100644
index 000000000..5c3924f59
--- /dev/null
+++ b/BasicJava/LambdaDemo_predicate_App/LambdaDemo/src/Person.java
@@ -0,0 +1,39 @@
+public class Person
+{
+ private String name;
+ private int age;
+
+ public Person(String name, int age)
+ {
+ super();
+ this.name = name;
+ this.age = age;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public int getAge()
+ {
+ return age;
+ }
+
+ public void setAge(int age)
+ {
+ this.age = age;
+ }
+
+ @Override
+ public String toString()
+ {
+ return "Person [name=" + name + ", age=" + age + "]";
+ }
+
+}
diff --git a/BasicJava/LambdaDemo_predicate_App/Output.txt b/BasicJava/LambdaDemo_predicate_App/Output.txt
new file mode 100644
index 000000000..c5ebcd61a
--- /dev/null
+++ b/BasicJava/LambdaDemo_predicate_App/Output.txt
@@ -0,0 +1,3 @@
+------------Name Starts with B---------
+Person [name=Balu, age=32]
+Person [name=Bharth, age=40]
diff --git a/Later/Lambda/9/LambdaDemo/.classpath b/BasicJava/LambdaDemo_product_sort_name_App/LambdaDemo/.classpath
similarity index 100%
rename from Later/Lambda/9/LambdaDemo/.classpath
rename to BasicJava/LambdaDemo_product_sort_name_App/LambdaDemo/.classpath
diff --git a/Later/Lambda/6.2/LambdaDemo/.project b/BasicJava/LambdaDemo_product_sort_name_App/LambdaDemo/.project
similarity index 100%
rename from Later/Lambda/6.2/LambdaDemo/.project
rename to BasicJava/LambdaDemo_product_sort_name_App/LambdaDemo/.project
diff --git a/Later/Lambda/9/LambdaDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LambdaDemo_product_sort_name_App/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Lambda/9/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LambdaDemo_product_sort_name_App/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/LambdaDemo_product_sort_name_App/LambdaDemo/bin/LambdaDemo.class b/BasicJava/LambdaDemo_product_sort_name_App/LambdaDemo/bin/LambdaDemo.class
new file mode 100644
index 000000000..aff5f3196
Binary files /dev/null and b/BasicJava/LambdaDemo_product_sort_name_App/LambdaDemo/bin/LambdaDemo.class differ
diff --git a/Later/Lambda/11/LambdaDemo/bin/Product.class b/BasicJava/LambdaDemo_product_sort_name_App/LambdaDemo/bin/Product.class
similarity index 100%
rename from Later/Lambda/11/LambdaDemo/bin/Product.class
rename to BasicJava/LambdaDemo_product_sort_name_App/LambdaDemo/bin/Product.class
diff --git a/BasicJava/LambdaDemo_product_sort_name_App/LambdaDemo/src/LambdaDemo.java b/BasicJava/LambdaDemo_product_sort_name_App/LambdaDemo/src/LambdaDemo.java
new file mode 100644
index 000000000..3bfc6c94d
--- /dev/null
+++ b/BasicJava/LambdaDemo_product_sort_name_App/LambdaDemo/src/LambdaDemo.java
@@ -0,0 +1,44 @@
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * Java Lambda Expression Example: Comparator
+ *
+ */
+public class LambdaDemo
+{
+
+ public static void main(String[] args)
+ {
+ List list = new ArrayList();
+
+ // Adding Products
+ list.add(new Product(1, "Sony LED TV", 65000f));
+ list.add(new Product(2, "Radio", 3000f));
+ list.add(new Product(3, "Laptop", 150000f));
+
+ System.out.println("Before Sorting .... \n");
+
+ displayProductInfo(list);
+
+ System.out.println("\nAfter Sorting ...\n");
+
+ // implementing lambda expression
+ Collections.sort(list, (p1, p2) -> {
+ return p1.getName().compareTo(p2.getName());
+ });
+
+ displayProductInfo(list);
+ }
+
+ private static void displayProductInfo(List list)
+ {
+ for (Product p : list)
+ {
+ System.out.println(p.getId() + " " + p.getName() + " "
+ + p.getPrice());
+ }
+ }
+
+}
diff --git a/Later/Lambda/11/LambdaDemo/src/Product.java b/BasicJava/LambdaDemo_product_sort_name_App/LambdaDemo/src/Product.java
similarity index 100%
rename from Later/Lambda/11/LambdaDemo/src/Product.java
rename to BasicJava/LambdaDemo_product_sort_name_App/LambdaDemo/src/Product.java
diff --git a/BasicJava/LambdaDemo_product_sort_name_App/Output.txt b/BasicJava/LambdaDemo_product_sort_name_App/Output.txt
new file mode 100644
index 000000000..ed54cc8a1
--- /dev/null
+++ b/BasicJava/LambdaDemo_product_sort_name_App/Output.txt
@@ -0,0 +1,11 @@
+Before Sorting ....
+
+1 Sony LED TV 65000.0
+2 Radio 3000.0
+3 Laptop 150000.0
+
+After Sorting ...
+
+3 Laptop 150000.0
+2 Radio 3000.0
+1 Sony LED TV 65000.0
diff --git a/Later/Streams/1/StreamDemo/.classpath b/BasicJava/LambdaDemo_sort_pl_App/LambdaDemo/.classpath
similarity index 100%
rename from Later/Streams/1/StreamDemo/.classpath
rename to BasicJava/LambdaDemo_sort_pl_App/LambdaDemo/.classpath
diff --git a/Later/Lambda/6/LambdaDemo/.project b/BasicJava/LambdaDemo_sort_pl_App/LambdaDemo/.project
similarity index 100%
rename from Later/Lambda/6/LambdaDemo/.project
rename to BasicJava/LambdaDemo_sort_pl_App/LambdaDemo/.project
diff --git a/Later/Streams/1/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LambdaDemo_sort_pl_App/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Streams/1/StreamDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LambdaDemo_sort_pl_App/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/LambdaDemo_sort_pl_App/LambdaDemo/bin/LambdaDemo.class b/BasicJava/LambdaDemo_sort_pl_App/LambdaDemo/bin/LambdaDemo.class
new file mode 100644
index 000000000..44779d990
Binary files /dev/null and b/BasicJava/LambdaDemo_sort_pl_App/LambdaDemo/bin/LambdaDemo.class differ
diff --git a/BasicJava/LambdaDemo_sort_pl_App/LambdaDemo/bin/NonLambdaDemo$1.class b/BasicJava/LambdaDemo_sort_pl_App/LambdaDemo/bin/NonLambdaDemo$1.class
new file mode 100644
index 000000000..5b50508f4
Binary files /dev/null and b/BasicJava/LambdaDemo_sort_pl_App/LambdaDemo/bin/NonLambdaDemo$1.class differ
diff --git a/BasicJava/LambdaDemo_sort_pl_App/LambdaDemo/bin/NonLambdaDemo.class b/BasicJava/LambdaDemo_sort_pl_App/LambdaDemo/bin/NonLambdaDemo.class
new file mode 100644
index 000000000..da0864983
Binary files /dev/null and b/BasicJava/LambdaDemo_sort_pl_App/LambdaDemo/bin/NonLambdaDemo.class differ
diff --git a/BasicJava/LambdaDemo_sort_pl_App/LambdaDemo/bin/Person.class b/BasicJava/LambdaDemo_sort_pl_App/LambdaDemo/bin/Person.class
new file mode 100644
index 000000000..943cff944
Binary files /dev/null and b/BasicJava/LambdaDemo_sort_pl_App/LambdaDemo/bin/Person.class differ
diff --git a/BasicJava/LambdaDemo_sort_pl_App/LambdaDemo/src/LambdaDemo.java b/BasicJava/LambdaDemo_sort_pl_App/LambdaDemo/src/LambdaDemo.java
new file mode 100644
index 000000000..01e737f7b
--- /dev/null
+++ b/BasicJava/LambdaDemo_sort_pl_App/LambdaDemo/src/LambdaDemo.java
@@ -0,0 +1,53 @@
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * JDK 8
+ *
+ * With lambda expression how to sort the list of person by name.
+ *
+ */
+
+public class LambdaDemo
+{
+ public static void main(String[] args)
+ {
+ List personList = Arrays.asList(
+ new Person("Carla", 33), new Person("Balu", 32),
+ new Person("Bharth", 40), new Person("Ajay", 31));
+
+ System.out.println("------------Before Sort by name---------");
+
+ printAll(personList);
+
+ System.out.println("----------------------------------------");
+
+ /*
+ * Sort list by Name, with JDK 8
+ */
+
+ Collections.sort(personList,
+ (p1, p2) -> p1.getName().compareTo(p2.getName()));
+
+
+ System.out.println("\n------------After Sort by name---------");
+ /*
+ * Create a method that prints all elements in the list.
+ */
+
+ printAll(personList);
+
+ System.out.println("----------------------------------------");
+
+ }
+
+ private static void printAll(List personList)
+ {
+ for (Person person : personList)
+ {
+ System.out.println(person);
+ }
+
+ }
+}
diff --git a/BasicJava/LambdaDemo_sort_pl_App/LambdaDemo/src/NonLambdaDemo.java b/BasicJava/LambdaDemo_sort_pl_App/LambdaDemo/src/NonLambdaDemo.java
new file mode 100644
index 000000000..67c9abb22
--- /dev/null
+++ b/BasicJava/LambdaDemo_sort_pl_App/LambdaDemo/src/NonLambdaDemo.java
@@ -0,0 +1,58 @@
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+/**
+ * Before JDK 8
+ *
+ * With out lambda expression how to sort the list of person by name
+ *
+ */
+public class NonLambdaDemo
+{
+ public static void main(String[] args)
+ {
+ List personList = Arrays.asList(
+ new Person("Carla", 33), new Person("Balu", 32),
+ new Person("Bharth", 40), new Person("Ajay", 31));
+
+ System.out.println("------------Before Sort by name---------");
+
+ printAll(personList);
+
+ System.out.println("----------------------------------------");
+
+ /*
+ * Sort list by Name,Before JDK 8
+ */
+
+ Collections.sort(personList, new Comparator()
+ {
+ @Override
+ public int compare(Person p1, Person p2)
+ {
+ return p1.getName().compareTo(p2.getName());
+ }
+ });
+
+ System.out.println("\n------------After Sort by name---------");
+ /*
+ * Create a method that prints all elements in the list.
+ */
+
+ printAll(personList);
+
+ System.out.println("----------------------------------------");
+
+ }
+
+ private static void printAll(List personList)
+ {
+ for (Person person : personList)
+ {
+ System.out.println(person);
+ }
+
+ }
+}
diff --git a/BasicJava/LambdaDemo_sort_pl_App/LambdaDemo/src/Person.java b/BasicJava/LambdaDemo_sort_pl_App/LambdaDemo/src/Person.java
new file mode 100644
index 000000000..5c3924f59
--- /dev/null
+++ b/BasicJava/LambdaDemo_sort_pl_App/LambdaDemo/src/Person.java
@@ -0,0 +1,39 @@
+public class Person
+{
+ private String name;
+ private int age;
+
+ public Person(String name, int age)
+ {
+ super();
+ this.name = name;
+ this.age = age;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public int getAge()
+ {
+ return age;
+ }
+
+ public void setAge(int age)
+ {
+ this.age = age;
+ }
+
+ @Override
+ public String toString()
+ {
+ return "Person [name=" + name + ", age=" + age + "]";
+ }
+
+}
diff --git a/BasicJava/LambdaDemo_sort_pl_App/LambdaDemo_Output.txt b/BasicJava/LambdaDemo_sort_pl_App/LambdaDemo_Output.txt
new file mode 100644
index 000000000..c1bc9c768
--- /dev/null
+++ b/BasicJava/LambdaDemo_sort_pl_App/LambdaDemo_Output.txt
@@ -0,0 +1,13 @@
+------------Before Sort by name---------
+Person [name=Carla, age=33]
+Person [name=Balu, age=32]
+Person [name=Bharth, age=40]
+Person [name=Ajay, age=31]
+----------------------------------------
+
+------------After Sort by name---------
+Person [name=Ajay, age=31]
+Person [name=Balu, age=32]
+Person [name=Bharth, age=40]
+Person [name=Carla, age=33]
+----------------------------------------
diff --git a/BasicJava/LambdaDemo_sort_pl_App/NonLambdaDemo_Output.txt b/BasicJava/LambdaDemo_sort_pl_App/NonLambdaDemo_Output.txt
new file mode 100644
index 000000000..c1bc9c768
--- /dev/null
+++ b/BasicJava/LambdaDemo_sort_pl_App/NonLambdaDemo_Output.txt
@@ -0,0 +1,13 @@
+------------Before Sort by name---------
+Person [name=Carla, age=33]
+Person [name=Balu, age=32]
+Person [name=Bharth, age=40]
+Person [name=Ajay, age=31]
+----------------------------------------
+
+------------After Sort by name---------
+Person [name=Ajay, age=31]
+Person [name=Balu, age=32]
+Person [name=Bharth, age=40]
+Person [name=Carla, age=33]
+----------------------------------------
diff --git a/Later/Streams/10/StreamDemo/.classpath b/BasicJava/LambdaDemo_static_method_ref_less50_app/LambdaDemo/.classpath
similarity index 100%
rename from Later/Streams/10/StreamDemo/.classpath
rename to BasicJava/LambdaDemo_static_method_ref_less50_app/LambdaDemo/.classpath
diff --git a/Later/Lambda/7/LambdaDemo/.project b/BasicJava/LambdaDemo_static_method_ref_less50_app/LambdaDemo/.project
similarity index 100%
rename from Later/Lambda/7/LambdaDemo/.project
rename to BasicJava/LambdaDemo_static_method_ref_less50_app/LambdaDemo/.project
diff --git a/Later/Streams/10/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LambdaDemo_static_method_ref_less50_app/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Streams/10/StreamDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LambdaDemo_static_method_ref_less50_app/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/Later/Lambda/20/LambdaDemo/bin/LambdaDemo$1.class b/BasicJava/LambdaDemo_static_method_ref_less50_app/LambdaDemo/bin/LambdaDemo$1.class
similarity index 100%
rename from Later/Lambda/20/LambdaDemo/bin/LambdaDemo$1.class
rename to BasicJava/LambdaDemo_static_method_ref_less50_app/LambdaDemo/bin/LambdaDemo$1.class
diff --git a/BasicJava/LambdaDemo_static_method_ref_less50_app/LambdaDemo/bin/LambdaDemo.class b/BasicJava/LambdaDemo_static_method_ref_less50_app/LambdaDemo/bin/LambdaDemo.class
new file mode 100644
index 000000000..2638b8bda
Binary files /dev/null and b/BasicJava/LambdaDemo_static_method_ref_less50_app/LambdaDemo/bin/LambdaDemo.class differ
diff --git a/Later/Lambda/20/LambdaDemo/bin/Numbers.class b/BasicJava/LambdaDemo_static_method_ref_less50_app/LambdaDemo/bin/Numbers.class
similarity index 100%
rename from Later/Lambda/20/LambdaDemo/bin/Numbers.class
rename to BasicJava/LambdaDemo_static_method_ref_less50_app/LambdaDemo/bin/Numbers.class
diff --git a/BasicJava/LambdaDemo_static_method_ref_less50_app/LambdaDemo/src/LambdaDemo.java b/BasicJava/LambdaDemo_static_method_ref_less50_app/LambdaDemo/src/LambdaDemo.java
new file mode 100644
index 000000000..6dae40943
--- /dev/null
+++ b/BasicJava/LambdaDemo_static_method_ref_less50_app/LambdaDemo/src/LambdaDemo.java
@@ -0,0 +1,32 @@
+import java.util.Arrays;
+import java.util.List;
+import java.util.function.Predicate;
+
+public class LambdaDemo
+{
+ public static void main(String[] args)
+ {
+
+ List list = Arrays.asList(12, 55, 75, 88, 24, 40);
+
+ // Using an anonymous class
+ List listOfLessthanfiftyNumbers = Numbers.findNumbers(list, new Predicate()
+ {
+ public boolean test(Integer i)
+ {
+ return Numbers.isLessThanFifty(i);
+ }
+ });
+
+ System.out.println("listOfLessthanfiftyNumbers - anonymous class = "+listOfLessthanfiftyNumbers);
+
+ // Using a lambda expression
+ listOfLessthanfiftyNumbers = Numbers.findNumbers(list, (i) -> Numbers.isLessThanFifty(i));
+ System.out.println("listOfLessthanfiftyNumbers - lambda expression = "+listOfLessthanfiftyNumbers);
+
+ // Using a method reference
+ listOfLessthanfiftyNumbers = Numbers.findNumbers(list, Numbers::isLessThanFifty);
+ System.out.println("listOfLessthanfiftyNumbers - method reference = "+listOfLessthanfiftyNumbers);
+ }
+
+}
diff --git a/BasicJava/LambdaDemo_static_method_ref_less50_app/LambdaDemo/src/Numbers.java b/BasicJava/LambdaDemo_static_method_ref_less50_app/LambdaDemo/src/Numbers.java
new file mode 100644
index 000000000..aff2537cb
--- /dev/null
+++ b/BasicJava/LambdaDemo_static_method_ref_less50_app/LambdaDemo/src/Numbers.java
@@ -0,0 +1,29 @@
+import java.util.ArrayList;
+import java.util.List;
+import java.util.function.Predicate;
+
+class Numbers
+{
+ public static boolean isLessThanFifty(int number)
+ {
+ return number < 50;
+ }
+
+ public static List findNumbers(List list,
+ Predicate p)
+ {
+ List newList = new ArrayList<>();
+ for (Integer i : list)
+ {
+ /*
+ * test the number is less than 50
+ * then add to the newList.
+ */
+ if (p.test(i))
+ {
+ newList.add(i);
+ }
+ }
+ return newList;
+ }
+}
\ No newline at end of file
diff --git a/BasicJava/LambdaDemo_static_method_ref_less50_app/Output.txt b/BasicJava/LambdaDemo_static_method_ref_less50_app/Output.txt
new file mode 100644
index 000000000..833c5bc40
--- /dev/null
+++ b/BasicJava/LambdaDemo_static_method_ref_less50_app/Output.txt
@@ -0,0 +1,3 @@
+listOfLessthanfiftyNumbers - anonymous class = [12, 24, 40]
+listOfLessthanfiftyNumbers - lambda expression = [12, 24, 40]
+listOfLessthanfiftyNumbers - method reference = [12, 24, 40]
diff --git a/Later/Streams/11/StreamDemo/.classpath b/BasicJava/LambdaDemo_static_method_ref_more50_app/LambdaDemo/.classpath
similarity index 100%
rename from Later/Streams/11/StreamDemo/.classpath
rename to BasicJava/LambdaDemo_static_method_ref_more50_app/LambdaDemo/.classpath
diff --git a/Later/Lambda/8/LambdaDemo/.project b/BasicJava/LambdaDemo_static_method_ref_more50_app/LambdaDemo/.project
similarity index 100%
rename from Later/Lambda/8/LambdaDemo/.project
rename to BasicJava/LambdaDemo_static_method_ref_more50_app/LambdaDemo/.project
diff --git a/Later/Streams/11/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LambdaDemo_static_method_ref_more50_app/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Streams/11/StreamDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LambdaDemo_static_method_ref_more50_app/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/Later/Lambda/21/LambdaDemo/bin/LambdaDemo$1.class b/BasicJava/LambdaDemo_static_method_ref_more50_app/LambdaDemo/bin/LambdaDemo$1.class
similarity index 100%
rename from Later/Lambda/21/LambdaDemo/bin/LambdaDemo$1.class
rename to BasicJava/LambdaDemo_static_method_ref_more50_app/LambdaDemo/bin/LambdaDemo$1.class
diff --git a/Later/Lambda/21/LambdaDemo/bin/LambdaDemo.class b/BasicJava/LambdaDemo_static_method_ref_more50_app/LambdaDemo/bin/LambdaDemo.class
similarity index 100%
rename from Later/Lambda/21/LambdaDemo/bin/LambdaDemo.class
rename to BasicJava/LambdaDemo_static_method_ref_more50_app/LambdaDemo/bin/LambdaDemo.class
diff --git a/Later/Lambda/21/LambdaDemo/bin/Numbers.class b/BasicJava/LambdaDemo_static_method_ref_more50_app/LambdaDemo/bin/Numbers.class
similarity index 83%
rename from Later/Lambda/21/LambdaDemo/bin/Numbers.class
rename to BasicJava/LambdaDemo_static_method_ref_more50_app/LambdaDemo/bin/Numbers.class
index 0123e2b9f..1328297a0 100644
Binary files a/Later/Lambda/21/LambdaDemo/bin/Numbers.class and b/BasicJava/LambdaDemo_static_method_ref_more50_app/LambdaDemo/bin/Numbers.class differ
diff --git a/Later/Lambda/21/LambdaDemo/src/LambdaDemo.java b/BasicJava/LambdaDemo_static_method_ref_more50_app/LambdaDemo/src/LambdaDemo.java
similarity index 100%
rename from Later/Lambda/21/LambdaDemo/src/LambdaDemo.java
rename to BasicJava/LambdaDemo_static_method_ref_more50_app/LambdaDemo/src/LambdaDemo.java
diff --git a/BasicJava/LambdaDemo_static_method_ref_more50_app/LambdaDemo/src/Numbers.java b/BasicJava/LambdaDemo_static_method_ref_more50_app/LambdaDemo/src/Numbers.java
new file mode 100644
index 000000000..f59cc1996
--- /dev/null
+++ b/BasicJava/LambdaDemo_static_method_ref_more50_app/LambdaDemo/src/Numbers.java
@@ -0,0 +1,25 @@
+import java.util.ArrayList;
+import java.util.List;
+import java.util.function.BiPredicate;
+
+class Numbers
+{
+ public static boolean isMoreThanFifty(int n1, int n2)
+ {
+ return (n1 + n2) > 50;
+ }
+
+ public static List findNumbers(List list,
+ BiPredicate p)
+ {
+ List newList = new ArrayList<>();
+ for (Integer i : list)
+ {
+ if (p.test(i, i + 10))
+ {
+ newList.add(i);
+ }
+ }
+ return newList;
+ }
+}
\ No newline at end of file
diff --git a/BasicJava/LambdaDemo_static_method_ref_more50_app/Output.txt b/BasicJava/LambdaDemo_static_method_ref_more50_app/Output.txt
new file mode 100644
index 000000000..920c0c59e
--- /dev/null
+++ b/BasicJava/LambdaDemo_static_method_ref_more50_app/Output.txt
@@ -0,0 +1,3 @@
+listOfNumbers using a anonymous class = [45, 33, 24, 40]
+listOfNumbers using a lambda expression = [45, 33, 24, 40]
+listOfNumbers using a method reference = [45, 33, 24, 40]
diff --git a/Later/Streams/12/StreamDemo/.classpath b/BasicJava/LambdaDemo_str_length_App/LambdaDemo/.classpath
similarity index 100%
rename from Later/Streams/12/StreamDemo/.classpath
rename to BasicJava/LambdaDemo_str_length_App/LambdaDemo/.classpath
diff --git a/Later/Lambda/9.3/LambdaDemo/.project b/BasicJava/LambdaDemo_str_length_App/LambdaDemo/.project
similarity index 100%
rename from Later/Lambda/9.3/LambdaDemo/.project
rename to BasicJava/LambdaDemo_str_length_App/LambdaDemo/.project
diff --git a/Later/Streams/12/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LambdaDemo_str_length_App/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Streams/12/StreamDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LambdaDemo_str_length_App/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/LambdaDemo_str_length_App/LambdaDemo/bin/LambdaDemo.class b/BasicJava/LambdaDemo_str_length_App/LambdaDemo/bin/LambdaDemo.class
new file mode 100644
index 000000000..8f3b307be
Binary files /dev/null and b/BasicJava/LambdaDemo_str_length_App/LambdaDemo/bin/LambdaDemo.class differ
diff --git a/BasicJava/LambdaDemo_str_length_App/LambdaDemo/bin/StringLengthLambda.class b/BasicJava/LambdaDemo_str_length_App/LambdaDemo/bin/StringLengthLambda.class
new file mode 100644
index 000000000..ba967f9fe
Binary files /dev/null and b/BasicJava/LambdaDemo_str_length_App/LambdaDemo/bin/StringLengthLambda.class differ
diff --git a/BasicJava/LambdaDemo_str_length_App/LambdaDemo/src/LambdaDemo.java b/BasicJava/LambdaDemo_str_length_App/LambdaDemo/src/LambdaDemo.java
new file mode 100644
index 000000000..cd9fec199
--- /dev/null
+++ b/BasicJava/LambdaDemo_str_length_App/LambdaDemo/src/LambdaDemo.java
@@ -0,0 +1,17 @@
+@FunctionalInterface
+interface StringLengthLambda
+{
+ int getLength(String str);
+}
+
+public class LambdaDemo
+{
+
+ public static void main(String[] args)
+ {
+ StringLengthLambda stringLengthLambda = (String str) -> str.length();
+ int length = stringLengthLambda.getLength("Welcome");
+ System.out.println("length = " + length);
+ }
+
+}
diff --git a/BasicJava/LambdaDemo_str_length_App/Output.txt b/BasicJava/LambdaDemo_str_length_App/Output.txt
new file mode 100644
index 000000000..ba7867137
--- /dev/null
+++ b/BasicJava/LambdaDemo_str_length_App/Output.txt
@@ -0,0 +1 @@
+length = 7
diff --git a/Later/Streams/13/StreamDemo/.classpath b/BasicJava/LambdaDemo_thread_create_App/LambdaDemo/.classpath
similarity index 100%
rename from Later/Streams/13/StreamDemo/.classpath
rename to BasicJava/LambdaDemo_thread_create_App/LambdaDemo/.classpath
diff --git a/Later/Lambda/9.4/LambdaDemo/.project b/BasicJava/LambdaDemo_thread_create_App/LambdaDemo/.project
similarity index 100%
rename from Later/Lambda/9.4/LambdaDemo/.project
rename to BasicJava/LambdaDemo_thread_create_App/LambdaDemo/.project
diff --git a/Later/Streams/13/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LambdaDemo_thread_create_App/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Streams/13/StreamDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LambdaDemo_thread_create_App/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/LambdaDemo_thread_create_App/LambdaDemo/bin/LambdaDemo.class b/BasicJava/LambdaDemo_thread_create_App/LambdaDemo/bin/LambdaDemo.class
new file mode 100644
index 000000000..8df89dda1
Binary files /dev/null and b/BasicJava/LambdaDemo_thread_create_App/LambdaDemo/bin/LambdaDemo.class differ
diff --git a/BasicJava/LambdaDemo_thread_create_App/LambdaDemo/bin/NonLambdaDemo$1.class b/BasicJava/LambdaDemo_thread_create_App/LambdaDemo/bin/NonLambdaDemo$1.class
new file mode 100644
index 000000000..e9f7cb9cf
Binary files /dev/null and b/BasicJava/LambdaDemo_thread_create_App/LambdaDemo/bin/NonLambdaDemo$1.class differ
diff --git a/BasicJava/LambdaDemo_thread_create_App/LambdaDemo/bin/NonLambdaDemo.class b/BasicJava/LambdaDemo_thread_create_App/LambdaDemo/bin/NonLambdaDemo.class
new file mode 100644
index 000000000..9f3647b6e
Binary files /dev/null and b/BasicJava/LambdaDemo_thread_create_App/LambdaDemo/bin/NonLambdaDemo.class differ
diff --git a/BasicJava/LambdaDemo_thread_create_App/LambdaDemo/src/LambdaDemo.java b/BasicJava/LambdaDemo_thread_create_App/LambdaDemo/src/LambdaDemo.java
new file mode 100644
index 000000000..16ade2bb8
--- /dev/null
+++ b/BasicJava/LambdaDemo_thread_create_App/LambdaDemo/src/LambdaDemo.java
@@ -0,0 +1,25 @@
+/**
+ * With JDK 8
+ *
+ * Java Lambda Expression Example: Creating Thread
+ *
+ */
+public class LambdaDemo
+{
+
+ public static void main(String[] args)
+ {
+ /*
+ * Thread Example with lambda.
+ *
+ * we are implementing run method by using lambda expression.
+ */
+
+ Runnable runnable = () -> {
+ System.out.println("Thread is running...");
+ };
+ Thread thread = new Thread(runnable);
+ thread.start();
+ }
+
+}
diff --git a/BasicJava/LambdaDemo_thread_create_App/LambdaDemo/src/NonLambdaDemo.java b/BasicJava/LambdaDemo_thread_create_App/LambdaDemo/src/NonLambdaDemo.java
new file mode 100644
index 000000000..5a8695d7c
--- /dev/null
+++ b/BasicJava/LambdaDemo_thread_create_App/LambdaDemo/src/NonLambdaDemo.java
@@ -0,0 +1,23 @@
+/**
+ * Before JDK 8
+ *
+ */
+public class NonLambdaDemo
+{
+
+ public static void main(String[] args)
+ {
+ // Thread Example without lambda
+ Runnable runnable = new Runnable()
+ {
+ @Override
+ public void run()
+ {
+ System.out.println("Thread is running...");
+ }
+ };
+ Thread thread = new Thread(runnable);
+ thread.start();
+ }
+
+}
diff --git a/BasicJava/LambdaDemo_thread_create_App/LambdaDemo_Output.txt b/BasicJava/LambdaDemo_thread_create_App/LambdaDemo_Output.txt
new file mode 100644
index 000000000..1a8759810
--- /dev/null
+++ b/BasicJava/LambdaDemo_thread_create_App/LambdaDemo_Output.txt
@@ -0,0 +1 @@
+Thread is running...
diff --git a/BasicJava/LambdaDemo_thread_create_App/NonLambdaDemo_Output.txt b/BasicJava/LambdaDemo_thread_create_App/NonLambdaDemo_Output.txt
new file mode 100644
index 000000000..1a8759810
--- /dev/null
+++ b/BasicJava/LambdaDemo_thread_create_App/NonLambdaDemo_Output.txt
@@ -0,0 +1 @@
+Thread is running...
diff --git a/Later/Streams/14/StreamDemo/.classpath b/BasicJava/LambdaDemo_with_comparator_app/LambdaDemo/.classpath
similarity index 100%
rename from Later/Streams/14/StreamDemo/.classpath
rename to BasicJava/LambdaDemo_with_comparator_app/LambdaDemo/.classpath
diff --git a/Later/Lambda/9/LambdaDemo/.project b/BasicJava/LambdaDemo_with_comparator_app/LambdaDemo/.project
similarity index 100%
rename from Later/Lambda/9/LambdaDemo/.project
rename to BasicJava/LambdaDemo_with_comparator_app/LambdaDemo/.project
diff --git a/Later/Streams/14/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LambdaDemo_with_comparator_app/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Streams/14/StreamDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LambdaDemo_with_comparator_app/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/Later/Lambda/18/LambdaDemo/bin/Developer.class b/BasicJava/LambdaDemo_with_comparator_app/LambdaDemo/bin/Developer.class
similarity index 94%
rename from Later/Lambda/18/LambdaDemo/bin/Developer.class
rename to BasicJava/LambdaDemo_with_comparator_app/LambdaDemo/bin/Developer.class
index 0670e0766..fdeaab8b8 100644
Binary files a/Later/Lambda/18/LambdaDemo/bin/Developer.class and b/BasicJava/LambdaDemo_with_comparator_app/LambdaDemo/bin/Developer.class differ
diff --git a/BasicJava/LambdaDemo_with_comparator_app/LambdaDemo/bin/LambdaDemo.class b/BasicJava/LambdaDemo_with_comparator_app/LambdaDemo/bin/LambdaDemo.class
new file mode 100644
index 000000000..fb5552918
Binary files /dev/null and b/BasicJava/LambdaDemo_with_comparator_app/LambdaDemo/bin/LambdaDemo.class differ
diff --git a/Later/Lambda/18/LambdaDemo/bin/NonLambdaDemo$1.class b/BasicJava/LambdaDemo_with_comparator_app/LambdaDemo/bin/NonLambdaDemo$1.class
similarity index 100%
rename from Later/Lambda/18/LambdaDemo/bin/NonLambdaDemo$1.class
rename to BasicJava/LambdaDemo_with_comparator_app/LambdaDemo/bin/NonLambdaDemo$1.class
diff --git a/Later/Lambda/18/LambdaDemo/bin/NonLambdaDemo$2.class b/BasicJava/LambdaDemo_with_comparator_app/LambdaDemo/bin/NonLambdaDemo$2.class
similarity index 92%
rename from Later/Lambda/18/LambdaDemo/bin/NonLambdaDemo$2.class
rename to BasicJava/LambdaDemo_with_comparator_app/LambdaDemo/bin/NonLambdaDemo$2.class
index 99215e49f..902d16986 100644
Binary files a/Later/Lambda/18/LambdaDemo/bin/NonLambdaDemo$2.class and b/BasicJava/LambdaDemo_with_comparator_app/LambdaDemo/bin/NonLambdaDemo$2.class differ
diff --git a/BasicJava/LambdaDemo_with_comparator_app/LambdaDemo/bin/NonLambdaDemo.class b/BasicJava/LambdaDemo_with_comparator_app/LambdaDemo/bin/NonLambdaDemo.class
new file mode 100644
index 000000000..7b4735040
Binary files /dev/null and b/BasicJava/LambdaDemo_with_comparator_app/LambdaDemo/bin/NonLambdaDemo.class differ
diff --git a/Later/Lambda/18/LambdaDemo/src/Developer.java b/BasicJava/LambdaDemo_with_comparator_app/LambdaDemo/src/Developer.java
similarity index 87%
rename from Later/Lambda/18/LambdaDemo/src/Developer.java
rename to BasicJava/LambdaDemo_with_comparator_app/LambdaDemo/src/Developer.java
index 416e39bb7..a32ea868d 100644
--- a/Later/Lambda/18/LambdaDemo/src/Developer.java
+++ b/BasicJava/LambdaDemo_with_comparator_app/LambdaDemo/src/Developer.java
@@ -33,7 +33,7 @@ public void setAge(int age)
@Override
public String toString()
{
- return "Person [name=" + name + ", age=" + age + "]";
+ return "Developer [name=" + name + ", age=" + age + "]";
}
}
diff --git a/BasicJava/LambdaDemo_with_comparator_app/LambdaDemo/src/LambdaDemo.java b/BasicJava/LambdaDemo_with_comparator_app/LambdaDemo/src/LambdaDemo.java
new file mode 100644
index 000000000..65cc755a4
--- /dev/null
+++ b/BasicJava/LambdaDemo_with_comparator_app/LambdaDemo/src/LambdaDemo.java
@@ -0,0 +1,49 @@
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Sort with Lambda,With JDK 8
+ */
+public class LambdaDemo
+{
+ public static void main(String[] args)
+ {
+
+ List developerList = getDevelopers();
+
+ System.out.println("-----------Before Sort-----------");
+ for (Developer developer : developerList)
+ {
+ System.out.println(developer);
+ }
+
+ System.out.println("\n-----------After Sort by Age------------");
+ // lambda here...
+ developerList.sort((Developer o1, Developer o2) -> o1.getAge() - o2.getAge());
+
+ // java 8 only, lambda also, to print the List
+ developerList.forEach((developer) -> System.out.println(developer));
+
+ System.out.println("\n-----------After Sort by Name------------");
+ // lambda
+ developerList.sort((Developer o1, Developer o2) -> o1.getName().compareTo(o2.getName()));
+
+ // java 8 only, lambda also, to print the List
+ developerList.forEach((developer) -> System.out.println(developer));
+
+ }
+
+ private static List getDevelopers()
+ {
+
+ List developerList = new ArrayList();
+
+ developerList.add(new Developer("Peter", 33));
+ developerList.add(new Developer("John", 22));
+ developerList.add(new Developer("Ram", 15));
+ developerList.add(new Developer("Steve", 55));
+
+ return developerList;
+
+ }
+}
diff --git a/BasicJava/LambdaDemo_with_comparator_app/LambdaDemo/src/NonLambdaDemo.java b/BasicJava/LambdaDemo_with_comparator_app/LambdaDemo/src/NonLambdaDemo.java
new file mode 100644
index 000000000..4ed3e593d
--- /dev/null
+++ b/BasicJava/LambdaDemo_with_comparator_app/LambdaDemo/src/NonLambdaDemo.java
@@ -0,0 +1,68 @@
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+/**
+ * Sort without Lambda,Before JDK 8
+ */
+public class NonLambdaDemo
+{
+ public static void main(String[] args)
+ {
+
+ List developerList = getDevelopers();
+
+ System.out.println("-----------Before Sort-----------");
+ printDeveloperInfo(developerList);
+
+ // sort by age
+ Collections.sort(developerList, new Comparator()
+ {
+ @Override
+ public int compare(Developer o1, Developer o2)
+ {
+ return o1.getAge() - o2.getAge();
+ }
+ });
+
+ System.out.println("\n-----------After Sort by Age------------");
+ printDeveloperInfo(developerList);
+
+ // sort by name
+ Collections.sort(developerList, new Comparator()
+ {
+ @Override
+ public int compare(Developer o1, Developer o2)
+ {
+ return o1.getName().compareTo(o2.getName());
+ }
+ });
+
+ System.out.println("\n-----------After Sort by Name------------");
+ printDeveloperInfo(developerList);
+
+ }
+
+ private static void printDeveloperInfo(List developerList)
+ {
+ for (Developer developer : developerList)
+ {
+ System.out.println(developer);
+ }
+ }
+
+ private static List getDevelopers()
+ {
+
+ List developerList = new ArrayList();
+
+ developerList.add(new Developer("Peter", 33));
+ developerList.add(new Developer("John", 22));
+ developerList.add(new Developer("Ram", 15));
+ developerList.add(new Developer("Steve", 55));
+
+ return developerList;
+
+ }
+}
diff --git a/BasicJava/LambdaDemo_with_comparator_app/LambdaDemo_Output.txt b/BasicJava/LambdaDemo_with_comparator_app/LambdaDemo_Output.txt
new file mode 100644
index 000000000..6c1f588fd
--- /dev/null
+++ b/BasicJava/LambdaDemo_with_comparator_app/LambdaDemo_Output.txt
@@ -0,0 +1,17 @@
+-----------Before Sort-----------
+Developer [name=Peter, age=33]
+Developer [name=John, age=22]
+Developer [name=Ram, age=15]
+Developer [name=Steve, age=55]
+
+-----------After Sort by Age------------
+Developer [name=Ram, age=15]
+Developer [name=John, age=22]
+Developer [name=Peter, age=33]
+Developer [name=Steve, age=55]
+
+-----------After Sort by Name------------
+Developer [name=John, age=22]
+Developer [name=Peter, age=33]
+Developer [name=Ram, age=15]
+Developer [name=Steve, age=55]
diff --git a/BasicJava/LambdaDemo_with_comparator_app/NonLambdaDemo_Output.txt b/BasicJava/LambdaDemo_with_comparator_app/NonLambdaDemo_Output.txt
new file mode 100644
index 000000000..6c1f588fd
--- /dev/null
+++ b/BasicJava/LambdaDemo_with_comparator_app/NonLambdaDemo_Output.txt
@@ -0,0 +1,17 @@
+-----------Before Sort-----------
+Developer [name=Peter, age=33]
+Developer [name=John, age=22]
+Developer [name=Ram, age=15]
+Developer [name=Steve, age=55]
+
+-----------After Sort by Age------------
+Developer [name=Ram, age=15]
+Developer [name=John, age=22]
+Developer [name=Peter, age=33]
+Developer [name=Steve, age=55]
+
+-----------After Sort by Name------------
+Developer [name=John, age=22]
+Developer [name=Peter, age=33]
+Developer [name=Ram, age=15]
+Developer [name=Steve, age=55]
diff --git a/Later/Streams/16/StreamDemo/.classpath b/BasicJava/LambdaDemo_with_return_App/LambdaDemo/.classpath
similarity index 100%
rename from Later/Streams/16/StreamDemo/.classpath
rename to BasicJava/LambdaDemo_with_return_App/LambdaDemo/.classpath
diff --git a/Later/Streams/1/StreamDemo/.project b/BasicJava/LambdaDemo_with_return_App/LambdaDemo/.project
similarity index 100%
rename from Later/Streams/1/StreamDemo/.project
rename to BasicJava/LambdaDemo_with_return_App/LambdaDemo/.project
diff --git a/Later/Streams/16/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LambdaDemo_with_return_App/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Streams/16/StreamDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LambdaDemo_with_return_App/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/Later/Lambda/5/LambdaDemo/bin/Add.class b/BasicJava/LambdaDemo_with_return_App/LambdaDemo/bin/Add.class
similarity index 100%
rename from Later/Lambda/5/LambdaDemo/bin/Add.class
rename to BasicJava/LambdaDemo_with_return_App/LambdaDemo/bin/Add.class
diff --git a/BasicJava/LambdaDemo_with_return_App/LambdaDemo/bin/LambdaDemo.class b/BasicJava/LambdaDemo_with_return_App/LambdaDemo/bin/LambdaDemo.class
new file mode 100644
index 000000000..8e97a7e24
Binary files /dev/null and b/BasicJava/LambdaDemo_with_return_App/LambdaDemo/bin/LambdaDemo.class differ
diff --git a/BasicJava/LambdaDemo_with_return_App/LambdaDemo/src/LambdaDemo.java b/BasicJava/LambdaDemo_with_return_App/LambdaDemo/src/LambdaDemo.java
new file mode 100644
index 000000000..bb23b3890
--- /dev/null
+++ b/BasicJava/LambdaDemo_with_return_App/LambdaDemo/src/LambdaDemo.java
@@ -0,0 +1,31 @@
+@FunctionalInterface
+interface Add
+{
+ int addition(int a, int b);
+}
+
+/**
+ *
+ * You must use return keyword when lambda expression contains
+ * multiple statements.
+ *
+ * Java Lambda Expression Example: With return keyword
+ *
+ */
+public class LambdaDemo
+{
+
+ public static void main(String[] args)
+ {
+ // Lambda expression with return keyword.
+ Add add = (int a, int b) ->
+ {
+ int sum = a + b;
+ return sum;
+ };
+
+ int sum = add.addition(13, 53);
+ System.out.println("sum = " + sum);
+ }
+
+}
diff --git a/BasicJava/LambdaDemo_with_return_App/Output.txt b/BasicJava/LambdaDemo_with_return_App/Output.txt
new file mode 100644
index 000000000..020e40d0c
--- /dev/null
+++ b/BasicJava/LambdaDemo_with_return_App/Output.txt
@@ -0,0 +1 @@
+sum = 66
diff --git a/Later/Streams/17/StreamDemo/.classpath b/BasicJava/LambdaDemo_without_return_App/LambdaDemo/.classpath
similarity index 100%
rename from Later/Streams/17/StreamDemo/.classpath
rename to BasicJava/LambdaDemo_without_return_App/LambdaDemo/.classpath
diff --git a/Later/Streams/2/StreamDemo/.project b/BasicJava/LambdaDemo_without_return_App/LambdaDemo/.project
similarity index 100%
rename from Later/Streams/2/StreamDemo/.project
rename to BasicJava/LambdaDemo_without_return_App/LambdaDemo/.project
diff --git a/Later/Streams/17/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LambdaDemo_without_return_App/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Streams/17/StreamDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LambdaDemo_without_return_App/LambdaDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/Later/Lambda/6/LambdaDemo/bin/Add.class b/BasicJava/LambdaDemo_without_return_App/LambdaDemo/bin/Add.class
similarity index 100%
rename from Later/Lambda/6/LambdaDemo/bin/Add.class
rename to BasicJava/LambdaDemo_without_return_App/LambdaDemo/bin/Add.class
diff --git a/Later/Lambda/5/LambdaDemo/bin/LambdaDemo.class b/BasicJava/LambdaDemo_without_return_App/LambdaDemo/bin/LambdaDemo.class
similarity index 100%
rename from Later/Lambda/5/LambdaDemo/bin/LambdaDemo.class
rename to BasicJava/LambdaDemo_without_return_App/LambdaDemo/bin/LambdaDemo.class
diff --git a/Later/Lambda/5/LambdaDemo/src/LambdaDemo.java b/BasicJava/LambdaDemo_without_return_App/LambdaDemo/src/LambdaDemo.java
similarity index 100%
rename from Later/Lambda/5/LambdaDemo/src/LambdaDemo.java
rename to BasicJava/LambdaDemo_without_return_App/LambdaDemo/src/LambdaDemo.java
diff --git a/BasicJava/LambdaDemo_without_return_App/Output.txt b/BasicJava/LambdaDemo_without_return_App/Output.txt
new file mode 100644
index 000000000..a63ff4875
--- /dev/null
+++ b/BasicJava/LambdaDemo_without_return_App/Output.txt
@@ -0,0 +1 @@
+sum = 30
diff --git a/Later/Streams/18/StreamDemo/.classpath b/BasicJava/LocalDateDemo_Intro/LocalDateDemo/.classpath
similarity index 100%
rename from Later/Streams/18/StreamDemo/.classpath
rename to BasicJava/LocalDateDemo_Intro/LocalDateDemo/.classpath
diff --git a/BasicJava/LocalDateDemo_Intro/LocalDateDemo/.project b/BasicJava/LocalDateDemo_Intro/LocalDateDemo/.project
new file mode 100644
index 000000000..b83b03f89
--- /dev/null
+++ b/BasicJava/LocalDateDemo_Intro/LocalDateDemo/.project
@@ -0,0 +1,17 @@
+
+
+ LocalDateDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/Later/Streams/18/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LocalDateDemo_Intro/LocalDateDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Streams/18/StreamDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LocalDateDemo_Intro/LocalDateDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/LocalDateDemo_Intro/LocalDateDemo/bin/LocalDateDemo1.class b/BasicJava/LocalDateDemo_Intro/LocalDateDemo/bin/LocalDateDemo1.class
new file mode 100644
index 000000000..9c662c8cf
Binary files /dev/null and b/BasicJava/LocalDateDemo_Intro/LocalDateDemo/bin/LocalDateDemo1.class differ
diff --git a/BasicJava/LocalDateDemo_Intro/LocalDateDemo/bin/LocalDateDemo2.class b/BasicJava/LocalDateDemo_Intro/LocalDateDemo/bin/LocalDateDemo2.class
new file mode 100644
index 000000000..9229b61b7
Binary files /dev/null and b/BasicJava/LocalDateDemo_Intro/LocalDateDemo/bin/LocalDateDemo2.class differ
diff --git a/BasicJava/LocalDateDemo_Intro/LocalDateDemo/bin/LocalDateDemo3.class b/BasicJava/LocalDateDemo_Intro/LocalDateDemo/bin/LocalDateDemo3.class
new file mode 100644
index 000000000..6c293b9b3
Binary files /dev/null and b/BasicJava/LocalDateDemo_Intro/LocalDateDemo/bin/LocalDateDemo3.class differ
diff --git a/BasicJava/LocalDateDemo_Intro/LocalDateDemo/src/LocalDateDemo1.java b/BasicJava/LocalDateDemo_Intro/LocalDateDemo/src/LocalDateDemo1.java
new file mode 100644
index 000000000..a6c49974b
--- /dev/null
+++ b/BasicJava/LocalDateDemo_Intro/LocalDateDemo/src/LocalDateDemo1.java
@@ -0,0 +1,21 @@
+import java.time.LocalDate;
+
+public class LocalDateDemo1
+{
+
+ public static void main(String[] args)
+ {
+ /*
+ * Returns:the current date using the system clock and default
+ * time-zone, not null
+ */
+ LocalDate localDate = LocalDate.now();
+ System.out.println(localDate);
+ System.out.println("Year = " + localDate.getYear());
+ System.out.println("Month = " + localDate.getMonthValue());
+ System.out.println("DayOfMonth = " + localDate.getDayOfMonth());
+ System.out.println("DayOfWeek = " + localDate.getDayOfWeek());
+
+ }
+
+}
diff --git a/BasicJava/LocalDateDemo_Intro/LocalDateDemo/src/LocalDateDemo2.java b/BasicJava/LocalDateDemo_Intro/LocalDateDemo/src/LocalDateDemo2.java
new file mode 100644
index 000000000..883d2b33b
--- /dev/null
+++ b/BasicJava/LocalDateDemo_Intro/LocalDateDemo/src/LocalDateDemo2.java
@@ -0,0 +1,25 @@
+import java.time.LocalDate;
+
+public class LocalDateDemo2
+{
+
+ public static void main(String[] args)
+ {
+ /*
+ * Parameters:
+ *
+ * year - the year to represent, from MIN_YEAR to MAX_YEAR
+ *
+ * month - the month-of-year to represent, from 1 (January) to
+ * 12 (December)
+ *
+ * dayOfMonth - the day-of-month to represent, from 1 to 31
+ *
+ * Returns:the local date, not null
+ */
+ LocalDate localDate = LocalDate.of(2027, 7, 25);
+ System.out.println(localDate);
+
+ }
+
+}
diff --git a/BasicJava/LocalDateDemo_Intro/LocalDateDemo/src/LocalDateDemo3.java b/BasicJava/LocalDateDemo_Intro/LocalDateDemo/src/LocalDateDemo3.java
new file mode 100644
index 000000000..8e8b19d95
--- /dev/null
+++ b/BasicJava/LocalDateDemo_Intro/LocalDateDemo/src/LocalDateDemo3.java
@@ -0,0 +1,23 @@
+import java.time.LocalDate;
+
+public class LocalDateDemo3
+{
+
+ public static void main(String[] args)
+ {
+ /*
+ * Parameters:
+ *
+ * text - the text to parse such as "2007-12-03", not null
+ *
+ * Returns:
+ *
+ * the parsed local date, not null
+ *
+ */
+ LocalDate localDate = LocalDate.parse("2007-12-03");
+ System.out.println(localDate);
+
+ }
+
+}
diff --git a/BasicJava/LocalDateDemo_Intro/LocalDateDemo1_Output.txt b/BasicJava/LocalDateDemo_Intro/LocalDateDemo1_Output.txt
new file mode 100644
index 000000000..801a4e4bb
--- /dev/null
+++ b/BasicJava/LocalDateDemo_Intro/LocalDateDemo1_Output.txt
@@ -0,0 +1,5 @@
+2018-01-03
+Year = 2018
+Month = 1
+DayOfMonth = 3
+DayOfWeek = WEDNESDAY
diff --git a/BasicJava/LocalDateDemo_Intro/LocalDateDemo2_Output.txt b/BasicJava/LocalDateDemo_Intro/LocalDateDemo2_Output.txt
new file mode 100644
index 000000000..1b4c162ac
--- /dev/null
+++ b/BasicJava/LocalDateDemo_Intro/LocalDateDemo2_Output.txt
@@ -0,0 +1 @@
+2027-07-25
diff --git a/BasicJava/LocalDateDemo_Intro/LocalDateDemo3_Output.txt b/BasicJava/LocalDateDemo_Intro/LocalDateDemo3_Output.txt
new file mode 100644
index 000000000..b70104032
--- /dev/null
+++ b/BasicJava/LocalDateDemo_Intro/LocalDateDemo3_Output.txt
@@ -0,0 +1 @@
+2007-12-03
diff --git a/Later/Streams/19/StreamDemo/.classpath b/BasicJava/LocalDateDemo_format/LocalDateDemo/.classpath
similarity index 100%
rename from Later/Streams/19/StreamDemo/.classpath
rename to BasicJava/LocalDateDemo_format/LocalDateDemo/.classpath
diff --git a/BasicJava/LocalDateDemo_format/LocalDateDemo/.project b/BasicJava/LocalDateDemo_format/LocalDateDemo/.project
new file mode 100644
index 000000000..b83b03f89
--- /dev/null
+++ b/BasicJava/LocalDateDemo_format/LocalDateDemo/.project
@@ -0,0 +1,17 @@
+
+
+ LocalDateDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/Later/Streams/19/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LocalDateDemo_format/LocalDateDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Streams/19/StreamDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LocalDateDemo_format/LocalDateDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/LocalDateDemo_format/LocalDateDemo/bin/LocalDateDemo.class b/BasicJava/LocalDateDemo_format/LocalDateDemo/bin/LocalDateDemo.class
new file mode 100644
index 000000000..9a13bea29
Binary files /dev/null and b/BasicJava/LocalDateDemo_format/LocalDateDemo/bin/LocalDateDemo.class differ
diff --git a/BasicJava/LocalDateDemo_format/LocalDateDemo/src/LocalDateDemo.java b/BasicJava/LocalDateDemo_format/LocalDateDemo/src/LocalDateDemo.java
new file mode 100644
index 000000000..c0e61b708
--- /dev/null
+++ b/BasicJava/LocalDateDemo_format/LocalDateDemo/src/LocalDateDemo.java
@@ -0,0 +1,38 @@
+import java.time.LocalDate;
+import java.time.format.DateTimeFormatter;
+
+public class LocalDateDemo
+{
+
+ public static void main(String[] args)
+ {
+ LocalDate localDate = LocalDate.parse("2020-12-23");
+ System.out.println(localDate);
+
+ /*
+ * Parameters:
+ *
+ * pattern - the pattern to use, not null
+ *
+ * Returns:
+ *
+ * the formatter based on the pattern, not null
+ */
+ DateTimeFormatter dateTimeFormatter = DateTimeFormatter
+ .ofPattern("dd/MM/YYYY");
+
+ /*
+ * Parameters:
+ *
+ * formatter - the formatter to use, not null
+ *
+ * Returns:
+ *
+ * the formatted date string, not null
+ */
+
+ String formatedDate = localDate.format(dateTimeFormatter);
+ System.out.println(formatedDate);
+ }
+
+}
diff --git a/BasicJava/LocalDateDemo_format/Output.txt b/BasicJava/LocalDateDemo_format/Output.txt
new file mode 100644
index 000000000..2718ba236
--- /dev/null
+++ b/BasicJava/LocalDateDemo_format/Output.txt
@@ -0,0 +1,2 @@
+2020-12-23
+23/12/2020
diff --git a/Later/Streams/2/StreamDemo/.classpath b/BasicJava/LocalDateDemo_get/LocalDateDemo/.classpath
similarity index 100%
rename from Later/Streams/2/StreamDemo/.classpath
rename to BasicJava/LocalDateDemo_get/LocalDateDemo/.classpath
diff --git a/BasicJava/LocalDateDemo_get/LocalDateDemo/.project b/BasicJava/LocalDateDemo_get/LocalDateDemo/.project
new file mode 100644
index 000000000..b83b03f89
--- /dev/null
+++ b/BasicJava/LocalDateDemo_get/LocalDateDemo/.project
@@ -0,0 +1,17 @@
+
+
+ LocalDateDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/Later/Streams/2/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LocalDateDemo_get/LocalDateDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Streams/2/StreamDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LocalDateDemo_get/LocalDateDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/LocalDateDemo_get/LocalDateDemo/bin/LocalDateDemo.class b/BasicJava/LocalDateDemo_get/LocalDateDemo/bin/LocalDateDemo.class
new file mode 100644
index 000000000..056ad8354
Binary files /dev/null and b/BasicJava/LocalDateDemo_get/LocalDateDemo/bin/LocalDateDemo.class differ
diff --git a/BasicJava/LocalDateDemo_get/LocalDateDemo/src/LocalDateDemo.java b/BasicJava/LocalDateDemo_get/LocalDateDemo/src/LocalDateDemo.java
new file mode 100644
index 000000000..44bd156a4
--- /dev/null
+++ b/BasicJava/LocalDateDemo_get/LocalDateDemo/src/LocalDateDemo.java
@@ -0,0 +1,34 @@
+import java.time.LocalDate;
+import java.time.temporal.ChronoField;
+
+public class LocalDateDemo
+{
+
+ public static void main(String[] args)
+ {
+ LocalDate date = LocalDate.parse("2017-11-23");
+ System.out.println(date);
+
+ /*
+ * Parameters:
+ *
+ * field - the field to get, not null
+ *
+ * Returns:
+ *
+ * the value for the field
+ */
+
+ int year = date.get(ChronoField.YEAR);
+ System.out.println("year = "+year);
+
+ int month = date.get(ChronoField.MONTH_OF_YEAR);
+ System.out.println("month of year = "+month);
+
+ int dayOfTheMonth = date.get(ChronoField.DAY_OF_MONTH);
+ System.out.println("dayOfTheMonth = "+dayOfTheMonth);
+
+
+ }
+
+}
diff --git a/BasicJava/LocalDateDemo_get/Output.txt b/BasicJava/LocalDateDemo_get/Output.txt
new file mode 100644
index 000000000..8e14de713
--- /dev/null
+++ b/BasicJava/LocalDateDemo_get/Output.txt
@@ -0,0 +1,4 @@
+2017-11-23
+year = 2017
+month of year = 11
+dayOfTheMonth = 23
diff --git a/Later/Streams/20/StreamDemo/.classpath b/BasicJava/LocalDateDemo_getEra/LocalDateDemo/.classpath
similarity index 100%
rename from Later/Streams/20/StreamDemo/.classpath
rename to BasicJava/LocalDateDemo_getEra/LocalDateDemo/.classpath
diff --git a/BasicJava/LocalDateDemo_getEra/LocalDateDemo/.project b/BasicJava/LocalDateDemo_getEra/LocalDateDemo/.project
new file mode 100644
index 000000000..b83b03f89
--- /dev/null
+++ b/BasicJava/LocalDateDemo_getEra/LocalDateDemo/.project
@@ -0,0 +1,17 @@
+
+
+ LocalDateDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/Later/Streams/20/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LocalDateDemo_getEra/LocalDateDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Streams/20/StreamDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LocalDateDemo_getEra/LocalDateDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/LocalDateDemo_getEra/LocalDateDemo/bin/LocalDateDemo.class b/BasicJava/LocalDateDemo_getEra/LocalDateDemo/bin/LocalDateDemo.class
new file mode 100644
index 000000000..0c616f2fb
Binary files /dev/null and b/BasicJava/LocalDateDemo_getEra/LocalDateDemo/bin/LocalDateDemo.class differ
diff --git a/BasicJava/LocalDateDemo_getEra/LocalDateDemo/src/LocalDateDemo.java b/BasicJava/LocalDateDemo_getEra/LocalDateDemo/src/LocalDateDemo.java
new file mode 100644
index 000000000..03ea3097c
--- /dev/null
+++ b/BasicJava/LocalDateDemo_getEra/LocalDateDemo/src/LocalDateDemo.java
@@ -0,0 +1,19 @@
+import java.time.LocalDate;
+import java.time.chrono.Era;
+
+public class LocalDateDemo
+{
+
+ public static void main(String[] args)
+ {
+ LocalDate date = LocalDate.parse("2017-11-23");
+
+ /*
+ * Returns:the IsoChronology era constant applicable at this
+ * date, not null
+ */
+ Era era = date.getEra();
+ System.out.println(era);
+ }
+
+}
diff --git a/BasicJava/LocalDateDemo_getEra/Output.txt b/BasicJava/LocalDateDemo_getEra/Output.txt
new file mode 100644
index 000000000..ba1341353
--- /dev/null
+++ b/BasicJava/LocalDateDemo_getEra/Output.txt
@@ -0,0 +1 @@
+CE
diff --git a/Later/Streams/21/StreamDemo/.classpath b/BasicJava/LocalDateDemo_isAfter_before_equal/LocalDateDemo/.classpath
similarity index 100%
rename from Later/Streams/21/StreamDemo/.classpath
rename to BasicJava/LocalDateDemo_isAfter_before_equal/LocalDateDemo/.classpath
diff --git a/BasicJava/LocalDateDemo_isAfter_before_equal/LocalDateDemo/.project b/BasicJava/LocalDateDemo_isAfter_before_equal/LocalDateDemo/.project
new file mode 100644
index 000000000..b83b03f89
--- /dev/null
+++ b/BasicJava/LocalDateDemo_isAfter_before_equal/LocalDateDemo/.project
@@ -0,0 +1,17 @@
+
+
+ LocalDateDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/Later/Streams/21/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LocalDateDemo_isAfter_before_equal/LocalDateDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Streams/21/StreamDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LocalDateDemo_isAfter_before_equal/LocalDateDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/LocalDateDemo_isAfter_before_equal/LocalDateDemo/bin/LocalDateDemo.class b/BasicJava/LocalDateDemo_isAfter_before_equal/LocalDateDemo/bin/LocalDateDemo.class
new file mode 100644
index 000000000..07d0eebaa
Binary files /dev/null and b/BasicJava/LocalDateDemo_isAfter_before_equal/LocalDateDemo/bin/LocalDateDemo.class differ
diff --git a/BasicJava/LocalDateDemo_isAfter_before_equal/LocalDateDemo/src/LocalDateDemo.java b/BasicJava/LocalDateDemo_isAfter_before_equal/LocalDateDemo/src/LocalDateDemo.java
new file mode 100644
index 000000000..92676513b
--- /dev/null
+++ b/BasicJava/LocalDateDemo_isAfter_before_equal/LocalDateDemo/src/LocalDateDemo.java
@@ -0,0 +1,31 @@
+import java.time.LocalDate;
+
+public class LocalDateDemo
+{
+
+ public static void main(String[] args)
+ {
+ LocalDate date1 = LocalDate.parse("2018-07-03");
+ System.out.println("date1= "+date1);
+
+ LocalDate date2 = LocalDate.parse("2017-03-03");
+ System.out.println("date2= "+date2);
+
+ /*
+ * Returns:true if this date is after the specified date
+ */
+ System.out.println(date1.isAfter(date2));
+
+ /*
+ * Returns:true if this date is before the specified date
+ */
+ System.out.println(date1.isBefore(date2));
+
+ /*
+ * Returns:true if this date is equal to the specified date
+ */
+ System.out.println(date1.isEqual(date2));
+
+ }
+
+}
diff --git a/BasicJava/LocalDateDemo_isAfter_before_equal/Output.txt b/BasicJava/LocalDateDemo_isAfter_before_equal/Output.txt
new file mode 100644
index 000000000..def6e06ff
--- /dev/null
+++ b/BasicJava/LocalDateDemo_isAfter_before_equal/Output.txt
@@ -0,0 +1,5 @@
+date1= 2018-07-03
+date2= 2017-03-03
+true
+false
+false
diff --git a/Later/Streams/22/StreamDemo/.classpath b/BasicJava/LocalDateDemo_isLeapYear/LocalDateDemo/.classpath
similarity index 100%
rename from Later/Streams/22/StreamDemo/.classpath
rename to BasicJava/LocalDateDemo_isLeapYear/LocalDateDemo/.classpath
diff --git a/BasicJava/LocalDateDemo_isLeapYear/LocalDateDemo/.project b/BasicJava/LocalDateDemo_isLeapYear/LocalDateDemo/.project
new file mode 100644
index 000000000..b83b03f89
--- /dev/null
+++ b/BasicJava/LocalDateDemo_isLeapYear/LocalDateDemo/.project
@@ -0,0 +1,17 @@
+
+
+ LocalDateDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/Later/Streams/22/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LocalDateDemo_isLeapYear/LocalDateDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Streams/22/StreamDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LocalDateDemo_isLeapYear/LocalDateDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/LocalDateDemo_isLeapYear/LocalDateDemo/bin/LocalDateDemo.class b/BasicJava/LocalDateDemo_isLeapYear/LocalDateDemo/bin/LocalDateDemo.class
new file mode 100644
index 000000000..b5bbeccc3
Binary files /dev/null and b/BasicJava/LocalDateDemo_isLeapYear/LocalDateDemo/bin/LocalDateDemo.class differ
diff --git a/BasicJava/LocalDateDemo_isLeapYear/LocalDateDemo/src/LocalDateDemo.java b/BasicJava/LocalDateDemo_isLeapYear/LocalDateDemo/src/LocalDateDemo.java
new file mode 100644
index 000000000..a8ddbbecb
--- /dev/null
+++ b/BasicJava/LocalDateDemo_isLeapYear/LocalDateDemo/src/LocalDateDemo.java
@@ -0,0 +1,19 @@
+import java.time.LocalDate;
+
+public class LocalDateDemo
+{
+
+ public static void main(String[] args)
+ {
+ LocalDate date1 = LocalDate.of(2017, 9, 25);
+
+ /*
+ * Returns:true if the year is leap, false otherwise
+ */
+ System.out.println(date1.isLeapYear());
+
+ LocalDate date2 = LocalDate.of(2020, 9, 25);
+ System.out.println(date2.isLeapYear());
+ }
+
+}
diff --git a/BasicJava/LocalDateDemo_isLeapYear/Output.txt b/BasicJava/LocalDateDemo_isLeapYear/Output.txt
new file mode 100644
index 000000000..1d474d525
--- /dev/null
+++ b/BasicJava/LocalDateDemo_isLeapYear/Output.txt
@@ -0,0 +1,2 @@
+false
+true
diff --git a/Later/Streams/24/StreamDemo/.classpath b/BasicJava/LocalDateDemo_minus_plus_month_year/LocalDateDemo/.classpath
similarity index 100%
rename from Later/Streams/24/StreamDemo/.classpath
rename to BasicJava/LocalDateDemo_minus_plus_month_year/LocalDateDemo/.classpath
diff --git a/BasicJava/LocalDateDemo_minus_plus_month_year/LocalDateDemo/.project b/BasicJava/LocalDateDemo_minus_plus_month_year/LocalDateDemo/.project
new file mode 100644
index 000000000..b83b03f89
--- /dev/null
+++ b/BasicJava/LocalDateDemo_minus_plus_month_year/LocalDateDemo/.project
@@ -0,0 +1,17 @@
+
+
+ LocalDateDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/Later/Streams/24/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LocalDateDemo_minus_plus_month_year/LocalDateDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Streams/24/StreamDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LocalDateDemo_minus_plus_month_year/LocalDateDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/LocalDateDemo_minus_plus_month_year/LocalDateDemo/bin/LocalDateDemo1.class b/BasicJava/LocalDateDemo_minus_plus_month_year/LocalDateDemo/bin/LocalDateDemo1.class
new file mode 100644
index 000000000..d5c7f08b2
Binary files /dev/null and b/BasicJava/LocalDateDemo_minus_plus_month_year/LocalDateDemo/bin/LocalDateDemo1.class differ
diff --git a/BasicJava/LocalDateDemo_minus_plus_month_year/LocalDateDemo/bin/LocalDateDemo2.class b/BasicJava/LocalDateDemo_minus_plus_month_year/LocalDateDemo/bin/LocalDateDemo2.class
new file mode 100644
index 000000000..fab3aeb13
Binary files /dev/null and b/BasicJava/LocalDateDemo_minus_plus_month_year/LocalDateDemo/bin/LocalDateDemo2.class differ
diff --git a/BasicJava/LocalDateDemo_minus_plus_month_year/LocalDateDemo/src/LocalDateDemo1.java b/BasicJava/LocalDateDemo_minus_plus_month_year/LocalDateDemo/src/LocalDateDemo1.java
new file mode 100644
index 000000000..a39fbe785
--- /dev/null
+++ b/BasicJava/LocalDateDemo_minus_plus_month_year/LocalDateDemo/src/LocalDateDemo1.java
@@ -0,0 +1,34 @@
+import java.time.LocalDate;
+
+public class LocalDateDemo1
+{
+
+ public static void main(String[] args)
+ {
+ LocalDate date = LocalDate.now();
+ System.out.println("date = " + date);
+
+ /*
+ * Parameters:
+ *
+ * monthsToSubtract - the months to subtract, may be negative
+ *
+ * Returns:a LocalDate based on this date with the months
+ * subtracted, not null
+ */
+ LocalDate dateAfterMonthChanged = date.minusMonths(2);
+ System.out.println("dateAfterMonthChanged = " + dateAfterMonthChanged);
+
+ /*
+ * Parameters:
+ *
+ * yearsToSubtract - the years to subtract, may be negative
+ *
+ * Returns:a LocalDate based on this date with the years
+ * subtracted, not null
+ */
+ LocalDate dateAfterYearChanged = date.minusYears(3);
+ System.out.println("dateAfterYearChanged = " + dateAfterYearChanged);
+ }
+
+}
diff --git a/BasicJava/LocalDateDemo_minus_plus_month_year/LocalDateDemo/src/LocalDateDemo2.java b/BasicJava/LocalDateDemo_minus_plus_month_year/LocalDateDemo/src/LocalDateDemo2.java
new file mode 100644
index 000000000..355bf36ff
--- /dev/null
+++ b/BasicJava/LocalDateDemo_minus_plus_month_year/LocalDateDemo/src/LocalDateDemo2.java
@@ -0,0 +1,35 @@
+import java.time.LocalDate;
+
+public class LocalDateDemo2
+{
+
+ public static void main(String[] args)
+ {
+ LocalDate date = LocalDate.now();
+ System.out.println("date = " + date);
+
+ /*
+ * Parameters:
+ *
+ * monthsToAdd - the months to add, may be negative
+ *
+ * Returns:a LocalDate based on this date with the months
+ * added, not null
+ */
+ LocalDate dateAfterMonthChanged = date.plusMonths(2);
+ System.out.println("dateAfterMonthChanged = " + dateAfterMonthChanged);
+
+ /*
+ * Parameters:
+ *
+ * yearsToAdd - the years to add, may be negative
+ *
+ * Returns:a LocalDate based on this date with the years
+ * added, not null
+ */
+
+ LocalDate dateAfterYearChanged = date.plusYears(5);
+ System.out.println("dateAfterYearChanged = " + dateAfterYearChanged);
+ }
+
+}
diff --git a/BasicJava/LocalDateDemo_minus_plus_month_year/LocalDateDemo1_Output.txt b/BasicJava/LocalDateDemo_minus_plus_month_year/LocalDateDemo1_Output.txt
new file mode 100644
index 000000000..6984b4406
--- /dev/null
+++ b/BasicJava/LocalDateDemo_minus_plus_month_year/LocalDateDemo1_Output.txt
@@ -0,0 +1,3 @@
+date = 2018-01-04
+dateAfterMonthChanged = 2017-11-04
+dateAfterYearChanged = 2015-01-04
diff --git a/BasicJava/LocalDateDemo_minus_plus_month_year/LocalDateDemo2_Output.txt b/BasicJava/LocalDateDemo_minus_plus_month_year/LocalDateDemo2_Output.txt
new file mode 100644
index 000000000..3aa2296ab
--- /dev/null
+++ b/BasicJava/LocalDateDemo_minus_plus_month_year/LocalDateDemo2_Output.txt
@@ -0,0 +1,3 @@
+date = 2018-01-04
+dateAfterMonthChanged = 2018-03-04
+dateAfterYearChanged = 2023-01-04
diff --git a/Later/Streams/25/StreamDemo/.classpath b/BasicJava/LocalDateDemo_minus_plus_weeks/LocalDateDemo/.classpath
similarity index 100%
rename from Later/Streams/25/StreamDemo/.classpath
rename to BasicJava/LocalDateDemo_minus_plus_weeks/LocalDateDemo/.classpath
diff --git a/BasicJava/LocalDateDemo_minus_plus_weeks/LocalDateDemo/.project b/BasicJava/LocalDateDemo_minus_plus_weeks/LocalDateDemo/.project
new file mode 100644
index 000000000..b83b03f89
--- /dev/null
+++ b/BasicJava/LocalDateDemo_minus_plus_weeks/LocalDateDemo/.project
@@ -0,0 +1,17 @@
+
+
+ LocalDateDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/Later/Streams/25/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LocalDateDemo_minus_plus_weeks/LocalDateDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Streams/25/StreamDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LocalDateDemo_minus_plus_weeks/LocalDateDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/LocalDateDemo_minus_plus_weeks/LocalDateDemo/bin/LocalDateDemo1.class b/BasicJava/LocalDateDemo_minus_plus_weeks/LocalDateDemo/bin/LocalDateDemo1.class
new file mode 100644
index 000000000..29cce6213
Binary files /dev/null and b/BasicJava/LocalDateDemo_minus_plus_weeks/LocalDateDemo/bin/LocalDateDemo1.class differ
diff --git a/BasicJava/LocalDateDemo_minus_plus_weeks/LocalDateDemo/bin/LocalDateDemo2.class b/BasicJava/LocalDateDemo_minus_plus_weeks/LocalDateDemo/bin/LocalDateDemo2.class
new file mode 100644
index 000000000..fb6044183
Binary files /dev/null and b/BasicJava/LocalDateDemo_minus_plus_weeks/LocalDateDemo/bin/LocalDateDemo2.class differ
diff --git a/BasicJava/LocalDateDemo_minus_plus_weeks/LocalDateDemo/src/LocalDateDemo1.java b/BasicJava/LocalDateDemo_minus_plus_weeks/LocalDateDemo/src/LocalDateDemo1.java
new file mode 100644
index 000000000..ff0f5fc96
--- /dev/null
+++ b/BasicJava/LocalDateDemo_minus_plus_weeks/LocalDateDemo/src/LocalDateDemo1.java
@@ -0,0 +1,23 @@
+import java.time.LocalDate;
+
+public class LocalDateDemo1
+{
+
+ public static void main(String[] args)
+ {
+ LocalDate currentDate = LocalDate.now();
+ System.out.println("currentDate = " + currentDate);
+
+ /*
+ * Parameters:
+ *
+ * weeksToSubtract - the weeks to subtract, may be negative
+ *
+ * Returns:a LocalDate based on this date with the weeks
+ * subtracted, not null
+ */
+ LocalDate dateAfterWeekChanged = currentDate.minusWeeks(2);
+ System.out.println("dateAfterWeekChanged = " + dateAfterWeekChanged);
+ }
+
+}
diff --git a/BasicJava/LocalDateDemo_minus_plus_weeks/LocalDateDemo/src/LocalDateDemo2.java b/BasicJava/LocalDateDemo_minus_plus_weeks/LocalDateDemo/src/LocalDateDemo2.java
new file mode 100644
index 000000000..f4860c299
--- /dev/null
+++ b/BasicJava/LocalDateDemo_minus_plus_weeks/LocalDateDemo/src/LocalDateDemo2.java
@@ -0,0 +1,27 @@
+import java.time.LocalDate;
+
+public class LocalDateDemo2
+{
+
+ public static void main(String[] args)
+ {
+ /*
+ * Obtains an instance of LocalDate from a text string such as
+ * 2007-12-03
+ */
+ LocalDate currentDate = LocalDate.now();
+ System.out.println("currentDate = " + currentDate);
+
+ /*
+ * Parameters:
+ *
+ * weeksToAdd - the weeks to add, may be negative
+ *
+ * Returns:a LocalDate based on this date with the weeks
+ * added, not null
+ */
+ LocalDate dateAfterWeekChanged = currentDate.plusWeeks(3);
+ System.out.println("dateAfterWeekChanged = " + dateAfterWeekChanged);
+ }
+
+}
diff --git a/BasicJava/LocalDateDemo_minus_plus_weeks/LocalDateDemo1_Output.txt b/BasicJava/LocalDateDemo_minus_plus_weeks/LocalDateDemo1_Output.txt
new file mode 100644
index 000000000..d6e035a07
--- /dev/null
+++ b/BasicJava/LocalDateDemo_minus_plus_weeks/LocalDateDemo1_Output.txt
@@ -0,0 +1,2 @@
+currentDate = 2018-01-05
+dateAfterWeekChanged = 2017-12-22
diff --git a/BasicJava/LocalDateDemo_minus_plus_weeks/LocalDateDemo2_Output.txt b/BasicJava/LocalDateDemo_minus_plus_weeks/LocalDateDemo2_Output.txt
new file mode 100644
index 000000000..9964adaf1
--- /dev/null
+++ b/BasicJava/LocalDateDemo_minus_plus_weeks/LocalDateDemo2_Output.txt
@@ -0,0 +1,2 @@
+currentDate = 2018-01-05
+dateAfterWeekChanged = 2018-01-26
diff --git a/Later/Streams/26/StreamDemo/.classpath b/BasicJava/LocalDateDemo_now_methods/LocalDateDemo/.classpath
similarity index 100%
rename from Later/Streams/26/StreamDemo/.classpath
rename to BasicJava/LocalDateDemo_now_methods/LocalDateDemo/.classpath
diff --git a/BasicJava/LocalDateDemo_now_methods/LocalDateDemo/.project b/BasicJava/LocalDateDemo_now_methods/LocalDateDemo/.project
new file mode 100644
index 000000000..b83b03f89
--- /dev/null
+++ b/BasicJava/LocalDateDemo_now_methods/LocalDateDemo/.project
@@ -0,0 +1,17 @@
+
+
+ LocalDateDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/Later/Streams/26/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LocalDateDemo_now_methods/LocalDateDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Streams/26/StreamDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LocalDateDemo_now_methods/LocalDateDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/LocalDateDemo_now_methods/LocalDateDemo/bin/LocalDateDemo.class b/BasicJava/LocalDateDemo_now_methods/LocalDateDemo/bin/LocalDateDemo.class
new file mode 100644
index 000000000..5955080ea
Binary files /dev/null and b/BasicJava/LocalDateDemo_now_methods/LocalDateDemo/bin/LocalDateDemo.class differ
diff --git a/BasicJava/LocalDateDemo_now_methods/LocalDateDemo/src/LocalDateDemo.java b/BasicJava/LocalDateDemo_now_methods/LocalDateDemo/src/LocalDateDemo.java
new file mode 100644
index 000000000..9f2f52fba
--- /dev/null
+++ b/BasicJava/LocalDateDemo_now_methods/LocalDateDemo/src/LocalDateDemo.java
@@ -0,0 +1,40 @@
+import java.time.Clock;
+import java.time.LocalDate;
+import java.time.ZoneId;
+
+public class LocalDateDemo
+{
+ public static void main(String[] args)
+ {
+ /*
+ * Returns:the current date using the system clock and default
+ * time-zone, not null
+ */
+ LocalDate date1 = LocalDate.now();
+ System.out.println(date1);
+
+ Clock clock = Clock.systemUTC();
+ /*
+ * Parameters:
+ *
+ * clock - the clock to use, not null
+ *
+ * Returns:the current date, not null
+ */
+
+ LocalDate date2 = LocalDate.now(clock);
+ System.out.println(date2);
+
+ ZoneId zoneId = ZoneId.systemDefault();
+ /*
+ * Parameters:
+ *
+ * zone - the zone ID to use, not null
+ *
+ * Returns:the current date using the system clock, not null
+ */
+ LocalDate date3 = LocalDate.now(zoneId);
+ System.out.println(date3);
+ }
+
+}
diff --git a/BasicJava/LocalDateDemo_now_methods/Output.txt b/BasicJava/LocalDateDemo_now_methods/Output.txt
new file mode 100644
index 000000000..b61529407
--- /dev/null
+++ b/BasicJava/LocalDateDemo_now_methods/Output.txt
@@ -0,0 +1,3 @@
+2018-01-07
+2018-01-07
+2018-01-07
diff --git a/Later/Streams/28/StreamDemo/.classpath b/BasicJava/LocalDateDemo_plus_minus_days/LocalDateDemo/.classpath
similarity index 100%
rename from Later/Streams/28/StreamDemo/.classpath
rename to BasicJava/LocalDateDemo_plus_minus_days/LocalDateDemo/.classpath
diff --git a/BasicJava/LocalDateDemo_plus_minus_days/LocalDateDemo/.project b/BasicJava/LocalDateDemo_plus_minus_days/LocalDateDemo/.project
new file mode 100644
index 000000000..b83b03f89
--- /dev/null
+++ b/BasicJava/LocalDateDemo_plus_minus_days/LocalDateDemo/.project
@@ -0,0 +1,17 @@
+
+
+ LocalDateDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/Later/Streams/28/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LocalDateDemo_plus_minus_days/LocalDateDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Streams/28/StreamDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LocalDateDemo_plus_minus_days/LocalDateDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/LocalDateDemo_plus_minus_days/LocalDateDemo/bin/LocalDateDemo.class b/BasicJava/LocalDateDemo_plus_minus_days/LocalDateDemo/bin/LocalDateDemo.class
new file mode 100644
index 000000000..5db8a9fc3
Binary files /dev/null and b/BasicJava/LocalDateDemo_plus_minus_days/LocalDateDemo/bin/LocalDateDemo.class differ
diff --git a/BasicJava/LocalDateDemo_plus_minus_days/LocalDateDemo/src/LocalDateDemo.java b/BasicJava/LocalDateDemo_plus_minus_days/LocalDateDemo/src/LocalDateDemo.java
new file mode 100644
index 000000000..af5e02ef6
--- /dev/null
+++ b/BasicJava/LocalDateDemo_plus_minus_days/LocalDateDemo/src/LocalDateDemo.java
@@ -0,0 +1,39 @@
+import java.time.LocalDate;
+
+public class LocalDateDemo
+{
+
+ public static void main(String[] args)
+ {
+ /*
+ * Returns:the current date using the system clock and default
+ * time-zone, not null
+ */
+ LocalDate todayDate = LocalDate.now();
+ System.out.println("Today date = " + todayDate);
+
+ /*
+ * Parameters:
+ *
+ * daysToSubtract - the days to subtract, may be negative
+ *
+ * Returns:a LocalDate based on this date with the days
+ * subtracted, not null
+ */
+ LocalDate yesterdayDate = todayDate.minusDays(1);
+ System.out.println("Yesterday date = " + yesterdayDate);
+
+ /*
+ * Parameters:
+ *
+ * daysToAdd - the days to add, may be negative
+ *
+ * Returns:a LocalDate based on this date with the days added,
+ * not null
+ *
+ */
+ LocalDate tomorrowDate = todayDate.plusDays(1);
+ System.out.println("Tommorow date = " + tomorrowDate);
+ }
+
+}
diff --git a/BasicJava/LocalDateDemo_plus_minus_days/Output.txt b/BasicJava/LocalDateDemo_plus_minus_days/Output.txt
new file mode 100644
index 000000000..e2789b443
--- /dev/null
+++ b/BasicJava/LocalDateDemo_plus_minus_days/Output.txt
@@ -0,0 +1,3 @@
+Today date = 2018-01-03
+Yesterday date = 2018-01-02
+Tommorow date = 2018-01-04
diff --git a/Later/Streams/29/StreamDemo/.classpath b/BasicJava/LocalDateDemo_range/LocalDateDemo/.classpath
similarity index 100%
rename from Later/Streams/29/StreamDemo/.classpath
rename to BasicJava/LocalDateDemo_range/LocalDateDemo/.classpath
diff --git a/BasicJava/LocalDateDemo_range/LocalDateDemo/.project b/BasicJava/LocalDateDemo_range/LocalDateDemo/.project
new file mode 100644
index 000000000..b83b03f89
--- /dev/null
+++ b/BasicJava/LocalDateDemo_range/LocalDateDemo/.project
@@ -0,0 +1,17 @@
+
+
+ LocalDateDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/Later/Streams/29/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LocalDateDemo_range/LocalDateDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Streams/29/StreamDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LocalDateDemo_range/LocalDateDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/LocalDateDemo_range/LocalDateDemo/bin/LocalDateDemo.class b/BasicJava/LocalDateDemo_range/LocalDateDemo/bin/LocalDateDemo.class
new file mode 100644
index 000000000..596ead5ca
Binary files /dev/null and b/BasicJava/LocalDateDemo_range/LocalDateDemo/bin/LocalDateDemo.class differ
diff --git a/BasicJava/LocalDateDemo_range/LocalDateDemo/src/LocalDateDemo.java b/BasicJava/LocalDateDemo_range/LocalDateDemo/src/LocalDateDemo.java
new file mode 100644
index 000000000..2ffc1ce02
--- /dev/null
+++ b/BasicJava/LocalDateDemo_range/LocalDateDemo/src/LocalDateDemo.java
@@ -0,0 +1,42 @@
+import java.time.LocalDate;
+import java.time.temporal.ChronoField;
+import java.time.temporal.ValueRange;
+
+public class LocalDateDemo
+{
+
+ public static void main(String[] args)
+ {
+ LocalDate date = LocalDate.parse("2017-12-03");
+
+ /*
+ * Parameters:
+ *
+ * field - the field to query the range for, not null
+ *
+ * Returns:
+ *
+ * the range of valid values for the field, not null
+ */
+ ValueRange dayOfMonthRange = date.range(ChronoField.DAY_OF_MONTH);
+ System.out.println("dayOfMonthRange = "+dayOfMonthRange);
+ System.out.println("Max DayOfMonth = "+ dayOfMonthRange.getMaximum());
+ System.out.println("Min DayOfMonth = "+ dayOfMonthRange.getMinimum());
+
+ System.out.println("--------------------------");
+
+ ValueRange monthOfYearRange = date.range(ChronoField.MONTH_OF_YEAR);
+ System.out.println("monthOfYearRange = "+monthOfYearRange);
+ System.out.println("Max MonthOfYear = "+ monthOfYearRange.getMaximum());
+ System.out.println("Min MonthOfYear = "+ monthOfYearRange.getMinimum());
+
+ System.out.println("--------------------------");
+
+ ValueRange dayOfYearRange = date.range(ChronoField.DAY_OF_YEAR);
+ System.out.println("dayOfYearRange = "+dayOfYearRange);
+ System.out.println("Max DayOfYear = "+ dayOfYearRange.getMaximum());
+ System.out.println("Min DayOfYear = "+ dayOfYearRange.getMinimum());
+
+ }
+
+}
diff --git a/BasicJava/LocalDateDemo_range/Output.txt b/BasicJava/LocalDateDemo_range/Output.txt
new file mode 100644
index 000000000..3546b0673
--- /dev/null
+++ b/BasicJava/LocalDateDemo_range/Output.txt
@@ -0,0 +1,11 @@
+dayOfMonthRange = 1 - 31
+Max DayOfMonth = 31
+Min DayOfMonth = 1
+--------------------------
+monthOfYearRange = 1 - 12
+Max MonthOfYear = 12
+Min MonthOfYear = 1
+--------------------------
+dayOfYearRange = 1 - 365
+Max DayOfYear = 365
+Min DayOfYear = 1
diff --git a/Later/Streams/3/StreamDemo/.classpath b/BasicJava/LocalDateDemo_with/LocalDateDemo/.classpath
similarity index 100%
rename from Later/Streams/3/StreamDemo/.classpath
rename to BasicJava/LocalDateDemo_with/LocalDateDemo/.classpath
diff --git a/BasicJava/LocalDateDemo_with/LocalDateDemo/.project b/BasicJava/LocalDateDemo_with/LocalDateDemo/.project
new file mode 100644
index 000000000..b83b03f89
--- /dev/null
+++ b/BasicJava/LocalDateDemo_with/LocalDateDemo/.project
@@ -0,0 +1,17 @@
+
+
+ LocalDateDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/Later/Streams/3/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LocalDateDemo_with/LocalDateDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Streams/3/StreamDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LocalDateDemo_with/LocalDateDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/LocalDateDemo_with/LocalDateDemo/bin/LocalDateDemo.class b/BasicJava/LocalDateDemo_with/LocalDateDemo/bin/LocalDateDemo.class
new file mode 100644
index 000000000..2e1b8d5d3
Binary files /dev/null and b/BasicJava/LocalDateDemo_with/LocalDateDemo/bin/LocalDateDemo.class differ
diff --git a/BasicJava/LocalDateDemo_with/LocalDateDemo/src/LocalDateDemo.java b/BasicJava/LocalDateDemo_with/LocalDateDemo/src/LocalDateDemo.java
new file mode 100644
index 000000000..610704322
--- /dev/null
+++ b/BasicJava/LocalDateDemo_with/LocalDateDemo/src/LocalDateDemo.java
@@ -0,0 +1,49 @@
+import java.time.LocalDate;
+
+public class LocalDateDemo
+{
+
+ public static void main(String[] args)
+ {
+ LocalDate date = LocalDate.now();
+ System.out.println("date = " + date);
+
+ /*
+ * Parameters:
+ *
+ * dayOfMonth - the day-of-month to set in the result, from 1
+ * to 28-31
+ *
+ * Returns:a LocalDate based on this date with the requested
+ * day, not null
+ */
+ LocalDate dateAfterDayChanged = date.withDayOfMonth(30);
+ System.out.println("dateAfterDayChanged = " + dateAfterDayChanged);
+
+ /*
+ * Parameters:
+ *
+ * month - the month-of-year to set in the result, from 1
+ * (January) to 12 (December)
+ *
+ * Returns:a LocalDate based on this date with the requested
+ * month, not null
+ */
+ LocalDate dateAfterMonthChanged = date.withMonth(2);
+ System.out.println("dateAfterMonthChanged = " + dateAfterMonthChanged);
+
+ /*
+ * Parameters:
+ *
+ * year - the year to set in the result, from MIN_YEAR to
+ * MAX_YEAR
+ *
+ * Returns:a LocalDate based on this date with the requested
+ * year, not null
+ */
+ LocalDate dateAfterYearChanged = date.withYear(2050);
+ System.out.println("dateAfterYearChanged = " + dateAfterYearChanged);
+
+ }
+
+}
diff --git a/BasicJava/LocalDateDemo_with/Output.txt b/BasicJava/LocalDateDemo_with/Output.txt
new file mode 100644
index 000000000..483c8c2d4
--- /dev/null
+++ b/BasicJava/LocalDateDemo_with/Output.txt
@@ -0,0 +1,4 @@
+date = 2018-01-05
+dateAfterDayChanged = 2018-01-30
+dateAfterMonthChanged = 2018-02-05
+dateAfterYearChanged = 2050-01-05
diff --git a/Later/Streams/30/StreamDemo/.classpath b/BasicJava/LocalDateTimeDemo_Intro/LocalDateTimeDemo/.classpath
similarity index 100%
rename from Later/Streams/30/StreamDemo/.classpath
rename to BasicJava/LocalDateTimeDemo_Intro/LocalDateTimeDemo/.classpath
diff --git a/BasicJava/LocalDateTimeDemo_Intro/LocalDateTimeDemo/.project b/BasicJava/LocalDateTimeDemo_Intro/LocalDateTimeDemo/.project
new file mode 100644
index 000000000..f1fb898ca
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_Intro/LocalDateTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ LocalDateTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/Later/Streams/30/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LocalDateTimeDemo_Intro/LocalDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Streams/30/StreamDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LocalDateTimeDemo_Intro/LocalDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/LocalDateTimeDemo_Intro/LocalDateTimeDemo/bin/LocalDateTimeDemo.class b/BasicJava/LocalDateTimeDemo_Intro/LocalDateTimeDemo/bin/LocalDateTimeDemo.class
new file mode 100644
index 000000000..9529729ab
Binary files /dev/null and b/BasicJava/LocalDateTimeDemo_Intro/LocalDateTimeDemo/bin/LocalDateTimeDemo.class differ
diff --git a/BasicJava/LocalDateTimeDemo_Intro/LocalDateTimeDemo/src/LocalDateTimeDemo.java b/BasicJava/LocalDateTimeDemo_Intro/LocalDateTimeDemo/src/LocalDateTimeDemo.java
new file mode 100644
index 000000000..1c642e98a
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_Intro/LocalDateTimeDemo/src/LocalDateTimeDemo.java
@@ -0,0 +1,18 @@
+import java.time.LocalDateTime;
+
+public class LocalDateTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+ /*
+ * Returns:
+ *
+ * the current date-time using the system clock and
+ * default time-zone, not null
+ */
+ LocalDateTime localDateTime = LocalDateTime.now();
+ System.out.println(localDateTime);
+ }
+
+}
diff --git a/BasicJava/LocalDateTimeDemo_Intro/Output.txt b/BasicJava/LocalDateTimeDemo_Intro/Output.txt
new file mode 100644
index 000000000..fe9580505
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_Intro/Output.txt
@@ -0,0 +1 @@
+2018-01-12T09:32:49.274
diff --git a/Later/Streams/31/StreamDemo/.classpath b/BasicJava/LocalDateTimeDemo_atOffset/LocalDateTimeDemo/.classpath
similarity index 100%
rename from Later/Streams/31/StreamDemo/.classpath
rename to BasicJava/LocalDateTimeDemo_atOffset/LocalDateTimeDemo/.classpath
diff --git a/BasicJava/LocalDateTimeDemo_atOffset/LocalDateTimeDemo/.project b/BasicJava/LocalDateTimeDemo_atOffset/LocalDateTimeDemo/.project
new file mode 100644
index 000000000..f1fb898ca
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_atOffset/LocalDateTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ LocalDateTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/Later/Streams/31/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LocalDateTimeDemo_atOffset/LocalDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Streams/31/StreamDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LocalDateTimeDemo_atOffset/LocalDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/LocalDateTimeDemo_atOffset/LocalDateTimeDemo/bin/LocalDateTimeDemo.class b/BasicJava/LocalDateTimeDemo_atOffset/LocalDateTimeDemo/bin/LocalDateTimeDemo.class
new file mode 100644
index 000000000..8188ed7ad
Binary files /dev/null and b/BasicJava/LocalDateTimeDemo_atOffset/LocalDateTimeDemo/bin/LocalDateTimeDemo.class differ
diff --git a/BasicJava/LocalDateTimeDemo_atOffset/LocalDateTimeDemo/src/LocalDateTimeDemo.java b/BasicJava/LocalDateTimeDemo_atOffset/LocalDateTimeDemo/src/LocalDateTimeDemo.java
new file mode 100644
index 000000000..755fb97d0
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_atOffset/LocalDateTimeDemo/src/LocalDateTimeDemo.java
@@ -0,0 +1,30 @@
+import java.time.LocalDateTime;
+import java.time.OffsetDateTime;
+import java.time.ZoneOffset;
+
+public class LocalDateTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+ LocalDateTime localDateTime = LocalDateTime
+ .parse("2017-02-03T12:30:30");
+ System.out.println("localDateTime = "+localDateTime);
+
+ ZoneOffset zoneOffset = ZoneOffset.ofHours(5);
+ System.out.println("zoneOffset = "+zoneOffset);
+ /*
+ * Parameters:
+ *
+ * offset - the offset to combine with, not null
+ *
+ * Returns:
+ *
+ * the offset date-time formed from this date-time and the
+ * specified offset, not null
+ */
+ OffsetDateTime offsetDateTime = localDateTime.atOffset(zoneOffset);
+ System.out.println("offsetDateTime = "+offsetDateTime);
+ }
+
+}
diff --git a/BasicJava/LocalDateTimeDemo_atOffset/Output.txt b/BasicJava/LocalDateTimeDemo_atOffset/Output.txt
new file mode 100644
index 000000000..d797ced92
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_atOffset/Output.txt
@@ -0,0 +1,3 @@
+localDateTime = 2017-02-03T12:30:30
+zoneOffset = +05:00
+offsetDateTime = 2017-02-03T12:30:30+05:00
diff --git a/Later/Streams/32/StreamDemo/.classpath b/BasicJava/LocalDateTimeDemo_atZone/LocalDateTimeDemo/.classpath
similarity index 100%
rename from Later/Streams/32/StreamDemo/.classpath
rename to BasicJava/LocalDateTimeDemo_atZone/LocalDateTimeDemo/.classpath
diff --git a/BasicJava/LocalDateTimeDemo_atZone/LocalDateTimeDemo/.project b/BasicJava/LocalDateTimeDemo_atZone/LocalDateTimeDemo/.project
new file mode 100644
index 000000000..f1fb898ca
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_atZone/LocalDateTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ LocalDateTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/Later/Streams/32/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LocalDateTimeDemo_atZone/LocalDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Streams/32/StreamDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LocalDateTimeDemo_atZone/LocalDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/LocalDateTimeDemo_atZone/LocalDateTimeDemo/bin/LocalDateTimeDemo.class b/BasicJava/LocalDateTimeDemo_atZone/LocalDateTimeDemo/bin/LocalDateTimeDemo.class
new file mode 100644
index 000000000..fc10b74f0
Binary files /dev/null and b/BasicJava/LocalDateTimeDemo_atZone/LocalDateTimeDemo/bin/LocalDateTimeDemo.class differ
diff --git a/BasicJava/LocalDateTimeDemo_atZone/LocalDateTimeDemo/src/LocalDateTimeDemo.java b/BasicJava/LocalDateTimeDemo_atZone/LocalDateTimeDemo/src/LocalDateTimeDemo.java
new file mode 100644
index 000000000..75e50b732
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_atZone/LocalDateTimeDemo/src/LocalDateTimeDemo.java
@@ -0,0 +1,33 @@
+import java.time.LocalDateTime;
+import java.time.ZoneId;
+import java.time.ZonedDateTime;
+
+public class LocalDateTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+ LocalDateTime localDateTime = LocalDateTime
+ .parse("2017-05-03T12:30:30");
+
+ System.out.println(localDateTime);
+
+ ZoneId zoneId = ZoneId.systemDefault();
+ System.out.println("zoneId = "+zoneId);
+
+ /*
+ * Parameters:
+ *
+ * zone - the time-zone to use, not null
+ *
+ * Returns:
+ *
+ * the zoned date-time formed from this date-time, not null
+ */
+ ZonedDateTime zonedDateTime = localDateTime.atZone(zoneId);
+
+ System.out.println(zonedDateTime);
+
+ }
+
+}
diff --git a/BasicJava/LocalDateTimeDemo_atZone/Output.txt b/BasicJava/LocalDateTimeDemo_atZone/Output.txt
new file mode 100644
index 000000000..5d69944c6
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_atZone/Output.txt
@@ -0,0 +1,3 @@
+2017-05-03T12:30:30
+zoneId = Asia/Calcutta
+2017-05-03T12:30:30+05:30[Asia/Calcutta]
diff --git a/Later/Streams/34/StreamDemo/.classpath b/BasicJava/LocalDateTimeDemo_equal_after_before/LocalDateTimeDemo/.classpath
similarity index 100%
rename from Later/Streams/34/StreamDemo/.classpath
rename to BasicJava/LocalDateTimeDemo_equal_after_before/LocalDateTimeDemo/.classpath
diff --git a/BasicJava/LocalDateTimeDemo_equal_after_before/LocalDateTimeDemo/.project b/BasicJava/LocalDateTimeDemo_equal_after_before/LocalDateTimeDemo/.project
new file mode 100644
index 000000000..f1fb898ca
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_equal_after_before/LocalDateTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ LocalDateTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/Later/Streams/34/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LocalDateTimeDemo_equal_after_before/LocalDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Streams/34/StreamDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LocalDateTimeDemo_equal_after_before/LocalDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/LocalDateTimeDemo_equal_after_before/LocalDateTimeDemo/bin/LocalDateTimeDemo.class b/BasicJava/LocalDateTimeDemo_equal_after_before/LocalDateTimeDemo/bin/LocalDateTimeDemo.class
new file mode 100644
index 000000000..720786a14
Binary files /dev/null and b/BasicJava/LocalDateTimeDemo_equal_after_before/LocalDateTimeDemo/bin/LocalDateTimeDemo.class differ
diff --git a/BasicJava/LocalDateTimeDemo_equal_after_before/LocalDateTimeDemo/src/LocalDateTimeDemo.java b/BasicJava/LocalDateTimeDemo_equal_after_before/LocalDateTimeDemo/src/LocalDateTimeDemo.java
new file mode 100644
index 000000000..962e0c8c9
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_equal_after_before/LocalDateTimeDemo/src/LocalDateTimeDemo.java
@@ -0,0 +1,36 @@
+import java.time.LocalDateTime;
+
+public class LocalDateTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+ LocalDateTime localDateTime1 = LocalDateTime
+ .parse("2016-02-03T12:30:30");
+ System.out.println("localDateTime1 = "+localDateTime1);
+
+ LocalDateTime localDateTime2 = LocalDateTime
+ .parse("2017-03-03T12:30:30");
+
+ System.out.println("localDateTime2 = "+localDateTime2);
+
+ /*
+ * Returns:true if this is equal to the other date-time
+ */
+ System.out.println(localDateTime1.equals(localDateTime2));
+
+ /*
+ * Returns:true if this date-time is after the specified
+ * date-time
+ */
+ System.out.println(localDateTime1.isAfter(localDateTime2));
+
+ /*
+ * Returns:true if this date-time is before the specified
+ * date-time
+ */
+
+ System.out.println(localDateTime1.isBefore(localDateTime2));
+ }
+
+}
diff --git a/BasicJava/LocalDateTimeDemo_equal_after_before/Output.txt b/BasicJava/LocalDateTimeDemo_equal_after_before/Output.txt
new file mode 100644
index 000000000..49a8ca462
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_equal_after_before/Output.txt
@@ -0,0 +1,5 @@
+localDateTime1 = 2016-02-03T12:30:30
+localDateTime2 = 2017-03-03T12:30:30
+false
+false
+true
diff --git a/Later/Streams/35/StreamDemo/.classpath b/BasicJava/LocalDateTimeDemo_format_datetimeformatter/LocalDateTimeDemo/.classpath
similarity index 100%
rename from Later/Streams/35/StreamDemo/.classpath
rename to BasicJava/LocalDateTimeDemo_format_datetimeformatter/LocalDateTimeDemo/.classpath
diff --git a/BasicJava/LocalDateTimeDemo_format_datetimeformatter/LocalDateTimeDemo/.project b/BasicJava/LocalDateTimeDemo_format_datetimeformatter/LocalDateTimeDemo/.project
new file mode 100644
index 000000000..f1fb898ca
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_format_datetimeformatter/LocalDateTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ LocalDateTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/Later/Streams/35/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LocalDateTimeDemo_format_datetimeformatter/LocalDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Streams/35/StreamDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LocalDateTimeDemo_format_datetimeformatter/LocalDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/LocalDateTimeDemo_format_datetimeformatter/LocalDateTimeDemo/bin/LocalDateTimeDemo.class b/BasicJava/LocalDateTimeDemo_format_datetimeformatter/LocalDateTimeDemo/bin/LocalDateTimeDemo.class
new file mode 100644
index 000000000..f52c70b68
Binary files /dev/null and b/BasicJava/LocalDateTimeDemo_format_datetimeformatter/LocalDateTimeDemo/bin/LocalDateTimeDemo.class differ
diff --git a/BasicJava/LocalDateTimeDemo_format_datetimeformatter/LocalDateTimeDemo/src/LocalDateTimeDemo.java b/BasicJava/LocalDateTimeDemo_format_datetimeformatter/LocalDateTimeDemo/src/LocalDateTimeDemo.java
new file mode 100644
index 000000000..dce6b6545
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_format_datetimeformatter/LocalDateTimeDemo/src/LocalDateTimeDemo.java
@@ -0,0 +1,40 @@
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+
+public class LocalDateTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+ LocalDateTime localDateTime = LocalDateTime.now();
+ System.out.println("Before Formatting = " + localDateTime);
+
+ /*
+ * Parameters:
+ *
+ * pattern - the pattern to use, not null
+ *
+ * Returns:
+ *
+ * the formatter based on the pattern, not null
+ *
+ */
+
+ DateTimeFormatter dateTimeFormatter = DateTimeFormatter
+ .ofPattern("dd-MM-yyyy HH:mm:ss");
+
+ /*
+ * Parameters:
+ *
+ * formatter - the formatter to use, not null
+ *
+ * Returns:
+ *
+ * the formatted date-time string, not null
+ *
+ */
+ String formatDateTime = localDateTime.format(dateTimeFormatter);
+ System.out.println("After Formatting = " + formatDateTime);
+ }
+
+}
diff --git a/BasicJava/LocalDateTimeDemo_format_datetimeformatter/Output.txt b/BasicJava/LocalDateTimeDemo_format_datetimeformatter/Output.txt
new file mode 100644
index 000000000..96c689231
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_format_datetimeformatter/Output.txt
@@ -0,0 +1,2 @@
+Before Formatting = 2018-01-17T10:09:54.188
+After Formatting = 17-01-2018 10:09:54
diff --git a/Later/Streams/4.1/StreamDemo/.classpath b/BasicJava/LocalDateTimeDemo_format_how/LocalDateTimeDemo/.classpath
similarity index 100%
rename from Later/Streams/4.1/StreamDemo/.classpath
rename to BasicJava/LocalDateTimeDemo_format_how/LocalDateTimeDemo/.classpath
diff --git a/BasicJava/LocalDateTimeDemo_format_how/LocalDateTimeDemo/.project b/BasicJava/LocalDateTimeDemo_format_how/LocalDateTimeDemo/.project
new file mode 100644
index 000000000..f1fb898ca
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_format_how/LocalDateTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ LocalDateTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/Later/Streams/4.1/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LocalDateTimeDemo_format_how/LocalDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Streams/4.1/StreamDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LocalDateTimeDemo_format_how/LocalDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/LocalDateTimeDemo_format_how/LocalDateTimeDemo/bin/LocalDateTimeDemo.class b/BasicJava/LocalDateTimeDemo_format_how/LocalDateTimeDemo/bin/LocalDateTimeDemo.class
new file mode 100644
index 000000000..9e006a090
Binary files /dev/null and b/BasicJava/LocalDateTimeDemo_format_how/LocalDateTimeDemo/bin/LocalDateTimeDemo.class differ
diff --git a/BasicJava/LocalDateTimeDemo_format_how/LocalDateTimeDemo/src/LocalDateTimeDemo.java b/BasicJava/LocalDateTimeDemo_format_how/LocalDateTimeDemo/src/LocalDateTimeDemo.java
new file mode 100644
index 000000000..0800a73eb
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_format_how/LocalDateTimeDemo/src/LocalDateTimeDemo.java
@@ -0,0 +1,29 @@
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+
+public class LocalDateTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+ LocalDateTime localDateTime = LocalDateTime
+ .parse("2017-02-03T12:30:30");
+ System.out.println(localDateTime);
+
+
+ DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ISO_DATE;
+ /*
+ * Parameters:
+ *
+ * temporal - the temporal object to format, not null
+ *
+ * Returns:
+ *
+ * the formatted string, not null
+ */
+
+ String formatedStrDate = dateTimeFormatter.format(localDateTime);
+ System.out.println(formatedStrDate);
+ }
+
+}
diff --git a/BasicJava/LocalDateTimeDemo_format_how/Output.txt b/BasicJava/LocalDateTimeDemo_format_how/Output.txt
new file mode 100644
index 000000000..33b538187
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_format_how/Output.txt
@@ -0,0 +1,2 @@
+2017-02-03T12:30:30
+2017-02-03
diff --git a/Later/Streams/4/StreamDemo/.classpath b/BasicJava/LocalDateTimeDemo_get_Temporalfield/LocalDateTimeDemo/.classpath
similarity index 100%
rename from Later/Streams/4/StreamDemo/.classpath
rename to BasicJava/LocalDateTimeDemo_get_Temporalfield/LocalDateTimeDemo/.classpath
diff --git a/BasicJava/LocalDateTimeDemo_get_Temporalfield/LocalDateTimeDemo/.project b/BasicJava/LocalDateTimeDemo_get_Temporalfield/LocalDateTimeDemo/.project
new file mode 100644
index 000000000..f1fb898ca
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_get_Temporalfield/LocalDateTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ LocalDateTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/Later/Streams/4/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LocalDateTimeDemo_get_Temporalfield/LocalDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Streams/4/StreamDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LocalDateTimeDemo_get_Temporalfield/LocalDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/LocalDateTimeDemo_get_Temporalfield/LocalDateTimeDemo/bin/LocalDateTimeDemo.class b/BasicJava/LocalDateTimeDemo_get_Temporalfield/LocalDateTimeDemo/bin/LocalDateTimeDemo.class
new file mode 100644
index 000000000..447b3f1f2
Binary files /dev/null and b/BasicJava/LocalDateTimeDemo_get_Temporalfield/LocalDateTimeDemo/bin/LocalDateTimeDemo.class differ
diff --git a/BasicJava/LocalDateTimeDemo_get_Temporalfield/LocalDateTimeDemo/src/LocalDateTimeDemo.java b/BasicJava/LocalDateTimeDemo_get_Temporalfield/LocalDateTimeDemo/src/LocalDateTimeDemo.java
new file mode 100644
index 000000000..8add2456d
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_get_Temporalfield/LocalDateTimeDemo/src/LocalDateTimeDemo.java
@@ -0,0 +1,38 @@
+import java.time.LocalDateTime;
+import java.time.temporal.ChronoField;
+
+public class LocalDateTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+ LocalDateTime currentDateTime = LocalDateTime.now();
+ System.out.println(currentDateTime);
+
+ /*
+ * Parameters:
+ *
+ * field - the field to get, not null
+ *
+ * Returns:
+ *
+ * the value for the field
+ *
+ */
+ System.out.println("DAY_OF_WEEK = "
+ + currentDateTime.get(ChronoField.DAY_OF_WEEK));
+
+ System.out.println("DAY_OF_YEAR = "
+ + currentDateTime.get(ChronoField.DAY_OF_YEAR));
+
+ System.out.println("DAY_OF_MONTH = "
+ + currentDateTime.get(ChronoField.DAY_OF_MONTH));
+
+ System.out.println("HOUR_OF_DAY = "
+ + currentDateTime.get(ChronoField.HOUR_OF_DAY));
+
+ System.out.println("MINUTE_OF_DAY = "
+ + currentDateTime.get(ChronoField.MINUTE_OF_DAY));
+ }
+
+}
diff --git a/BasicJava/LocalDateTimeDemo_get_Temporalfield/Output.txt b/BasicJava/LocalDateTimeDemo_get_Temporalfield/Output.txt
new file mode 100644
index 000000000..ec127a115
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_get_Temporalfield/Output.txt
@@ -0,0 +1,6 @@
+2018-01-12T09:47:30.097
+DAY_OF_WEEK = 5
+DAY_OF_YEAR = 12
+DAY_OF_MONTH = 12
+HOUR_OF_DAY = 9
+MINUTE_OF_DAY = 587
diff --git a/Later/Streams/5/StreamDemo/.classpath b/BasicJava/LocalDateTimeDemo_minus/LocalDateTimeDemo/.classpath
similarity index 100%
rename from Later/Streams/5/StreamDemo/.classpath
rename to BasicJava/LocalDateTimeDemo_minus/LocalDateTimeDemo/.classpath
diff --git a/BasicJava/LocalDateTimeDemo_minus/LocalDateTimeDemo/.project b/BasicJava/LocalDateTimeDemo_minus/LocalDateTimeDemo/.project
new file mode 100644
index 000000000..f1fb898ca
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_minus/LocalDateTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ LocalDateTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/Later/Streams/5/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LocalDateTimeDemo_minus/LocalDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Streams/5/StreamDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LocalDateTimeDemo_minus/LocalDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/LocalDateTimeDemo_minus/LocalDateTimeDemo/bin/LocalDateTimeDemo.class b/BasicJava/LocalDateTimeDemo_minus/LocalDateTimeDemo/bin/LocalDateTimeDemo.class
new file mode 100644
index 000000000..78e84dff0
Binary files /dev/null and b/BasicJava/LocalDateTimeDemo_minus/LocalDateTimeDemo/bin/LocalDateTimeDemo.class differ
diff --git a/BasicJava/LocalDateTimeDemo_minus/LocalDateTimeDemo/src/LocalDateTimeDemo.java b/BasicJava/LocalDateTimeDemo_minus/LocalDateTimeDemo/src/LocalDateTimeDemo.java
new file mode 100644
index 000000000..41b44b5c5
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_minus/LocalDateTimeDemo/src/LocalDateTimeDemo.java
@@ -0,0 +1,37 @@
+import java.time.LocalDateTime;
+
+public class LocalDateTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+ LocalDateTime localDateTime1 = LocalDateTime.now();
+ System.out.println("Current date and Time = " + localDateTime1);
+
+ LocalDateTime localDateTime2 = localDateTime1.minusYears(2);
+ System.out.println("\nYear changed = " + localDateTime2);
+
+ LocalDateTime localDateTime3 = localDateTime2.minusMonths(3);
+ System.out.println("Month changed = " + localDateTime3);
+
+ LocalDateTime localDateTime4 = localDateTime3.minusDays(5);
+ System.out.println("Day changed = " + localDateTime4);
+
+ LocalDateTime localDateTime5 = localDateTime4.minusHours(1);
+ System.out.println("Hour changed = " + localDateTime5);
+
+ LocalDateTime localDateTime6 = localDateTime5.minusMinutes(10);
+ System.out.println("Min changed = " + localDateTime6);
+
+ LocalDateTime localDateTime7 = localDateTime6.minusSeconds(20);
+ System.out.println("Sec changed = " + localDateTime7);
+
+ LocalDateTime localDateTime8 = localDateTime7.minusNanos(50);
+ System.out.println("NanoSec changed = " + localDateTime8);
+
+ LocalDateTime localDateTime9 = localDateTime8.minusWeeks(3);
+ System.out.println("Week changed = " + localDateTime9);
+
+ }
+
+}
diff --git a/BasicJava/LocalDateTimeDemo_minus/Output.txt b/BasicJava/LocalDateTimeDemo_minus/Output.txt
new file mode 100644
index 000000000..9b12647e9
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_minus/Output.txt
@@ -0,0 +1,10 @@
+Current date and Time = 2018-01-13T08:30:09.954
+
+Year changed = 2016-01-13T08:30:09.954
+Month changed = 2015-10-13T08:30:09.954
+Day changed = 2015-10-08T08:30:09.954
+Hour changed = 2015-10-08T07:30:09.954
+Min changed = 2015-10-08T07:20:09.954
+Sec changed = 2015-10-08T07:19:49.954
+NanoSec changed = 2015-10-08T07:19:49.953999950
+Week changed = 2015-09-17T07:19:49.953999950
diff --git a/Later/Streams/6/StreamDemo/.classpath b/BasicJava/LocalDateTimeDemo_of/LocalDateTimeDemo/.classpath
similarity index 100%
rename from Later/Streams/6/StreamDemo/.classpath
rename to BasicJava/LocalDateTimeDemo_of/LocalDateTimeDemo/.classpath
diff --git a/BasicJava/LocalDateTimeDemo_of/LocalDateTimeDemo/.project b/BasicJava/LocalDateTimeDemo_of/LocalDateTimeDemo/.project
new file mode 100644
index 000000000..f1fb898ca
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_of/LocalDateTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ LocalDateTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/Later/Streams/6/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LocalDateTimeDemo_of/LocalDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Streams/6/StreamDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LocalDateTimeDemo_of/LocalDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/LocalDateTimeDemo_of/LocalDateTimeDemo/bin/LocalDateTimeDemo1.class b/BasicJava/LocalDateTimeDemo_of/LocalDateTimeDemo/bin/LocalDateTimeDemo1.class
new file mode 100644
index 000000000..3cfa0de0d
Binary files /dev/null and b/BasicJava/LocalDateTimeDemo_of/LocalDateTimeDemo/bin/LocalDateTimeDemo1.class differ
diff --git a/BasicJava/LocalDateTimeDemo_of/LocalDateTimeDemo/bin/LocalDateTimeDemo2.class b/BasicJava/LocalDateTimeDemo_of/LocalDateTimeDemo/bin/LocalDateTimeDemo2.class
new file mode 100644
index 000000000..20b67e1a3
Binary files /dev/null and b/BasicJava/LocalDateTimeDemo_of/LocalDateTimeDemo/bin/LocalDateTimeDemo2.class differ
diff --git a/BasicJava/LocalDateTimeDemo_of/LocalDateTimeDemo/bin/LocalDateTimeDemo3.class b/BasicJava/LocalDateTimeDemo_of/LocalDateTimeDemo/bin/LocalDateTimeDemo3.class
new file mode 100644
index 000000000..3fe3ec9d4
Binary files /dev/null and b/BasicJava/LocalDateTimeDemo_of/LocalDateTimeDemo/bin/LocalDateTimeDemo3.class differ
diff --git a/BasicJava/LocalDateTimeDemo_of/LocalDateTimeDemo/src/LocalDateTimeDemo1.java b/BasicJava/LocalDateTimeDemo_of/LocalDateTimeDemo/src/LocalDateTimeDemo1.java
new file mode 100644
index 000000000..220739a69
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_of/LocalDateTimeDemo/src/LocalDateTimeDemo1.java
@@ -0,0 +1,33 @@
+import java.time.LocalDateTime;
+import java.time.Month;
+
+public class LocalDateTimeDemo1
+{
+
+ public static void main(String[] args)
+ {
+ /*
+ * Parameters:
+ *
+ * year - the year to represent, from MIN_YEAR to MAX_YEAR
+ *
+ * month - the month-of-year to represent, not null
+ *
+ * dayOfMonth - the day-of-month to represent, from 1 to 31
+ *
+ * hour - the hour-of-day to represent, from 0 to 23
+ *
+ * minute - the minute-of-hour to represent, from 0 to 59
+ *
+ * Returns:
+ *
+ * the local date-time, not null
+ */
+
+ LocalDateTime localDateTime = LocalDateTime.of(2020, Month.MARCH, 30, 6,
+ 30);
+ System.out.println(localDateTime);
+
+ }
+
+}
diff --git a/BasicJava/LocalDateTimeDemo_of/LocalDateTimeDemo/src/LocalDateTimeDemo2.java b/BasicJava/LocalDateTimeDemo_of/LocalDateTimeDemo/src/LocalDateTimeDemo2.java
new file mode 100644
index 000000000..f92e58ded
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_of/LocalDateTimeDemo/src/LocalDateTimeDemo2.java
@@ -0,0 +1,35 @@
+import java.time.LocalDateTime;
+import java.time.Month;
+
+public class LocalDateTimeDemo2
+{
+
+ public static void main(String[] args)
+ {
+ /*
+ * Parameters:
+ *
+ * year - the year to represent, from MIN_YEAR to MAX_YEAR
+ *
+ * month - the month-of-year to represent, not null
+ *
+ * dayOfMonth - the day-of-month to represent, from 1 to 31
+ *
+ * hour - the hour-of-day to represent, from 0 to 23
+ *
+ * minute - the minute-of-hour to represent, from 0 to 59
+ *
+ * second - the second-of-minute to represent, from 0 to 59
+ *
+ * Returns:
+ *
+ * the local date-time, not null
+ */
+
+ LocalDateTime localDateTime = LocalDateTime.of(2020, Month.MARCH, 30,
+ 6, 30, 59);
+ System.out.println(localDateTime);
+
+ }
+
+}
diff --git a/BasicJava/LocalDateTimeDemo_of/LocalDateTimeDemo/src/LocalDateTimeDemo3.java b/BasicJava/LocalDateTimeDemo_of/LocalDateTimeDemo/src/LocalDateTimeDemo3.java
new file mode 100644
index 000000000..262aa5021
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_of/LocalDateTimeDemo/src/LocalDateTimeDemo3.java
@@ -0,0 +1,36 @@
+import java.time.LocalDateTime;
+import java.time.Month;
+
+public class LocalDateTimeDemo3
+{
+
+ public static void main(String[] args)
+ {
+ /*
+ * Parameters:
+ *
+ * year - the year to represent, from MIN_YEAR to MAX_YEAR
+ *
+ * month - the month-of-year to represent, not null
+ *
+ * dayOfMonth - the day-of-month to represent, from 1 to 31
+ *
+ * hour - the hour-of-day to represent, from 0 to 23
+ *
+ * minute - the minute-of-hour to represent, from 0 to 59
+ *
+ * second - the second-of-minute to represent, from 0 to 59
+ *
+ * nanoOfSecond - the nano-of-second to represent, from 0 to
+ * 999,999,999
+ *
+ * Returns:the local date-time, not null
+ */
+
+ LocalDateTime localDateTime = LocalDateTime.of(2020, Month.MARCH, 30,
+ 6, 30, 59, 600);
+ System.out.println(localDateTime);
+
+ }
+
+}
diff --git a/BasicJava/LocalDateTimeDemo_of/LocalDateTimeDemo1_Output.txt b/BasicJava/LocalDateTimeDemo_of/LocalDateTimeDemo1_Output.txt
new file mode 100644
index 000000000..42f1724d3
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_of/LocalDateTimeDemo1_Output.txt
@@ -0,0 +1 @@
+2020-03-30T06:30
diff --git a/BasicJava/LocalDateTimeDemo_of/LocalDateTimeDemo2_Output.txt b/BasicJava/LocalDateTimeDemo_of/LocalDateTimeDemo2_Output.txt
new file mode 100644
index 000000000..b7b0696d0
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_of/LocalDateTimeDemo2_Output.txt
@@ -0,0 +1 @@
+2020-03-30T06:30:59
diff --git a/BasicJava/LocalDateTimeDemo_of/LocalDateTimeDemo3_Output.txt b/BasicJava/LocalDateTimeDemo_of/LocalDateTimeDemo3_Output.txt
new file mode 100644
index 000000000..ce2cbfe1d
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_of/LocalDateTimeDemo3_Output.txt
@@ -0,0 +1 @@
+2020-03-30T06:30:59.000000600
diff --git a/Later/Streams/7/StreamDemo/.classpath b/BasicJava/LocalDateTimeDemo_ofInstant/LocalDateTimeDemo/.classpath
similarity index 100%
rename from Later/Streams/7/StreamDemo/.classpath
rename to BasicJava/LocalDateTimeDemo_ofInstant/LocalDateTimeDemo/.classpath
diff --git a/BasicJava/LocalDateTimeDemo_ofInstant/LocalDateTimeDemo/.project b/BasicJava/LocalDateTimeDemo_ofInstant/LocalDateTimeDemo/.project
new file mode 100644
index 000000000..f1fb898ca
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_ofInstant/LocalDateTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ LocalDateTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/Later/Streams/7/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LocalDateTimeDemo_ofInstant/LocalDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Streams/7/StreamDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LocalDateTimeDemo_ofInstant/LocalDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/LocalDateTimeDemo_ofInstant/LocalDateTimeDemo/bin/LocalDateTimeDemo.class b/BasicJava/LocalDateTimeDemo_ofInstant/LocalDateTimeDemo/bin/LocalDateTimeDemo.class
new file mode 100644
index 000000000..318ced109
Binary files /dev/null and b/BasicJava/LocalDateTimeDemo_ofInstant/LocalDateTimeDemo/bin/LocalDateTimeDemo.class differ
diff --git a/BasicJava/LocalDateTimeDemo_ofInstant/LocalDateTimeDemo/src/LocalDateTimeDemo.java b/BasicJava/LocalDateTimeDemo_ofInstant/LocalDateTimeDemo/src/LocalDateTimeDemo.java
new file mode 100644
index 000000000..839de51da
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_ofInstant/LocalDateTimeDemo/src/LocalDateTimeDemo.java
@@ -0,0 +1,30 @@
+import java.time.Instant;
+import java.time.LocalDateTime;
+import java.time.ZoneId;
+
+public class LocalDateTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+
+ Instant instant = Instant.now();
+ System.out.println("instant = "+instant);
+
+ ZoneId zoneId = ZoneId.systemDefault();
+ System.out.println("zoneId = "+zoneId);
+ /*
+ * Parameters:
+ *
+ * instant - the instant to create the date-time from, not
+ * null
+ *
+ * zone - the time-zone, which may be an offset, not null
+ *
+ * Returns:the local date-time, not null
+ */
+ LocalDateTime localDateTime = LocalDateTime.ofInstant(instant, zoneId);
+ System.out.println("localDateTime = "+localDateTime);
+ }
+
+}
diff --git a/BasicJava/LocalDateTimeDemo_ofInstant/Output.txt b/BasicJava/LocalDateTimeDemo_ofInstant/Output.txt
new file mode 100644
index 000000000..df6063554
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_ofInstant/Output.txt
@@ -0,0 +1,3 @@
+instant = 2018-01-16T04:49:52.570Z
+zoneId = Asia/Calcutta
+localDateTime = 2018-01-16T10:19:52.570
diff --git a/Later/Streams/8/StreamDemo/.classpath b/BasicJava/LocalDateTimeDemo_parse/LocalDateTimeDemo/.classpath
similarity index 100%
rename from Later/Streams/8/StreamDemo/.classpath
rename to BasicJava/LocalDateTimeDemo_parse/LocalDateTimeDemo/.classpath
diff --git a/BasicJava/LocalDateTimeDemo_parse/LocalDateTimeDemo/.project b/BasicJava/LocalDateTimeDemo_parse/LocalDateTimeDemo/.project
new file mode 100644
index 000000000..f1fb898ca
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_parse/LocalDateTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ LocalDateTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/Later/Streams/8/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LocalDateTimeDemo_parse/LocalDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Streams/8/StreamDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LocalDateTimeDemo_parse/LocalDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/LocalDateTimeDemo_parse/LocalDateTimeDemo/bin/LocalDateTimeDemo1.class b/BasicJava/LocalDateTimeDemo_parse/LocalDateTimeDemo/bin/LocalDateTimeDemo1.class
new file mode 100644
index 000000000..2804e2f73
Binary files /dev/null and b/BasicJava/LocalDateTimeDemo_parse/LocalDateTimeDemo/bin/LocalDateTimeDemo1.class differ
diff --git a/BasicJava/LocalDateTimeDemo_parse/LocalDateTimeDemo/bin/LocalDateTimeDemo2.class b/BasicJava/LocalDateTimeDemo_parse/LocalDateTimeDemo/bin/LocalDateTimeDemo2.class
new file mode 100644
index 000000000..df942ccb3
Binary files /dev/null and b/BasicJava/LocalDateTimeDemo_parse/LocalDateTimeDemo/bin/LocalDateTimeDemo2.class differ
diff --git a/BasicJava/LocalDateTimeDemo_parse/LocalDateTimeDemo/src/LocalDateTimeDemo1.java b/BasicJava/LocalDateTimeDemo_parse/LocalDateTimeDemo/src/LocalDateTimeDemo1.java
new file mode 100644
index 000000000..4a73ac4a9
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_parse/LocalDateTimeDemo/src/LocalDateTimeDemo1.java
@@ -0,0 +1,24 @@
+import java.time.LocalDateTime;
+
+public class LocalDateTimeDemo1
+{
+
+ public static void main(String[] args)
+ {
+
+ String strDate = "2020-02-03T10:15:30";
+ /*
+ * Parameters:
+ *
+ * text - the text to parse such as "2007-12-03T10:15:30", not
+ * null
+ *
+ * Returns:the parsed local date-time, not null
+ */
+ LocalDateTime localDateTime = LocalDateTime.parse(strDate);
+
+ System.out.println(localDateTime);
+
+ }
+
+}
diff --git a/BasicJava/LocalDateTimeDemo_parse/LocalDateTimeDemo/src/LocalDateTimeDemo2.java b/BasicJava/LocalDateTimeDemo_parse/LocalDateTimeDemo/src/LocalDateTimeDemo2.java
new file mode 100644
index 000000000..84aa3da10
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_parse/LocalDateTimeDemo/src/LocalDateTimeDemo2.java
@@ -0,0 +1,31 @@
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+
+public class LocalDateTimeDemo2
+{
+
+ public static void main(String[] args)
+ {
+
+ String strDate = "2017-12-03T10:15:30+01:00";
+ DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ISO_DATE_TIME;
+
+ /*
+ * Parameters:
+ *
+ * text - the text to parse, not null
+ *
+ * formatter - the formatter to use, not null
+ *
+ * Returns:
+ *
+ * the parsed local date-time, not null
+ */
+
+ LocalDateTime localDateTime = LocalDateTime.parse(strDate,
+ dateTimeFormatter);
+
+ System.out.println(localDateTime);
+ }
+
+}
diff --git a/BasicJava/LocalDateTimeDemo_parse/LocalDateTimeDemo1_Output.txt b/BasicJava/LocalDateTimeDemo_parse/LocalDateTimeDemo1_Output.txt
new file mode 100644
index 000000000..723b3561b
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_parse/LocalDateTimeDemo1_Output.txt
@@ -0,0 +1 @@
+2020-02-03T10:15:30
diff --git a/BasicJava/LocalDateTimeDemo_parse/LocalDateTimeDemo2_Output.txt b/BasicJava/LocalDateTimeDemo_parse/LocalDateTimeDemo2_Output.txt
new file mode 100644
index 000000000..5e4d64b45
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_parse/LocalDateTimeDemo2_Output.txt
@@ -0,0 +1 @@
+2017-12-03T10:15:30
diff --git a/Later/Streams/9/StreamDemo/.classpath b/BasicJava/LocalDateTimeDemo_plus/LocalDateTimeDemo/.classpath
similarity index 100%
rename from Later/Streams/9/StreamDemo/.classpath
rename to BasicJava/LocalDateTimeDemo_plus/LocalDateTimeDemo/.classpath
diff --git a/BasicJava/LocalDateTimeDemo_plus/LocalDateTimeDemo/.project b/BasicJava/LocalDateTimeDemo_plus/LocalDateTimeDemo/.project
new file mode 100644
index 000000000..f1fb898ca
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_plus/LocalDateTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ LocalDateTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/Later/Streams/9/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LocalDateTimeDemo_plus/LocalDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from Later/Streams/9/StreamDemo/.settings/org.eclipse.jdt.core.prefs
rename to BasicJava/LocalDateTimeDemo_plus/LocalDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
diff --git a/BasicJava/LocalDateTimeDemo_plus/LocalDateTimeDemo/bin/LocalDateTimeDemo.class b/BasicJava/LocalDateTimeDemo_plus/LocalDateTimeDemo/bin/LocalDateTimeDemo.class
new file mode 100644
index 000000000..4f16d8022
Binary files /dev/null and b/BasicJava/LocalDateTimeDemo_plus/LocalDateTimeDemo/bin/LocalDateTimeDemo.class differ
diff --git a/BasicJava/LocalDateTimeDemo_plus/LocalDateTimeDemo/src/LocalDateTimeDemo.java b/BasicJava/LocalDateTimeDemo_plus/LocalDateTimeDemo/src/LocalDateTimeDemo.java
new file mode 100644
index 000000000..3241da5dd
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_plus/LocalDateTimeDemo/src/LocalDateTimeDemo.java
@@ -0,0 +1,36 @@
+import java.time.LocalDateTime;
+
+public class LocalDateTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+ LocalDateTime localDateTime1 = LocalDateTime.now();
+ System.out.println("Current date and Time = "+localDateTime1);
+
+ LocalDateTime localDateTime2 = localDateTime1.plusYears(2);
+ System.out.println("\nYear changed = "+localDateTime2);
+
+ LocalDateTime localDateTime3 = localDateTime2.plusMonths(3);
+ System.out.println("Month changed = "+localDateTime3);
+
+ LocalDateTime localDateTime4 = localDateTime3.plusDays(5);
+ System.out.println("Day changed = "+localDateTime4);
+
+ LocalDateTime localDateTime5 = localDateTime4.plusHours(1);
+ System.out.println("Hour changed = "+localDateTime5);
+
+ LocalDateTime localDateTime6 = localDateTime5.plusMinutes(10);
+ System.out.println("Min changed = "+localDateTime6);
+
+ LocalDateTime localDateTime7 = localDateTime6.plusSeconds(20);
+ System.out.println("Sec changed = "+localDateTime7);
+
+ LocalDateTime localDateTime8 = localDateTime7.plusNanos(50);
+ System.out.println("NanoSec changed = "+localDateTime8);
+
+ LocalDateTime localDateTime9 = localDateTime8.plusWeeks(3);
+ System.out.println("Week changed = "+localDateTime9);
+ }
+
+}
diff --git a/BasicJava/LocalDateTimeDemo_plus/Output.txt b/BasicJava/LocalDateTimeDemo_plus/Output.txt
new file mode 100644
index 000000000..4adccd8a5
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_plus/Output.txt
@@ -0,0 +1,10 @@
+Current date and Time = 2018-01-15T09:07:10.128
+
+Year changed = 2020-01-15T09:07:10.128
+Month changed = 2020-04-15T09:07:10.128
+Day changed = 2020-04-20T09:07:10.128
+Hour changed = 2020-04-20T10:07:10.128
+Min changed = 2020-04-20T10:17:10.128
+Sec changed = 2020-04-20T10:17:30.128
+NanoSec changed = 2020-04-20T10:17:30.128000050
+Week changed = 2020-05-11T10:17:30.128000050
diff --git a/BasicJava/LocalDateTimeDemo_plus_minus_unit/LocalDateTimeDemo/.classpath b/BasicJava/LocalDateTimeDemo_plus_minus_unit/LocalDateTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_plus_minus_unit/LocalDateTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/LocalDateTimeDemo_plus_minus_unit/LocalDateTimeDemo/.project b/BasicJava/LocalDateTimeDemo_plus_minus_unit/LocalDateTimeDemo/.project
new file mode 100644
index 000000000..f1fb898ca
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_plus_minus_unit/LocalDateTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ LocalDateTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/LocalDateTimeDemo_plus_minus_unit/LocalDateTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LocalDateTimeDemo_plus_minus_unit/LocalDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_plus_minus_unit/LocalDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/LocalDateTimeDemo_plus_minus_unit/LocalDateTimeDemo/bin/LocalDateTimeDemo.class b/BasicJava/LocalDateTimeDemo_plus_minus_unit/LocalDateTimeDemo/bin/LocalDateTimeDemo.class
new file mode 100644
index 000000000..ba9fac48e
Binary files /dev/null and b/BasicJava/LocalDateTimeDemo_plus_minus_unit/LocalDateTimeDemo/bin/LocalDateTimeDemo.class differ
diff --git a/BasicJava/LocalDateTimeDemo_plus_minus_unit/LocalDateTimeDemo/src/LocalDateTimeDemo.java b/BasicJava/LocalDateTimeDemo_plus_minus_unit/LocalDateTimeDemo/src/LocalDateTimeDemo.java
new file mode 100644
index 000000000..470d12b4c
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_plus_minus_unit/LocalDateTimeDemo/src/LocalDateTimeDemo.java
@@ -0,0 +1,48 @@
+import java.time.LocalDateTime;
+import java.time.temporal.ChronoUnit;
+
+public class LocalDateTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+ LocalDateTime currentDatetime = LocalDateTime.now();
+ System.out.println("currentDatetime= " + currentDatetime);
+
+ /*
+ * Parameters:
+ *
+ * amountToAdd - the amount of the unit to add to the result,
+ * may be negative
+ *
+ * unit - the unit of the amount to add, not null
+ *
+ * Returns:
+ *
+ * a LocalDateTime based on this date-time with the specified
+ * amount added, not null
+ */
+ LocalDateTime localDateTime2 = currentDatetime.plus(5,
+ ChronoUnit.MONTHS);
+ System.out.println("Month Added = " + localDateTime2);
+
+ /*
+ * Parameters:
+ *
+ * amountToSubtract - the amount of the unit to subtract from
+ * the result, may be negative
+ *
+ * unit - the unit of the amount to subtract, not null
+ *
+ * Returns:
+ *
+ * a LocalDateTime based on this date-time with the specified
+ * amount subtracted, not null
+ */
+
+ LocalDateTime localDateTime3 = currentDatetime.minus(5,
+ ChronoUnit.YEARS);
+ System.out.println("Years reduced = " + localDateTime3);
+ }
+
+}
diff --git a/BasicJava/LocalDateTimeDemo_plus_minus_unit/Output.txt b/BasicJava/LocalDateTimeDemo_plus_minus_unit/Output.txt
new file mode 100644
index 000000000..de8a0664b
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_plus_minus_unit/Output.txt
@@ -0,0 +1,3 @@
+currentDatetime= 2018-01-16T09:44:12.673
+Month Added = 2018-06-16T09:44:12.673
+Years reduced = 2013-01-16T09:44:12.673
diff --git a/BasicJava/LocalDateTimeDemo_range/LocalDateTimeDemo/.classpath b/BasicJava/LocalDateTimeDemo_range/LocalDateTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_range/LocalDateTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/LocalDateTimeDemo_range/LocalDateTimeDemo/.project b/BasicJava/LocalDateTimeDemo_range/LocalDateTimeDemo/.project
new file mode 100644
index 000000000..f1fb898ca
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_range/LocalDateTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ LocalDateTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/LocalDateTimeDemo_range/LocalDateTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LocalDateTimeDemo_range/LocalDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_range/LocalDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/LocalDateTimeDemo_range/LocalDateTimeDemo/bin/LocalDateTimeDemo.class b/BasicJava/LocalDateTimeDemo_range/LocalDateTimeDemo/bin/LocalDateTimeDemo.class
new file mode 100644
index 000000000..49641fbbb
Binary files /dev/null and b/BasicJava/LocalDateTimeDemo_range/LocalDateTimeDemo/bin/LocalDateTimeDemo.class differ
diff --git a/BasicJava/LocalDateTimeDemo_range/LocalDateTimeDemo/src/LocalDateTimeDemo.java b/BasicJava/LocalDateTimeDemo_range/LocalDateTimeDemo/src/LocalDateTimeDemo.java
new file mode 100644
index 000000000..ce395f12d
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_range/LocalDateTimeDemo/src/LocalDateTimeDemo.java
@@ -0,0 +1,37 @@
+import java.time.LocalDateTime;
+import java.time.temporal.ChronoField;
+import java.time.temporal.ValueRange;
+
+public class LocalDateTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+ LocalDateTime localDateTime = LocalDateTime
+ .parse("2018-12-03T10:15:30");
+
+ /*
+ * Parameters:
+ *
+ * field - the field to query the range for, not null
+ *
+ * Returns:
+ *
+ * the range of valid values for the field, not null
+ */
+ ValueRange valueRange = localDateTime.range(ChronoField.DAY_OF_YEAR);
+
+ System.out.println("Range : " + valueRange);
+ System.out.println("Min : " + valueRange.getMinimum());
+ System.out.println("Max : " + valueRange.getMaximum());
+
+ System.out.println("--------------------------------");
+
+ valueRange = localDateTime.range(ChronoField.MONTH_OF_YEAR);
+
+ System.out.println("Range : " + valueRange);
+ System.out.println("Min : " + valueRange.getMinimum());
+ System.out.println("Max : " + valueRange.getMaximum());
+ }
+
+}
diff --git a/BasicJava/LocalDateTimeDemo_range/Output.txt b/BasicJava/LocalDateTimeDemo_range/Output.txt
new file mode 100644
index 000000000..12d260ce9
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_range/Output.txt
@@ -0,0 +1,7 @@
+Range : 1 - 365
+Min : 1
+Max : 365
+--------------------------------
+Range : 1 - 12
+Min : 1
+Max : 12
diff --git a/BasicJava/LocalDateTimeDemo_toLocaldate_time/LocalDateTimeDemo/.classpath b/BasicJava/LocalDateTimeDemo_toLocaldate_time/LocalDateTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_toLocaldate_time/LocalDateTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/LocalDateTimeDemo_toLocaldate_time/LocalDateTimeDemo/.project b/BasicJava/LocalDateTimeDemo_toLocaldate_time/LocalDateTimeDemo/.project
new file mode 100644
index 000000000..f1fb898ca
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_toLocaldate_time/LocalDateTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ LocalDateTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/LocalDateTimeDemo_toLocaldate_time/LocalDateTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LocalDateTimeDemo_toLocaldate_time/LocalDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_toLocaldate_time/LocalDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/LocalDateTimeDemo_toLocaldate_time/LocalDateTimeDemo/bin/LocalDateTimeDemo.class b/BasicJava/LocalDateTimeDemo_toLocaldate_time/LocalDateTimeDemo/bin/LocalDateTimeDemo.class
new file mode 100644
index 000000000..654e2b5b6
Binary files /dev/null and b/BasicJava/LocalDateTimeDemo_toLocaldate_time/LocalDateTimeDemo/bin/LocalDateTimeDemo.class differ
diff --git a/BasicJava/LocalDateTimeDemo_toLocaldate_time/LocalDateTimeDemo/src/LocalDateTimeDemo.java b/BasicJava/LocalDateTimeDemo_toLocaldate_time/LocalDateTimeDemo/src/LocalDateTimeDemo.java
new file mode 100644
index 000000000..dff7e3822
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_toLocaldate_time/LocalDateTimeDemo/src/LocalDateTimeDemo.java
@@ -0,0 +1,28 @@
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.LocalTime;
+
+public class LocalDateTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+ LocalDateTime localDateTime = LocalDateTime.now();
+ System.out.println("localDateTime = " + localDateTime);
+
+
+ /*
+ * Returns the date part of this date-time, not null.
+ */
+ LocalDate localDate = localDateTime.toLocalDate();
+ System.out.println("localDate = " + localDate);
+
+ /*
+ * Returns the time part of this date-time, not null.
+ */
+ LocalTime localTime = localDateTime.toLocalTime();
+ System.out.println("localTime = " + localTime);
+
+ }
+
+}
diff --git a/BasicJava/LocalDateTimeDemo_toLocaldate_time/Output.txt b/BasicJava/LocalDateTimeDemo_toLocaldate_time/Output.txt
new file mode 100644
index 000000000..5b202f8d3
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_toLocaldate_time/Output.txt
@@ -0,0 +1,3 @@
+localDateTime = 2018-01-17T09:41:13.709
+localDate = 2018-01-17
+localTime = 09:41:13.709
diff --git a/BasicJava/LocalDateTimeDemo_truncatedto/LocalDateTimeDemo/.classpath b/BasicJava/LocalDateTimeDemo_truncatedto/LocalDateTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_truncatedto/LocalDateTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/LocalDateTimeDemo_truncatedto/LocalDateTimeDemo/.project b/BasicJava/LocalDateTimeDemo_truncatedto/LocalDateTimeDemo/.project
new file mode 100644
index 000000000..f1fb898ca
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_truncatedto/LocalDateTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ LocalDateTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/LocalDateTimeDemo_truncatedto/LocalDateTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LocalDateTimeDemo_truncatedto/LocalDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_truncatedto/LocalDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/LocalDateTimeDemo_truncatedto/LocalDateTimeDemo/bin/LocalDateTimeDemo.class b/BasicJava/LocalDateTimeDemo_truncatedto/LocalDateTimeDemo/bin/LocalDateTimeDemo.class
new file mode 100644
index 000000000..35d1c6e78
Binary files /dev/null and b/BasicJava/LocalDateTimeDemo_truncatedto/LocalDateTimeDemo/bin/LocalDateTimeDemo.class differ
diff --git a/BasicJava/LocalDateTimeDemo_truncatedto/LocalDateTimeDemo/src/LocalDateTimeDemo.java b/BasicJava/LocalDateTimeDemo_truncatedto/LocalDateTimeDemo/src/LocalDateTimeDemo.java
new file mode 100644
index 000000000..e6e95a333
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_truncatedto/LocalDateTimeDemo/src/LocalDateTimeDemo.java
@@ -0,0 +1,29 @@
+import java.time.LocalDateTime;
+import java.time.temporal.ChronoUnit;
+
+public class LocalDateTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+ LocalDateTime localDateTime1 = LocalDateTime.now();
+ System.out.println(localDateTime1);
+
+ /*
+ * Parameters:
+ *
+ * unit - the unit to truncate to, not null
+ *
+ * Returns:
+ *
+ * a LocalDateTime based on this date-time with the
+ * time truncated, not null
+ */
+ LocalDateTime localDateTime2 = localDateTime1
+ .truncatedTo(ChronoUnit.DAYS);
+
+ System.out.println(localDateTime2);
+
+ }
+
+}
diff --git a/BasicJava/LocalDateTimeDemo_truncatedto/Output.txt b/BasicJava/LocalDateTimeDemo_truncatedto/Output.txt
new file mode 100644
index 000000000..478897c8f
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_truncatedto/Output.txt
@@ -0,0 +1,2 @@
+2018-01-17T09:54:07.362
+2018-01-17T00:00
diff --git a/BasicJava/LocalDateTimeDemo_with/LocalDateTimeDemo/.classpath b/BasicJava/LocalDateTimeDemo_with/LocalDateTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_with/LocalDateTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/LocalDateTimeDemo_with/LocalDateTimeDemo/.project b/BasicJava/LocalDateTimeDemo_with/LocalDateTimeDemo/.project
new file mode 100644
index 000000000..f1fb898ca
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_with/LocalDateTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ LocalDateTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/LocalDateTimeDemo_with/LocalDateTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LocalDateTimeDemo_with/LocalDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_with/LocalDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/LocalDateTimeDemo_with/LocalDateTimeDemo/bin/LocalDateTimeDemo.class b/BasicJava/LocalDateTimeDemo_with/LocalDateTimeDemo/bin/LocalDateTimeDemo.class
new file mode 100644
index 000000000..69b2f56a4
Binary files /dev/null and b/BasicJava/LocalDateTimeDemo_with/LocalDateTimeDemo/bin/LocalDateTimeDemo.class differ
diff --git a/BasicJava/LocalDateTimeDemo_with/LocalDateTimeDemo/src/LocalDateTimeDemo.java b/BasicJava/LocalDateTimeDemo_with/LocalDateTimeDemo/src/LocalDateTimeDemo.java
new file mode 100644
index 000000000..27eaa7e77
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_with/LocalDateTimeDemo/src/LocalDateTimeDemo.java
@@ -0,0 +1,34 @@
+import java.time.LocalDateTime;
+
+public class LocalDateTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+ LocalDateTime localDateTime1 = LocalDateTime.parse("2017-01-03T20:25:30");
+ System.out.println("date and Time = "+localDateTime1);
+
+ LocalDateTime localDateTime2 = localDateTime1.withYear(2018);
+ System.out.println("\nYear changed = "+localDateTime2);
+
+ LocalDateTime localDateTime3 = localDateTime2.withMonth(10);
+ System.out.println("Month changed = "+localDateTime3);
+
+ LocalDateTime localDateTime4 = localDateTime3.withDayOfMonth(25);
+ System.out.println("Day changed = "+localDateTime4);
+
+ LocalDateTime localDateTime5 = localDateTime4.withHour(1);
+ System.out.println("Hour changed = "+localDateTime5);
+
+ LocalDateTime localDateTime6 = localDateTime5.withMinute(10);
+ System.out.println("Min changed = "+localDateTime6);
+
+ LocalDateTime localDateTime7 = localDateTime6.withSecond(20);
+ System.out.println("Sec changed = "+localDateTime7);
+
+ LocalDateTime localDateTime8 = localDateTime7.withNano(50);
+ System.out.println("NanoSec changed = "+localDateTime8);
+
+ }
+
+}
diff --git a/BasicJava/LocalDateTimeDemo_with/Output.txt b/BasicJava/LocalDateTimeDemo_with/Output.txt
new file mode 100644
index 000000000..504ef6404
--- /dev/null
+++ b/BasicJava/LocalDateTimeDemo_with/Output.txt
@@ -0,0 +1,9 @@
+date and Time = 2017-01-03T20:25:30
+
+Year changed = 2018-01-03T20:25:30
+Month changed = 2018-10-03T20:25:30
+Day changed = 2018-10-25T20:25:30
+Hour changed = 2018-10-25T01:25:30
+Min changed = 2018-10-25T01:10:30
+Sec changed = 2018-10-25T01:10:20
+NanoSec changed = 2018-10-25T01:10:20.000000050
diff --git a/BasicJava/LocalTimeDemo_Intro/LocalTimeDemo/.classpath b/BasicJava/LocalTimeDemo_Intro/LocalTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/LocalTimeDemo_Intro/LocalTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/LocalTimeDemo_Intro/LocalTimeDemo/.project b/BasicJava/LocalTimeDemo_Intro/LocalTimeDemo/.project
new file mode 100644
index 000000000..7b8fa740f
--- /dev/null
+++ b/BasicJava/LocalTimeDemo_Intro/LocalTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ LocalTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/LocalTimeDemo_Intro/LocalTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LocalTimeDemo_Intro/LocalTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/LocalTimeDemo_Intro/LocalTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/LocalTimeDemo_Intro/LocalTimeDemo/bin/LocalTimeDemo.class b/BasicJava/LocalTimeDemo_Intro/LocalTimeDemo/bin/LocalTimeDemo.class
new file mode 100644
index 000000000..ee2a29919
Binary files /dev/null and b/BasicJava/LocalTimeDemo_Intro/LocalTimeDemo/bin/LocalTimeDemo.class differ
diff --git a/BasicJava/LocalTimeDemo_Intro/LocalTimeDemo/src/LocalTimeDemo.java b/BasicJava/LocalTimeDemo_Intro/LocalTimeDemo/src/LocalTimeDemo.java
new file mode 100644
index 000000000..685b4532c
--- /dev/null
+++ b/BasicJava/LocalTimeDemo_Intro/LocalTimeDemo/src/LocalTimeDemo.java
@@ -0,0 +1,20 @@
+import java.time.LocalTime;
+
+public class LocalTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+ /*
+ * Returns:the current time using the system clock and default
+ * time-zone, not null
+ */
+ LocalTime time = LocalTime.now();
+ System.out.println(time);
+ System.out.println("Hour = "+time.getHour());
+ System.out.println("Min = "+time.getMinute());
+ System.out.println("Seonds = "+time.getSecond());
+ System.out.println("Nano = "+time.getNano());
+ }
+
+}
diff --git a/BasicJava/LocalTimeDemo_Intro/Output.txt b/BasicJava/LocalTimeDemo_Intro/Output.txt
new file mode 100644
index 000000000..6c9d30747
--- /dev/null
+++ b/BasicJava/LocalTimeDemo_Intro/Output.txt
@@ -0,0 +1,5 @@
+09:42:52.761
+Hour = 9
+Min = 42
+Seonds = 52
+Nano = 761000000
diff --git a/BasicJava/LocalTimeDemo_atDate/LocalTimeDemo/.classpath b/BasicJava/LocalTimeDemo_atDate/LocalTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/LocalTimeDemo_atDate/LocalTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/LocalTimeDemo_atDate/LocalTimeDemo/.project b/BasicJava/LocalTimeDemo_atDate/LocalTimeDemo/.project
new file mode 100644
index 000000000..7b8fa740f
--- /dev/null
+++ b/BasicJava/LocalTimeDemo_atDate/LocalTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ LocalTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/LocalTimeDemo_atDate/LocalTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LocalTimeDemo_atDate/LocalTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/LocalTimeDemo_atDate/LocalTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/LocalTimeDemo_atDate/LocalTimeDemo/bin/LocalTimeDemo.class b/BasicJava/LocalTimeDemo_atDate/LocalTimeDemo/bin/LocalTimeDemo.class
new file mode 100644
index 000000000..e26cc01ea
Binary files /dev/null and b/BasicJava/LocalTimeDemo_atDate/LocalTimeDemo/bin/LocalTimeDemo.class differ
diff --git a/BasicJava/LocalTimeDemo_atDate/LocalTimeDemo/src/LocalTimeDemo.java b/BasicJava/LocalTimeDemo_atDate/LocalTimeDemo/src/LocalTimeDemo.java
new file mode 100644
index 000000000..aef0badfb
--- /dev/null
+++ b/BasicJava/LocalTimeDemo_atDate/LocalTimeDemo/src/LocalTimeDemo.java
@@ -0,0 +1,31 @@
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.LocalTime;
+
+public class LocalTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+ LocalDate localDate = LocalDate.now();
+ System.out.println(localDate);
+
+ LocalTime localTime = LocalTime.parse("12:30:30");
+ System.out.println(localTime);
+
+ /*
+ * Parameters:
+ *
+ * date - the date to combine with, not null
+ *
+ * Returns:
+ *
+ * the local date-time formed from this time and the specified
+ * date, not null
+ */
+
+ LocalDateTime localDatetime = localTime.atDate(localDate);
+ System.out.println(localDatetime);
+ }
+
+}
diff --git a/BasicJava/LocalTimeDemo_atDate/Output.txt b/BasicJava/LocalTimeDemo_atDate/Output.txt
new file mode 100644
index 000000000..08a6dd3f0
--- /dev/null
+++ b/BasicJava/LocalTimeDemo_atDate/Output.txt
@@ -0,0 +1,3 @@
+2018-01-09
+12:30:30
+2018-01-09T12:30:30
diff --git a/BasicJava/LocalTimeDemo_compareTo_equals/LocalTimeDemo/.classpath b/BasicJava/LocalTimeDemo_compareTo_equals/LocalTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/LocalTimeDemo_compareTo_equals/LocalTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/LocalTimeDemo_compareTo_equals/LocalTimeDemo/.project b/BasicJava/LocalTimeDemo_compareTo_equals/LocalTimeDemo/.project
new file mode 100644
index 000000000..7b8fa740f
--- /dev/null
+++ b/BasicJava/LocalTimeDemo_compareTo_equals/LocalTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ LocalTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/LocalTimeDemo_compareTo_equals/LocalTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LocalTimeDemo_compareTo_equals/LocalTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/LocalTimeDemo_compareTo_equals/LocalTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/LocalTimeDemo_compareTo_equals/LocalTimeDemo/bin/LocalTimeDemo1.class b/BasicJava/LocalTimeDemo_compareTo_equals/LocalTimeDemo/bin/LocalTimeDemo1.class
new file mode 100644
index 000000000..5eeed2bfb
Binary files /dev/null and b/BasicJava/LocalTimeDemo_compareTo_equals/LocalTimeDemo/bin/LocalTimeDemo1.class differ
diff --git a/BasicJava/LocalTimeDemo_compareTo_equals/LocalTimeDemo/bin/LocalTimeDemo2.class b/BasicJava/LocalTimeDemo_compareTo_equals/LocalTimeDemo/bin/LocalTimeDemo2.class
new file mode 100644
index 000000000..aa99efd6c
Binary files /dev/null and b/BasicJava/LocalTimeDemo_compareTo_equals/LocalTimeDemo/bin/LocalTimeDemo2.class differ
diff --git a/BasicJava/LocalTimeDemo_compareTo_equals/LocalTimeDemo/src/LocalTimeDemo1.java b/BasicJava/LocalTimeDemo_compareTo_equals/LocalTimeDemo/src/LocalTimeDemo1.java
new file mode 100644
index 000000000..b303d383e
--- /dev/null
+++ b/BasicJava/LocalTimeDemo_compareTo_equals/LocalTimeDemo/src/LocalTimeDemo1.java
@@ -0,0 +1,28 @@
+import java.time.LocalTime;
+
+public class LocalTimeDemo1
+{
+
+ public static void main(String[] args)
+ {
+ LocalTime time1 = LocalTime.parse("05:30:30");
+ System.out.println(time1);
+
+ LocalTime time2 = LocalTime.parse("06:35:30");
+ System.out.println(time2);
+
+ /*
+ * Parameters:
+ *
+ * other - the other time to compare to, not null
+ *
+ * Returns:the comparator value, negative if less, positive if
+ * greater
+ */
+
+ int value = time1.compareTo(time2);
+
+ System.out.println(value);
+ }
+
+}
diff --git a/BasicJava/LocalTimeDemo_compareTo_equals/LocalTimeDemo/src/LocalTimeDemo2.java b/BasicJava/LocalTimeDemo_compareTo_equals/LocalTimeDemo/src/LocalTimeDemo2.java
new file mode 100644
index 000000000..eaf27bbba
--- /dev/null
+++ b/BasicJava/LocalTimeDemo_compareTo_equals/LocalTimeDemo/src/LocalTimeDemo2.java
@@ -0,0 +1,27 @@
+import java.time.LocalTime;
+
+public class LocalTimeDemo2
+{
+
+ public static void main(String[] args)
+ {
+ LocalTime time1 = LocalTime.parse("05:30:30");
+ System.out.println(time1);
+
+ LocalTime time2 = LocalTime.parse("05:30:30");
+ System.out.println(time2);
+
+ /*
+ * Parameters:
+ *
+ * obj - the object to check, null returns false
+ *
+ * Returns:true if this is equal to the other time
+ */
+
+ boolean value = time1.equals(time2);
+
+ System.out.println(value);
+ }
+
+}
diff --git a/BasicJava/LocalTimeDemo_compareTo_equals/LocalTimeDemo1_Output.txt b/BasicJava/LocalTimeDemo_compareTo_equals/LocalTimeDemo1_Output.txt
new file mode 100644
index 000000000..fc3e2ecc3
--- /dev/null
+++ b/BasicJava/LocalTimeDemo_compareTo_equals/LocalTimeDemo1_Output.txt
@@ -0,0 +1,3 @@
+05:30:30
+06:35:30
+-1
diff --git a/BasicJava/LocalTimeDemo_compareTo_equals/LocalTimeDemo2_Output.txt b/BasicJava/LocalTimeDemo_compareTo_equals/LocalTimeDemo2_Output.txt
new file mode 100644
index 000000000..e6934a99a
--- /dev/null
+++ b/BasicJava/LocalTimeDemo_compareTo_equals/LocalTimeDemo2_Output.txt
@@ -0,0 +1,3 @@
+05:30:30
+05:30:30
+true
diff --git a/BasicJava/LocalTimeDemo_minus_plus/LocalTimeDemo/.classpath b/BasicJava/LocalTimeDemo_minus_plus/LocalTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/LocalTimeDemo_minus_plus/LocalTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/LocalTimeDemo_minus_plus/LocalTimeDemo/.project b/BasicJava/LocalTimeDemo_minus_plus/LocalTimeDemo/.project
new file mode 100644
index 000000000..7b8fa740f
--- /dev/null
+++ b/BasicJava/LocalTimeDemo_minus_plus/LocalTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ LocalTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/LocalTimeDemo_minus_plus/LocalTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LocalTimeDemo_minus_plus/LocalTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/LocalTimeDemo_minus_plus/LocalTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/LocalTimeDemo_minus_plus/LocalTimeDemo/bin/LocalTimeDemo1.class b/BasicJava/LocalTimeDemo_minus_plus/LocalTimeDemo/bin/LocalTimeDemo1.class
new file mode 100644
index 000000000..3cc9ff3b1
Binary files /dev/null and b/BasicJava/LocalTimeDemo_minus_plus/LocalTimeDemo/bin/LocalTimeDemo1.class differ
diff --git a/BasicJava/LocalTimeDemo_minus_plus/LocalTimeDemo/bin/LocalTimeDemo2.class b/BasicJava/LocalTimeDemo_minus_plus/LocalTimeDemo/bin/LocalTimeDemo2.class
new file mode 100644
index 000000000..073348ed4
Binary files /dev/null and b/BasicJava/LocalTimeDemo_minus_plus/LocalTimeDemo/bin/LocalTimeDemo2.class differ
diff --git a/BasicJava/LocalTimeDemo_minus_plus/LocalTimeDemo/src/LocalTimeDemo1.java b/BasicJava/LocalTimeDemo_minus_plus/LocalTimeDemo/src/LocalTimeDemo1.java
new file mode 100644
index 000000000..a8d05b69e
--- /dev/null
+++ b/BasicJava/LocalTimeDemo_minus_plus/LocalTimeDemo/src/LocalTimeDemo1.java
@@ -0,0 +1,52 @@
+import java.time.LocalTime;
+
+public class LocalTimeDemo1
+{
+
+ public static void main(String[] args)
+ {
+ LocalTime time1 = LocalTime.now();
+ System.out.println("time1 = " + time1);
+ /*
+ * Parameters:
+ *
+ * hoursToSubtract - the hours to subtract, may be negative
+ *
+ * Returns:
+ *
+ * a LocalTime based on this time with the hours subtracted,
+ * not null
+ */
+ LocalTime time2 = time1.minusHours(2);
+ System.out.println("Hours Changed = " + time2);
+
+ /*
+ * Parameters:
+ *
+ * minutesToSubtract - the minutes to subtract, may be
+ * negative
+ *
+ * Returns:
+ *
+ * a LocalTime based on this time with the minutes subtracted,
+ * not null
+ */
+ LocalTime time3 = time1.minusMinutes(30);
+ System.out.println("Min Changed = " + time3);
+
+ /*
+ * Parameters:
+ *
+ * secondsToSubtract - the seconds to subtract, may be
+ * negative
+ *
+ * Returns:
+ *
+ * a LocalTime based on this time with the seconds subtracted,
+ * not null
+ */
+ LocalTime time4 = time1.minusSeconds(10);
+ System.out.println("Sec Changed = " + time4);
+ }
+
+}
diff --git a/BasicJava/LocalTimeDemo_minus_plus/LocalTimeDemo/src/LocalTimeDemo2.java b/BasicJava/LocalTimeDemo_minus_plus/LocalTimeDemo/src/LocalTimeDemo2.java
new file mode 100644
index 000000000..fa4eb1315
--- /dev/null
+++ b/BasicJava/LocalTimeDemo_minus_plus/LocalTimeDemo/src/LocalTimeDemo2.java
@@ -0,0 +1,51 @@
+import java.time.LocalTime;
+
+public class LocalTimeDemo2
+{
+
+ public static void main(String[] args)
+ {
+ LocalTime time1 = LocalTime.now();
+ System.out.println("time1 = " + time1);
+
+ /*
+ * Parameters:
+ *
+ * hoursToAdd - the hours to add, may be negative
+ *
+ * Returns:
+ *
+ * a LocalTime based on this time with the hours added, not
+ * null
+ */
+ LocalTime time2 = time1.plusHours(2);
+ System.out.println("Hours Changed = " + time2);
+
+ /*
+ * Parameters:
+ *
+ * minutesToAdd - the minutes to add, may be negative
+ *
+ * Returns:
+ *
+ * a LocalTime based on this time with the minutes added, not
+ * null
+ */
+ LocalTime time3 = time1.plusMinutes(30);
+ System.out.println("Min Changed = " + time3);
+
+ /*
+ * Parameters:
+ *
+ * secondstoAdd - the seconds to add, may be negative
+ *
+ * Returns:
+ *
+ * a LocalTime based on this time with the seconds added, not
+ * null
+ */
+ LocalTime time4 = time1.plusSeconds(10);
+ System.out.println("Sec Changed = " + time4);
+ }
+
+}
diff --git a/BasicJava/LocalTimeDemo_minus_plus/LocalTimeDemo1_Output.txt b/BasicJava/LocalTimeDemo_minus_plus/LocalTimeDemo1_Output.txt
new file mode 100644
index 000000000..0a6355d36
--- /dev/null
+++ b/BasicJava/LocalTimeDemo_minus_plus/LocalTimeDemo1_Output.txt
@@ -0,0 +1,4 @@
+time1 = 10:20:19.209
+Hours Changed = 08:20:19.209
+Min Changed = 09:50:19.209
+Sec Changed = 10:20:09.209
diff --git a/BasicJava/LocalTimeDemo_minus_plus/LocalTimeDemo2_Output.txt b/BasicJava/LocalTimeDemo_minus_plus/LocalTimeDemo2_Output.txt
new file mode 100644
index 000000000..45c0609c6
--- /dev/null
+++ b/BasicJava/LocalTimeDemo_minus_plus/LocalTimeDemo2_Output.txt
@@ -0,0 +1,4 @@
+time1 = 10:20:27.107
+Hours Changed = 12:20:27.107
+Min Changed = 10:50:27.107
+Sec Changed = 10:20:37.107
diff --git a/BasicJava/LocalTimeDemo_now_methods/LocalTimeDemo/.classpath b/BasicJava/LocalTimeDemo_now_methods/LocalTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/LocalTimeDemo_now_methods/LocalTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/LocalTimeDemo_now_methods/LocalTimeDemo/.project b/BasicJava/LocalTimeDemo_now_methods/LocalTimeDemo/.project
new file mode 100644
index 000000000..7b8fa740f
--- /dev/null
+++ b/BasicJava/LocalTimeDemo_now_methods/LocalTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ LocalTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/LocalTimeDemo_now_methods/LocalTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LocalTimeDemo_now_methods/LocalTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/LocalTimeDemo_now_methods/LocalTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/LocalTimeDemo_now_methods/LocalTimeDemo/bin/LocalTimeDemo1.class b/BasicJava/LocalTimeDemo_now_methods/LocalTimeDemo/bin/LocalTimeDemo1.class
new file mode 100644
index 000000000..63ab53825
Binary files /dev/null and b/BasicJava/LocalTimeDemo_now_methods/LocalTimeDemo/bin/LocalTimeDemo1.class differ
diff --git a/BasicJava/LocalTimeDemo_now_methods/LocalTimeDemo/bin/LocalTimeDemo2.class b/BasicJava/LocalTimeDemo_now_methods/LocalTimeDemo/bin/LocalTimeDemo2.class
new file mode 100644
index 000000000..25b81ccf4
Binary files /dev/null and b/BasicJava/LocalTimeDemo_now_methods/LocalTimeDemo/bin/LocalTimeDemo2.class differ
diff --git a/BasicJava/LocalTimeDemo_now_methods/LocalTimeDemo/src/LocalTimeDemo1.java b/BasicJava/LocalTimeDemo_now_methods/LocalTimeDemo/src/LocalTimeDemo1.java
new file mode 100644
index 000000000..fadd136c9
--- /dev/null
+++ b/BasicJava/LocalTimeDemo_now_methods/LocalTimeDemo/src/LocalTimeDemo1.java
@@ -0,0 +1,24 @@
+import java.time.Clock;
+import java.time.LocalTime;
+
+public class LocalTimeDemo1
+{
+
+ public static void main(String[] args)
+ {
+ Clock clock = Clock.systemUTC();
+
+ /*
+ * Parameters:
+ *
+ * clock - the clock to use, not null
+ *
+ * Returns:
+ *
+ * the current time, not null
+ */
+ LocalTime time = LocalTime.now(clock);
+ System.out.println(time);
+ }
+
+}
diff --git a/BasicJava/LocalTimeDemo_now_methods/LocalTimeDemo/src/LocalTimeDemo2.java b/BasicJava/LocalTimeDemo_now_methods/LocalTimeDemo/src/LocalTimeDemo2.java
new file mode 100644
index 000000000..bf2ddb611
--- /dev/null
+++ b/BasicJava/LocalTimeDemo_now_methods/LocalTimeDemo/src/LocalTimeDemo2.java
@@ -0,0 +1,25 @@
+import java.time.LocalTime;
+import java.time.ZoneId;
+
+public class LocalTimeDemo2
+{
+
+ public static void main(String[] args)
+ {
+ ZoneId zoneId = ZoneId.systemDefault();
+ System.out.println(zoneId);
+
+ /*
+ * Parameters:
+ *
+ * zone - the zone ID to use, not null
+ *
+ * Returns:
+ *
+ * the current time using the system clock, not null
+ */
+ LocalTime time = LocalTime.now(zoneId);
+ System.out.println(time);
+ }
+
+}
diff --git a/BasicJava/LocalTimeDemo_now_methods/LocalTimeDemo1_Output.txt b/BasicJava/LocalTimeDemo_now_methods/LocalTimeDemo1_Output.txt
new file mode 100644
index 000000000..ba900a1ab
--- /dev/null
+++ b/BasicJava/LocalTimeDemo_now_methods/LocalTimeDemo1_Output.txt
@@ -0,0 +1 @@
+04:59:41.320
diff --git a/BasicJava/LocalTimeDemo_now_methods/LocalTimeDemo2_Output.txt b/BasicJava/LocalTimeDemo_now_methods/LocalTimeDemo2_Output.txt
new file mode 100644
index 000000000..c58a4dea4
--- /dev/null
+++ b/BasicJava/LocalTimeDemo_now_methods/LocalTimeDemo2_Output.txt
@@ -0,0 +1,2 @@
+Asia/Calcutta
+10:29:51.536
diff --git a/BasicJava/LocalTimeDemo_now_zoneId/LocalTimeDemo/.classpath b/BasicJava/LocalTimeDemo_now_zoneId/LocalTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/LocalTimeDemo_now_zoneId/LocalTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/LocalTimeDemo_now_zoneId/LocalTimeDemo/.project b/BasicJava/LocalTimeDemo_now_zoneId/LocalTimeDemo/.project
new file mode 100644
index 000000000..7b8fa740f
--- /dev/null
+++ b/BasicJava/LocalTimeDemo_now_zoneId/LocalTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ LocalTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/LocalTimeDemo_now_zoneId/LocalTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LocalTimeDemo_now_zoneId/LocalTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/LocalTimeDemo_now_zoneId/LocalTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/LocalTimeDemo_now_zoneId/LocalTimeDemo/bin/LocalTimeDemo.class b/BasicJava/LocalTimeDemo_now_zoneId/LocalTimeDemo/bin/LocalTimeDemo.class
new file mode 100644
index 000000000..85d36420b
Binary files /dev/null and b/BasicJava/LocalTimeDemo_now_zoneId/LocalTimeDemo/bin/LocalTimeDemo.class differ
diff --git a/BasicJava/LocalTimeDemo_now_zoneId/LocalTimeDemo/src/LocalTimeDemo.java b/BasicJava/LocalTimeDemo_now_zoneId/LocalTimeDemo/src/LocalTimeDemo.java
new file mode 100644
index 000000000..7f567d9c3
--- /dev/null
+++ b/BasicJava/LocalTimeDemo_now_zoneId/LocalTimeDemo/src/LocalTimeDemo.java
@@ -0,0 +1,35 @@
+import java.time.LocalTime;
+import java.time.ZoneId;
+import java.time.temporal.ChronoUnit;
+
+public class LocalTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+ ZoneId zoneId1 = ZoneId.of("Asia/Kolkata");
+
+ /*
+ * Parameters:
+ *
+ * zone - the zone ID to use, not null
+ *
+ * Returns:
+ *
+ * the current time using the system clock, not null
+ */
+ LocalTime indiaTime = LocalTime.now(zoneId1);
+ System.out.println("indiaTime = " + indiaTime);
+
+ ZoneId zoneId2 = ZoneId.of("Asia/Bangkok");
+ LocalTime bangkokTime = LocalTime.now(zoneId2);
+ System.out.println("bangkokTime = " + bangkokTime);
+
+ long hours = ChronoUnit.HOURS.between(indiaTime, bangkokTime);
+ System.out.println("\nHours between two Time Zone = " + hours);
+
+ long minutes = ChronoUnit.MINUTES.between(indiaTime, bangkokTime);
+ System.out.println("Minutes between two time zone = " + minutes);
+ }
+
+}
diff --git a/BasicJava/LocalTimeDemo_now_zoneId/Output.txt b/BasicJava/LocalTimeDemo_now_zoneId/Output.txt
new file mode 100644
index 000000000..f1500eec4
--- /dev/null
+++ b/BasicJava/LocalTimeDemo_now_zoneId/Output.txt
@@ -0,0 +1,5 @@
+indiaTime = 09:22:58.690
+bangkokTime = 10:53:24.641
+
+Hours between two Time Zone = 1
+Minutes between two time zone = 90
diff --git a/BasicJava/LocalTimeDemo_of/LocalTimeDemo/.classpath b/BasicJava/LocalTimeDemo_of/LocalTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/LocalTimeDemo_of/LocalTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/LocalTimeDemo_of/LocalTimeDemo/.project b/BasicJava/LocalTimeDemo_of/LocalTimeDemo/.project
new file mode 100644
index 000000000..7b8fa740f
--- /dev/null
+++ b/BasicJava/LocalTimeDemo_of/LocalTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ LocalTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/LocalTimeDemo_of/LocalTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/LocalTimeDemo_of/LocalTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/LocalTimeDemo_of/LocalTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/LocalTimeDemo_of/LocalTimeDemo/bin/LocalTimeDemo.class b/BasicJava/LocalTimeDemo_of/LocalTimeDemo/bin/LocalTimeDemo.class
new file mode 100644
index 000000000..6efe6ee2c
Binary files /dev/null and b/BasicJava/LocalTimeDemo_of/LocalTimeDemo/bin/LocalTimeDemo.class differ
diff --git a/BasicJava/LocalTimeDemo_of/LocalTimeDemo/src/LocalTimeDemo.java b/BasicJava/LocalTimeDemo_of/LocalTimeDemo/src/LocalTimeDemo.java
new file mode 100644
index 000000000..36a460f68
--- /dev/null
+++ b/BasicJava/LocalTimeDemo_of/LocalTimeDemo/src/LocalTimeDemo.java
@@ -0,0 +1,23 @@
+import java.time.LocalTime;
+
+public class LocalTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+ /*
+ * Parameters:
+ *
+ * hour - the hour-of-day to represent, from 0 to 23
+ *
+ * minute - the minute-of-hour to represent, from 0 to 59
+ *
+ * second - the second-of-minute to represent, from 0 to 59
+ *
+ * Returns:the local time, not null
+ */
+ LocalTime time = LocalTime.of(8, 53, 56);
+ System.out.println(time);
+ }
+
+}
diff --git a/BasicJava/LocalTimeDemo_of/Output.txt b/BasicJava/LocalTimeDemo_of/Output.txt
new file mode 100644
index 000000000..bc9dcb09c
--- /dev/null
+++ b/BasicJava/LocalTimeDemo_of/Output.txt
@@ -0,0 +1 @@
+08:53:56
diff --git a/BasicJava/MonthDayDemo_Intro/MonthDayDemo/.classpath b/BasicJava/MonthDayDemo_Intro/MonthDayDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/MonthDayDemo_Intro/MonthDayDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/MonthDayDemo_Intro/MonthDayDemo/.project b/BasicJava/MonthDayDemo_Intro/MonthDayDemo/.project
new file mode 100644
index 000000000..38ae1b32b
--- /dev/null
+++ b/BasicJava/MonthDayDemo_Intro/MonthDayDemo/.project
@@ -0,0 +1,17 @@
+
+
+ MonthDayDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/MonthDayDemo_Intro/MonthDayDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/MonthDayDemo_Intro/MonthDayDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/MonthDayDemo_Intro/MonthDayDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/MonthDayDemo_Intro/MonthDayDemo/bin/MonthDayDemo.class b/BasicJava/MonthDayDemo_Intro/MonthDayDemo/bin/MonthDayDemo.class
new file mode 100644
index 000000000..e76feb008
Binary files /dev/null and b/BasicJava/MonthDayDemo_Intro/MonthDayDemo/bin/MonthDayDemo.class differ
diff --git a/BasicJava/MonthDayDemo_Intro/MonthDayDemo/src/MonthDayDemo.java b/BasicJava/MonthDayDemo_Intro/MonthDayDemo/src/MonthDayDemo.java
new file mode 100644
index 000000000..5d7896541
--- /dev/null
+++ b/BasicJava/MonthDayDemo_Intro/MonthDayDemo/src/MonthDayDemo.java
@@ -0,0 +1,32 @@
+import java.time.MonthDay;
+
+public class MonthDayDemo
+{
+
+ public static void main(String[] args)
+ {
+
+ /*
+ * Returns:
+ *
+ * the current month-day using the system clock and
+ * default time-zone, not null
+ */
+ MonthDay currentMonthDay = MonthDay.now();
+ System.out.println(currentMonthDay);
+
+ /*
+ * Parameters:
+ *
+ * text - the text to parse such as "--12-03", not null
+ *
+ * Returns:
+ *
+ * the parsed month-day, not null
+ */
+
+ MonthDay monthDay = MonthDay.parse("--03-30");
+ System.out.println(monthDay);
+ }
+
+}
diff --git a/BasicJava/MonthDayDemo_Intro/Output.txt b/BasicJava/MonthDayDemo_Intro/Output.txt
new file mode 100644
index 000000000..85ce53f71
--- /dev/null
+++ b/BasicJava/MonthDayDemo_Intro/Output.txt
@@ -0,0 +1,2 @@
+--01-18
+--03-30
diff --git a/BasicJava/MonthDayDemo_atYear/MonthDayDemo/.classpath b/BasicJava/MonthDayDemo_atYear/MonthDayDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/MonthDayDemo_atYear/MonthDayDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/MonthDayDemo_atYear/MonthDayDemo/.project b/BasicJava/MonthDayDemo_atYear/MonthDayDemo/.project
new file mode 100644
index 000000000..38ae1b32b
--- /dev/null
+++ b/BasicJava/MonthDayDemo_atYear/MonthDayDemo/.project
@@ -0,0 +1,17 @@
+
+
+ MonthDayDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/MonthDayDemo_atYear/MonthDayDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/MonthDayDemo_atYear/MonthDayDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/MonthDayDemo_atYear/MonthDayDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/MonthDayDemo_atYear/MonthDayDemo/bin/MonthDayDemo.class b/BasicJava/MonthDayDemo_atYear/MonthDayDemo/bin/MonthDayDemo.class
new file mode 100644
index 000000000..4683dccbe
Binary files /dev/null and b/BasicJava/MonthDayDemo_atYear/MonthDayDemo/bin/MonthDayDemo.class differ
diff --git a/BasicJava/MonthDayDemo_atYear/MonthDayDemo/src/MonthDayDemo.java b/BasicJava/MonthDayDemo_atYear/MonthDayDemo/src/MonthDayDemo.java
new file mode 100644
index 000000000..533a768e1
--- /dev/null
+++ b/BasicJava/MonthDayDemo_atYear/MonthDayDemo/src/MonthDayDemo.java
@@ -0,0 +1,25 @@
+import java.time.LocalDate;
+import java.time.MonthDay;
+
+public class MonthDayDemo
+{
+
+ public static void main(String[] args)
+ {
+ MonthDay monthDay = MonthDay.now();
+ System.out.println(monthDay);
+
+ /*
+ * Parameters:
+ *
+ * year - the year to use, from MIN_YEAR to MAX_YEAR
+ *
+ * Returns:
+ *
+ * the local date formed from this month-day and the
+ * specified year, not null
+ */
+ LocalDate localDate = monthDay.atYear(2013);
+ System.out.println(localDate);
+ }
+}
diff --git a/BasicJava/MonthDayDemo_atYear/Output.txt b/BasicJava/MonthDayDemo_atYear/Output.txt
new file mode 100644
index 000000000..1fccc06db
--- /dev/null
+++ b/BasicJava/MonthDayDemo_atYear/Output.txt
@@ -0,0 +1,2 @@
+--01-18
+2013-01-18
diff --git a/BasicJava/MonthDayDemo_format/MonthDayDemo/.classpath b/BasicJava/MonthDayDemo_format/MonthDayDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/MonthDayDemo_format/MonthDayDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/MonthDayDemo_format/MonthDayDemo/.project b/BasicJava/MonthDayDemo_format/MonthDayDemo/.project
new file mode 100644
index 000000000..38ae1b32b
--- /dev/null
+++ b/BasicJava/MonthDayDemo_format/MonthDayDemo/.project
@@ -0,0 +1,17 @@
+
+
+ MonthDayDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/MonthDayDemo_format/MonthDayDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/MonthDayDemo_format/MonthDayDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/MonthDayDemo_format/MonthDayDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/MonthDayDemo_format/MonthDayDemo/bin/MonthDayDemo.class b/BasicJava/MonthDayDemo_format/MonthDayDemo/bin/MonthDayDemo.class
new file mode 100644
index 000000000..ce80bea58
Binary files /dev/null and b/BasicJava/MonthDayDemo_format/MonthDayDemo/bin/MonthDayDemo.class differ
diff --git a/BasicJava/MonthDayDemo_format/MonthDayDemo/src/MonthDayDemo.java b/BasicJava/MonthDayDemo_format/MonthDayDemo/src/MonthDayDemo.java
new file mode 100644
index 000000000..0333bee8e
--- /dev/null
+++ b/BasicJava/MonthDayDemo_format/MonthDayDemo/src/MonthDayDemo.java
@@ -0,0 +1,36 @@
+import java.time.MonthDay;
+import java.time.format.DateTimeFormatter;
+
+public class MonthDayDemo
+{
+
+ public static void main(String[] args)
+ {
+ MonthDay monthDay = MonthDay.parse("--12-30");
+ System.out.println(monthDay);
+
+ /*
+ * Parameters:
+ *
+ * pattern - the pattern to use, not null
+ *
+ * Returns:
+ *
+ * the formatter based on the pattern, not null
+ *
+ */
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("--MM");
+
+ /*
+ * Parameters:
+ *
+ * formatter - the formatter to use, not null
+ *
+ * Returns:the formatted month-day string, not null
+ */
+
+ String formatedValue = monthDay.format(formatter);
+ System.out.println(formatedValue);
+ }
+
+}
diff --git a/BasicJava/MonthDayDemo_format/Output.txt b/BasicJava/MonthDayDemo_format/Output.txt
new file mode 100644
index 000000000..8f9937a74
--- /dev/null
+++ b/BasicJava/MonthDayDemo_format/Output.txt
@@ -0,0 +1,2 @@
+--12-30
+--12
diff --git a/BasicJava/MonthDayDemo_from/MonthDayDemo/.classpath b/BasicJava/MonthDayDemo_from/MonthDayDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/MonthDayDemo_from/MonthDayDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/MonthDayDemo_from/MonthDayDemo/.project b/BasicJava/MonthDayDemo_from/MonthDayDemo/.project
new file mode 100644
index 000000000..38ae1b32b
--- /dev/null
+++ b/BasicJava/MonthDayDemo_from/MonthDayDemo/.project
@@ -0,0 +1,17 @@
+
+
+ MonthDayDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/MonthDayDemo_from/MonthDayDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/MonthDayDemo_from/MonthDayDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/MonthDayDemo_from/MonthDayDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/MonthDayDemo_from/MonthDayDemo/bin/MonthDayDemo.class b/BasicJava/MonthDayDemo_from/MonthDayDemo/bin/MonthDayDemo.class
new file mode 100644
index 000000000..360042fc2
Binary files /dev/null and b/BasicJava/MonthDayDemo_from/MonthDayDemo/bin/MonthDayDemo.class differ
diff --git a/BasicJava/MonthDayDemo_from/MonthDayDemo/src/MonthDayDemo.java b/BasicJava/MonthDayDemo_from/MonthDayDemo/src/MonthDayDemo.java
new file mode 100644
index 000000000..8ac141bde
--- /dev/null
+++ b/BasicJava/MonthDayDemo_from/MonthDayDemo/src/MonthDayDemo.java
@@ -0,0 +1,23 @@
+import java.time.MonthDay;
+import java.time.ZonedDateTime;
+
+public class MonthDayDemo
+{
+
+ public static void main(String[] args)
+ {
+
+ ZonedDateTime zonedDateTime = ZonedDateTime.now();
+ System.out.println(zonedDateTime);
+ /*
+ * Parameters:
+ *
+ * temporal - the temporal object to convert, not null
+ *
+ * Returns:the month-day, not null
+ */
+ MonthDay monthDay = MonthDay.from(zonedDateTime);
+ System.out.println(monthDay);
+ }
+
+}
diff --git a/BasicJava/MonthDayDemo_from/Output.txt b/BasicJava/MonthDayDemo_from/Output.txt
new file mode 100644
index 000000000..578b830ef
--- /dev/null
+++ b/BasicJava/MonthDayDemo_from/Output.txt
@@ -0,0 +1,2 @@
+2018-01-19T09:18:45.949+05:30[Asia/Calcutta]
+--01-19
diff --git a/BasicJava/MonthDayDemo_get_field/MonthDayDemo/.classpath b/BasicJava/MonthDayDemo_get_field/MonthDayDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/MonthDayDemo_get_field/MonthDayDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/MonthDayDemo_get_field/MonthDayDemo/.project b/BasicJava/MonthDayDemo_get_field/MonthDayDemo/.project
new file mode 100644
index 000000000..38ae1b32b
--- /dev/null
+++ b/BasicJava/MonthDayDemo_get_field/MonthDayDemo/.project
@@ -0,0 +1,17 @@
+
+
+ MonthDayDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/MonthDayDemo_get_field/MonthDayDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/MonthDayDemo_get_field/MonthDayDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/MonthDayDemo_get_field/MonthDayDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/MonthDayDemo_get_field/MonthDayDemo/bin/MonthDayDemo.class b/BasicJava/MonthDayDemo_get_field/MonthDayDemo/bin/MonthDayDemo.class
new file mode 100644
index 000000000..ce17772b6
Binary files /dev/null and b/BasicJava/MonthDayDemo_get_field/MonthDayDemo/bin/MonthDayDemo.class differ
diff --git a/BasicJava/MonthDayDemo_get_field/MonthDayDemo/src/MonthDayDemo.java b/BasicJava/MonthDayDemo_get_field/MonthDayDemo/src/MonthDayDemo.java
new file mode 100644
index 000000000..8244723de
--- /dev/null
+++ b/BasicJava/MonthDayDemo_get_field/MonthDayDemo/src/MonthDayDemo.java
@@ -0,0 +1,30 @@
+import java.time.MonthDay;
+import java.time.temporal.ChronoField;
+
+public class MonthDayDemo
+{
+
+ public static void main(String[] args)
+ {
+ MonthDay monthDay = MonthDay.now();
+ System.out.println(monthDay);
+
+ /*
+ * Parameters:
+ *
+ * field - the field to get, not null
+ *
+ * Returns:
+ *
+ * the value for the field
+ */
+
+ int monthOfYear = monthDay.get(ChronoField.MONTH_OF_YEAR);
+ System.out.println("monthOfYear = " + monthOfYear);
+
+ int dayOfMonth = monthDay.get(ChronoField.DAY_OF_MONTH);
+ System.out.println("dayOfMonth = " + dayOfMonth);
+
+ }
+
+}
diff --git a/BasicJava/MonthDayDemo_get_field/Output.txt b/BasicJava/MonthDayDemo_get_field/Output.txt
new file mode 100644
index 000000000..67a287437
--- /dev/null
+++ b/BasicJava/MonthDayDemo_get_field/Output.txt
@@ -0,0 +1,3 @@
+--01-19
+monthOfYear = 1
+dayOfMonth = 19
diff --git a/BasicJava/MonthDayDemo_getmonth_day/MonthDayDemo/.classpath b/BasicJava/MonthDayDemo_getmonth_day/MonthDayDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/MonthDayDemo_getmonth_day/MonthDayDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/MonthDayDemo_getmonth_day/MonthDayDemo/.project b/BasicJava/MonthDayDemo_getmonth_day/MonthDayDemo/.project
new file mode 100644
index 000000000..38ae1b32b
--- /dev/null
+++ b/BasicJava/MonthDayDemo_getmonth_day/MonthDayDemo/.project
@@ -0,0 +1,17 @@
+
+
+ MonthDayDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/MonthDayDemo_getmonth_day/MonthDayDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/MonthDayDemo_getmonth_day/MonthDayDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/MonthDayDemo_getmonth_day/MonthDayDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/MonthDayDemo_getmonth_day/MonthDayDemo/bin/MonthDayDemo.class b/BasicJava/MonthDayDemo_getmonth_day/MonthDayDemo/bin/MonthDayDemo.class
new file mode 100644
index 000000000..a619e6e57
Binary files /dev/null and b/BasicJava/MonthDayDemo_getmonth_day/MonthDayDemo/bin/MonthDayDemo.class differ
diff --git a/BasicJava/MonthDayDemo_getmonth_day/MonthDayDemo/src/MonthDayDemo.java b/BasicJava/MonthDayDemo_getmonth_day/MonthDayDemo/src/MonthDayDemo.java
new file mode 100644
index 000000000..c55e40b90
--- /dev/null
+++ b/BasicJava/MonthDayDemo_getmonth_day/MonthDayDemo/src/MonthDayDemo.java
@@ -0,0 +1,37 @@
+import java.time.Month;
+import java.time.MonthDay;
+
+public class MonthDayDemo
+{
+
+ public static void main(String[] args)
+ {
+ /*
+ * Returns:the current month-day using the system clock and
+ * default time-zone, not null
+ */
+ MonthDay monthDay = MonthDay.now();
+ System.out.println("monthDay = " + monthDay);
+
+ /*
+ * Returns:the day-of-month, from 1 to 31
+ */
+ int dayOfTheMonth = monthDay.getDayOfMonth();
+ System.out.println("dayOfTheMonth = " + dayOfTheMonth);
+
+ /*
+ * Returns:the month-of-year, from 1 to 12
+ */
+ int monthValue = monthDay.getMonthValue();
+ System.out.println("monthValue = " + monthValue);
+
+ /*
+ * Returns:the month-of-year, not null
+ */
+ Month month = monthDay.getMonth();
+ System.out.println("month = " + month);
+ System.out.println("month value = " + month.getValue());
+
+ }
+
+}
diff --git a/BasicJava/MonthDayDemo_getmonth_day/Output.txt b/BasicJava/MonthDayDemo_getmonth_day/Output.txt
new file mode 100644
index 000000000..08bf106ef
--- /dev/null
+++ b/BasicJava/MonthDayDemo_getmonth_day/Output.txt
@@ -0,0 +1,5 @@
+monthDay = --01-18
+dayOfTheMonth = 18
+monthValue = 1
+month = JANUARY
+month value = 1
diff --git a/BasicJava/MonthDayDemo_isAfter_before/MonthDayDemo/.classpath b/BasicJava/MonthDayDemo_isAfter_before/MonthDayDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/MonthDayDemo_isAfter_before/MonthDayDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/MonthDayDemo_isAfter_before/MonthDayDemo/.project b/BasicJava/MonthDayDemo_isAfter_before/MonthDayDemo/.project
new file mode 100644
index 000000000..38ae1b32b
--- /dev/null
+++ b/BasicJava/MonthDayDemo_isAfter_before/MonthDayDemo/.project
@@ -0,0 +1,17 @@
+
+
+ MonthDayDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/MonthDayDemo_isAfter_before/MonthDayDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/MonthDayDemo_isAfter_before/MonthDayDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/MonthDayDemo_isAfter_before/MonthDayDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/MonthDayDemo_isAfter_before/MonthDayDemo/bin/MonthDayDemo.class b/BasicJava/MonthDayDemo_isAfter_before/MonthDayDemo/bin/MonthDayDemo.class
new file mode 100644
index 000000000..3e41d8ae7
Binary files /dev/null and b/BasicJava/MonthDayDemo_isAfter_before/MonthDayDemo/bin/MonthDayDemo.class differ
diff --git a/BasicJava/MonthDayDemo_isAfter_before/MonthDayDemo/src/MonthDayDemo.java b/BasicJava/MonthDayDemo_isAfter_before/MonthDayDemo/src/MonthDayDemo.java
new file mode 100644
index 000000000..ece7f180f
--- /dev/null
+++ b/BasicJava/MonthDayDemo_isAfter_before/MonthDayDemo/src/MonthDayDemo.java
@@ -0,0 +1,45 @@
+import java.time.MonthDay;
+
+public class MonthDayDemo
+{
+
+ public static void main(String[] args)
+ {
+ MonthDay monthDay1 = MonthDay.parse("--12-30");
+ MonthDay monthDay2 = MonthDay.parse("--02-20");
+
+ /*
+ * Parameters:
+ *
+ * other - the other month-day to compare to, not null
+ *
+ * Returns:
+ *
+ * true if this is after the specified month-day
+ */
+
+ System.out.println(monthDay1.isAfter(monthDay2));
+ /*
+ * Parameters:
+ *
+ * other - the other month-day to compare to, not null
+ *
+ * Returns:
+ *
+ * true if this point is before the specified month-day
+ */
+ System.out.println(monthDay1.isBefore(monthDay2));
+ /*
+ * Parameters:
+ *
+ * obj - the object to check, null returns false
+ *
+ * Returns:
+ *
+ * true if this is equal to the other month-day
+ *
+ */
+ System.out.println(monthDay1.equals(monthDay2));
+ }
+
+}
diff --git a/BasicJava/MonthDayDemo_isAfter_before/Output.txt b/BasicJava/MonthDayDemo_isAfter_before/Output.txt
new file mode 100644
index 000000000..36bc6136b
--- /dev/null
+++ b/BasicJava/MonthDayDemo_isAfter_before/Output.txt
@@ -0,0 +1,3 @@
+true
+false
+false
diff --git a/BasicJava/MonthDayDemo_isValidYear/MonthDayDemo/.classpath b/BasicJava/MonthDayDemo_isValidYear/MonthDayDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/MonthDayDemo_isValidYear/MonthDayDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/MonthDayDemo_isValidYear/MonthDayDemo/.project b/BasicJava/MonthDayDemo_isValidYear/MonthDayDemo/.project
new file mode 100644
index 000000000..38ae1b32b
--- /dev/null
+++ b/BasicJava/MonthDayDemo_isValidYear/MonthDayDemo/.project
@@ -0,0 +1,17 @@
+
+
+ MonthDayDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/MonthDayDemo_isValidYear/MonthDayDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/MonthDayDemo_isValidYear/MonthDayDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/MonthDayDemo_isValidYear/MonthDayDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/MonthDayDemo_isValidYear/MonthDayDemo/bin/MonthDayDemo.class b/BasicJava/MonthDayDemo_isValidYear/MonthDayDemo/bin/MonthDayDemo.class
new file mode 100644
index 000000000..1425c0f8f
Binary files /dev/null and b/BasicJava/MonthDayDemo_isValidYear/MonthDayDemo/bin/MonthDayDemo.class differ
diff --git a/BasicJava/MonthDayDemo_isValidYear/MonthDayDemo/src/MonthDayDemo.java b/BasicJava/MonthDayDemo_isValidYear/MonthDayDemo/src/MonthDayDemo.java
new file mode 100644
index 000000000..81dae5eee
--- /dev/null
+++ b/BasicJava/MonthDayDemo_isValidYear/MonthDayDemo/src/MonthDayDemo.java
@@ -0,0 +1,30 @@
+import java.time.MonthDay;
+
+public class MonthDayDemo
+{
+
+ public static void main(String[] args)
+ {
+ MonthDay monthDay = MonthDay.parse("--02-29");
+ System.out.println(monthDay);
+
+ /*
+ * Parameters:
+ *
+ * year - the year to validate
+ *
+ * Returns:
+ *
+ * true if the year is valid for this month-day
+ */
+ boolean isYearValid = monthDay.isValidYear(2000);
+ System.out.println(
+ "is --02-29 valid for the year 2000 ? = " + isYearValid);
+
+ isYearValid = monthDay.isValidYear(2017);
+ System.out.println(
+ "is --02-29 valid for the year 2017 ? = " + isYearValid);
+
+ }
+
+}
diff --git a/BasicJava/MonthDayDemo_isValidYear/Output.txt b/BasicJava/MonthDayDemo_isValidYear/Output.txt
new file mode 100644
index 000000000..330d20965
--- /dev/null
+++ b/BasicJava/MonthDayDemo_isValidYear/Output.txt
@@ -0,0 +1,3 @@
+--02-29
+is --02-29 valid for the year 2000 ? = true
+is --02-29 valid for the year 2017 ? = false
diff --git a/BasicJava/MonthDayDemo_now_clock_zoneid/MonthDayDemo/.classpath b/BasicJava/MonthDayDemo_now_clock_zoneid/MonthDayDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/MonthDayDemo_now_clock_zoneid/MonthDayDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/MonthDayDemo_now_clock_zoneid/MonthDayDemo/.project b/BasicJava/MonthDayDemo_now_clock_zoneid/MonthDayDemo/.project
new file mode 100644
index 000000000..38ae1b32b
--- /dev/null
+++ b/BasicJava/MonthDayDemo_now_clock_zoneid/MonthDayDemo/.project
@@ -0,0 +1,17 @@
+
+
+ MonthDayDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/MonthDayDemo_now_clock_zoneid/MonthDayDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/MonthDayDemo_now_clock_zoneid/MonthDayDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/MonthDayDemo_now_clock_zoneid/MonthDayDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/MonthDayDemo_now_clock_zoneid/MonthDayDemo/bin/MonthDayDemo1.class b/BasicJava/MonthDayDemo_now_clock_zoneid/MonthDayDemo/bin/MonthDayDemo1.class
new file mode 100644
index 000000000..e0fb6deff
Binary files /dev/null and b/BasicJava/MonthDayDemo_now_clock_zoneid/MonthDayDemo/bin/MonthDayDemo1.class differ
diff --git a/BasicJava/MonthDayDemo_now_clock_zoneid/MonthDayDemo/bin/MonthDayDemo2.class b/BasicJava/MonthDayDemo_now_clock_zoneid/MonthDayDemo/bin/MonthDayDemo2.class
new file mode 100644
index 000000000..e7ccfb03a
Binary files /dev/null and b/BasicJava/MonthDayDemo_now_clock_zoneid/MonthDayDemo/bin/MonthDayDemo2.class differ
diff --git a/BasicJava/MonthDayDemo_now_clock_zoneid/MonthDayDemo/src/MonthDayDemo1.java b/BasicJava/MonthDayDemo_now_clock_zoneid/MonthDayDemo/src/MonthDayDemo1.java
new file mode 100644
index 000000000..29125563e
--- /dev/null
+++ b/BasicJava/MonthDayDemo_now_clock_zoneid/MonthDayDemo/src/MonthDayDemo1.java
@@ -0,0 +1,24 @@
+import java.time.Clock;
+import java.time.MonthDay;
+
+public class MonthDayDemo1
+{
+ public static void main(String[] args)
+ {
+ Clock clock = Clock.systemUTC();
+ System.out.println(clock);
+ /*
+ * Parameters:
+ *
+ * clock - the clock to use, not null
+ *
+ * Returns:
+ *
+ * the current month-day, not null
+ */
+ MonthDay monthDay = MonthDay.now(clock);
+ System.out.println(monthDay);
+
+ }
+
+}
diff --git a/BasicJava/MonthDayDemo_now_clock_zoneid/MonthDayDemo/src/MonthDayDemo2.java b/BasicJava/MonthDayDemo_now_clock_zoneid/MonthDayDemo/src/MonthDayDemo2.java
new file mode 100644
index 000000000..3acb1fad9
--- /dev/null
+++ b/BasicJava/MonthDayDemo_now_clock_zoneid/MonthDayDemo/src/MonthDayDemo2.java
@@ -0,0 +1,25 @@
+import java.time.MonthDay;
+import java.time.ZoneId;
+
+public class MonthDayDemo2
+{
+ public static void main(String[] args)
+ {
+
+ ZoneId zoneId = ZoneId.systemDefault();
+ System.out.println(zoneId);
+ /*
+ * Parameters:
+ *
+ * zone - the zone ID to use, not null
+ *
+ * Returns:
+ *
+ * the current month-day using the system clock, not
+ * null
+ */
+ MonthDay monthDay = MonthDay.now(zoneId);
+ System.out.println(monthDay);
+ }
+
+}
diff --git a/BasicJava/MonthDayDemo_now_clock_zoneid/MonthDayDemo1_Output.txt b/BasicJava/MonthDayDemo_now_clock_zoneid/MonthDayDemo1_Output.txt
new file mode 100644
index 000000000..40061c3b5
--- /dev/null
+++ b/BasicJava/MonthDayDemo_now_clock_zoneid/MonthDayDemo1_Output.txt
@@ -0,0 +1,2 @@
+SystemClock[Z]
+--01-23
diff --git a/BasicJava/MonthDayDemo_now_clock_zoneid/MonthDayDemo2_Output.txt b/BasicJava/MonthDayDemo_now_clock_zoneid/MonthDayDemo2_Output.txt
new file mode 100644
index 000000000..5fc6eb5f9
--- /dev/null
+++ b/BasicJava/MonthDayDemo_now_clock_zoneid/MonthDayDemo2_Output.txt
@@ -0,0 +1,2 @@
+Asia/Calcutta
+--01-23
diff --git a/BasicJava/MonthDayDemo_of/MonthDayDemo/.classpath b/BasicJava/MonthDayDemo_of/MonthDayDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/MonthDayDemo_of/MonthDayDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/MonthDayDemo_of/MonthDayDemo/.project b/BasicJava/MonthDayDemo_of/MonthDayDemo/.project
new file mode 100644
index 000000000..38ae1b32b
--- /dev/null
+++ b/BasicJava/MonthDayDemo_of/MonthDayDemo/.project
@@ -0,0 +1,17 @@
+
+
+ MonthDayDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/MonthDayDemo_of/MonthDayDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/MonthDayDemo_of/MonthDayDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/MonthDayDemo_of/MonthDayDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/MonthDayDemo_of/MonthDayDemo/bin/MonthDayDemo.class b/BasicJava/MonthDayDemo_of/MonthDayDemo/bin/MonthDayDemo.class
new file mode 100644
index 000000000..75d681864
Binary files /dev/null and b/BasicJava/MonthDayDemo_of/MonthDayDemo/bin/MonthDayDemo.class differ
diff --git a/BasicJava/MonthDayDemo_of/MonthDayDemo/src/MonthDayDemo.java b/BasicJava/MonthDayDemo_of/MonthDayDemo/src/MonthDayDemo.java
new file mode 100644
index 000000000..4942b7f64
--- /dev/null
+++ b/BasicJava/MonthDayDemo_of/MonthDayDemo/src/MonthDayDemo.java
@@ -0,0 +1,36 @@
+import java.time.Month;
+import java.time.MonthDay;
+
+public class MonthDayDemo
+{
+
+ public static void main(String[] args)
+ {
+
+ /*
+ * Parameters:
+ *
+ * month - the month-of-year to represent, from 1 (January) to
+ * 12 (December)
+ *
+ * dayOfMonth - the day-of-month to represent, from 1 to
+ * 31Returns:the month-day, not null
+ */
+ MonthDay monthDay1 = MonthDay.of(9, 30);
+ System.out.println(monthDay1);
+
+ /*
+ *
+ * Parameters:
+ *
+ * month - the month-of-year to represent, not null
+ *
+ * dayOfMonth - the day-of-month to represent, from 1 to 31
+ *
+ * Returns:the month-day, not null
+ */
+ MonthDay monthDay2 = MonthDay.of(Month.JULY, 30);
+ System.out.println(monthDay2);
+ }
+
+}
diff --git a/BasicJava/MonthDayDemo_of/Output.txt b/BasicJava/MonthDayDemo_of/Output.txt
new file mode 100644
index 000000000..7e3e377f6
--- /dev/null
+++ b/BasicJava/MonthDayDemo_of/Output.txt
@@ -0,0 +1,2 @@
+--09-30
+--07-30
diff --git a/BasicJava/MonthDayDemo_parse/MonthDayDemo/.classpath b/BasicJava/MonthDayDemo_parse/MonthDayDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/MonthDayDemo_parse/MonthDayDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/MonthDayDemo_parse/MonthDayDemo/.project b/BasicJava/MonthDayDemo_parse/MonthDayDemo/.project
new file mode 100644
index 000000000..38ae1b32b
--- /dev/null
+++ b/BasicJava/MonthDayDemo_parse/MonthDayDemo/.project
@@ -0,0 +1,17 @@
+
+
+ MonthDayDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/MonthDayDemo_parse/MonthDayDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/MonthDayDemo_parse/MonthDayDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/MonthDayDemo_parse/MonthDayDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/MonthDayDemo_parse/MonthDayDemo/bin/MonthDayDemo.class b/BasicJava/MonthDayDemo_parse/MonthDayDemo/bin/MonthDayDemo.class
new file mode 100644
index 000000000..b4acd3e60
Binary files /dev/null and b/BasicJava/MonthDayDemo_parse/MonthDayDemo/bin/MonthDayDemo.class differ
diff --git a/BasicJava/MonthDayDemo_parse/MonthDayDemo/src/MonthDayDemo.java b/BasicJava/MonthDayDemo_parse/MonthDayDemo/src/MonthDayDemo.java
new file mode 100644
index 000000000..68e7e7f46
--- /dev/null
+++ b/BasicJava/MonthDayDemo_parse/MonthDayDemo/src/MonthDayDemo.java
@@ -0,0 +1,30 @@
+import java.time.MonthDay;
+import java.time.format.DateTimeFormatter;
+
+public class MonthDayDemo
+{
+
+ public static void main(String[] args)
+ {
+ DateTimeFormatter dateTimeFormatter = DateTimeFormatter
+ .ofPattern("--MM-dd");
+ String strDate = "--11-15";
+
+ /*
+ * Parameters:
+ *
+ * text - the text to parse, not null
+ *
+ * formatter - the formatter to use, not nullReturns:the
+ * parsed month-day, not null
+ *
+ * Returns:
+ *
+ * the parsed month-day, not null
+ *
+ */
+ MonthDay monthDay = MonthDay.parse(strDate, dateTimeFormatter);
+ System.out.println(monthDay);
+ }
+
+}
diff --git a/BasicJava/MonthDayDemo_parse/Output.txt b/BasicJava/MonthDayDemo_parse/Output.txt
new file mode 100644
index 000000000..d450027a3
--- /dev/null
+++ b/BasicJava/MonthDayDemo_parse/Output.txt
@@ -0,0 +1 @@
+--11-15
diff --git a/BasicJava/MonthDayDemo_with/MonthDayDemo/.classpath b/BasicJava/MonthDayDemo_with/MonthDayDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/MonthDayDemo_with/MonthDayDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/MonthDayDemo_with/MonthDayDemo/.project b/BasicJava/MonthDayDemo_with/MonthDayDemo/.project
new file mode 100644
index 000000000..38ae1b32b
--- /dev/null
+++ b/BasicJava/MonthDayDemo_with/MonthDayDemo/.project
@@ -0,0 +1,17 @@
+
+
+ MonthDayDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/MonthDayDemo_with/MonthDayDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/MonthDayDemo_with/MonthDayDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/MonthDayDemo_with/MonthDayDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/MonthDayDemo_with/MonthDayDemo/bin/MonthDayDemo.class b/BasicJava/MonthDayDemo_with/MonthDayDemo/bin/MonthDayDemo.class
new file mode 100644
index 000000000..0cf4c9eeb
Binary files /dev/null and b/BasicJava/MonthDayDemo_with/MonthDayDemo/bin/MonthDayDemo.class differ
diff --git a/BasicJava/MonthDayDemo_with/MonthDayDemo/src/MonthDayDemo.java b/BasicJava/MonthDayDemo_with/MonthDayDemo/src/MonthDayDemo.java
new file mode 100644
index 000000000..f8ff21763
--- /dev/null
+++ b/BasicJava/MonthDayDemo_with/MonthDayDemo/src/MonthDayDemo.java
@@ -0,0 +1,55 @@
+import java.time.Month;
+import java.time.MonthDay;
+
+public class MonthDayDemo
+{
+
+ public static void main(String[] args)
+ {
+ MonthDay monthDay = MonthDay.parse("--12-15");
+
+ System.out.println("Before month Change = " + monthDay);
+
+ /*
+ * Parameters:
+ *
+ * month - the month-of-year to set in the returned month-day,
+ * not null
+ *
+ * Returns:a MonthDay based on this month-day with the
+ * requested month, not null
+ */
+ monthDay = monthDay.with(Month.APRIL);
+
+ System.out.println("After month Change1 = " + monthDay);
+
+ /*
+ * Parameters:
+ *
+ * month - the month-of-year to set in the returned month-day,
+ * from 1 (January) to 12 (December)
+ *
+ * Returns: a MonthDay based on this month-day with the
+ * requested month, not null
+ *
+ */
+ monthDay = monthDay.withMonth(8);
+
+ System.out.println("After month Change2 = " + monthDay);
+
+ /*
+ * Parameters:
+ *
+ * dayOfMonth - the day-of-month to set in the return
+ * month-day, from 1 to 31
+ *
+ * Returns:a MonthDay based on this month-day with the
+ * requested day, not null
+ */
+
+ monthDay = monthDay.withDayOfMonth(30);
+
+ System.out.println("After day Change = " + monthDay);
+ }
+
+}
diff --git a/BasicJava/MonthDayDemo_with/Output.txt b/BasicJava/MonthDayDemo_with/Output.txt
new file mode 100644
index 000000000..01462c59b
--- /dev/null
+++ b/BasicJava/MonthDayDemo_with/Output.txt
@@ -0,0 +1,4 @@
+Before month Change = --12-15
+After month Change1 = --04-15
+After month Change2 = --08-15
+After day Change = --08-30
diff --git a/BasicJava/OffsetDateTimeDemo_atZoneSameInstant/OffsetDateTimeDemo/.classpath b/BasicJava/OffsetDateTimeDemo_atZoneSameInstant/OffsetDateTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_atZoneSameInstant/OffsetDateTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/OffsetDateTimeDemo_atZoneSameInstant/OffsetDateTimeDemo/.project b/BasicJava/OffsetDateTimeDemo_atZoneSameInstant/OffsetDateTimeDemo/.project
new file mode 100644
index 000000000..fc86e1541
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_atZoneSameInstant/OffsetDateTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ OffsetDateTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/OffsetDateTimeDemo_atZoneSameInstant/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/OffsetDateTimeDemo_atZoneSameInstant/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_atZoneSameInstant/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/OffsetDateTimeDemo_atZoneSameInstant/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class b/BasicJava/OffsetDateTimeDemo_atZoneSameInstant/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class
new file mode 100644
index 000000000..ee1ec5a9a
Binary files /dev/null and b/BasicJava/OffsetDateTimeDemo_atZoneSameInstant/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class differ
diff --git a/BasicJava/OffsetDateTimeDemo_atZoneSameInstant/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java b/BasicJava/OffsetDateTimeDemo_atZoneSameInstant/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java
new file mode 100644
index 000000000..6f79991b9
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_atZoneSameInstant/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java
@@ -0,0 +1,32 @@
+import java.time.OffsetDateTime;
+import java.time.ZoneId;
+import java.time.ZonedDateTime;
+
+public class OffsetDateTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+
+ OffsetDateTime offsetDateTime = OffsetDateTime
+ .parse("2017-02-03T12:30:30+01:00");
+ System.out.println(offsetDateTime);
+
+ ZoneId zoneId = ZoneId.systemDefault();
+ System.out.println(zoneId);
+
+ /*
+ * Parameters:
+ *
+ * zone - the time-zone to use, not null
+ *
+ * Returns:
+ *
+ * the zoned date-time formed from this date-time, not null
+ */
+ ZonedDateTime zonedDateTime = offsetDateTime.atZoneSameInstant(zoneId);
+ System.out.println(zonedDateTime);
+
+ }
+
+}
diff --git a/BasicJava/OffsetDateTimeDemo_atZoneSameInstant/Output.txt b/BasicJava/OffsetDateTimeDemo_atZoneSameInstant/Output.txt
new file mode 100644
index 000000000..5fa5dcaa9
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_atZoneSameInstant/Output.txt
@@ -0,0 +1,3 @@
+2017-02-03T12:30:30+01:00
+Asia/Calcutta
+2017-02-03T17:00:30+05:30[Asia/Calcutta]
diff --git a/BasicJava/OffsetDateTimeDemo_atZoneSimilarLocal/OffsetDateTimeDemo/.classpath b/BasicJava/OffsetDateTimeDemo_atZoneSimilarLocal/OffsetDateTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_atZoneSimilarLocal/OffsetDateTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/OffsetDateTimeDemo_atZoneSimilarLocal/OffsetDateTimeDemo/.project b/BasicJava/OffsetDateTimeDemo_atZoneSimilarLocal/OffsetDateTimeDemo/.project
new file mode 100644
index 000000000..fc86e1541
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_atZoneSimilarLocal/OffsetDateTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ OffsetDateTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/OffsetDateTimeDemo_atZoneSimilarLocal/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/OffsetDateTimeDemo_atZoneSimilarLocal/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_atZoneSimilarLocal/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/OffsetDateTimeDemo_atZoneSimilarLocal/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class b/BasicJava/OffsetDateTimeDemo_atZoneSimilarLocal/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class
new file mode 100644
index 000000000..c3a5ba780
Binary files /dev/null and b/BasicJava/OffsetDateTimeDemo_atZoneSimilarLocal/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class differ
diff --git a/BasicJava/OffsetDateTimeDemo_atZoneSimilarLocal/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java b/BasicJava/OffsetDateTimeDemo_atZoneSimilarLocal/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java
new file mode 100644
index 000000000..570a49d1d
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_atZoneSimilarLocal/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java
@@ -0,0 +1,33 @@
+import java.time.OffsetDateTime;
+import java.time.ZoneId;
+import java.time.ZonedDateTime;
+
+public class OffsetDateTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+
+ OffsetDateTime offsetDateTime = OffsetDateTime
+ .parse("2017-02-03T12:30:30+01:00");
+ System.out.println(offsetDateTime);
+
+ ZoneId zoneId = ZoneId.systemDefault();
+ System.out.println(zoneId);
+
+ /*
+ * Parameters:
+ *
+ * zone - the time-zone to use, not null
+ *
+ * Returns:
+ *
+ * the zoned date-time formed from this date and the earliest
+ * valid time for the zone, not null
+ */
+ ZonedDateTime zonedDateTime = offsetDateTime.atZoneSimilarLocal(zoneId);
+ System.out.println(zonedDateTime);
+
+ }
+
+}
diff --git a/BasicJava/OffsetDateTimeDemo_atZoneSimilarLocal/Output.txt b/BasicJava/OffsetDateTimeDemo_atZoneSimilarLocal/Output.txt
new file mode 100644
index 000000000..e01d42e6c
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_atZoneSimilarLocal/Output.txt
@@ -0,0 +1,3 @@
+2017-02-03T12:30:30+01:00
+Asia/Calcutta
+2017-02-03T12:30:30+05:30[Asia/Calcutta]
diff --git a/BasicJava/OffsetDateTimeDemo_format/OffsetDateTimeDemo/.classpath b/BasicJava/OffsetDateTimeDemo_format/OffsetDateTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_format/OffsetDateTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/OffsetDateTimeDemo_format/OffsetDateTimeDemo/.project b/BasicJava/OffsetDateTimeDemo_format/OffsetDateTimeDemo/.project
new file mode 100644
index 000000000..fc86e1541
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_format/OffsetDateTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ OffsetDateTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/OffsetDateTimeDemo_format/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/OffsetDateTimeDemo_format/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_format/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/OffsetDateTimeDemo_format/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class b/BasicJava/OffsetDateTimeDemo_format/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class
new file mode 100644
index 000000000..8697dd373
Binary files /dev/null and b/BasicJava/OffsetDateTimeDemo_format/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class differ
diff --git a/BasicJava/OffsetDateTimeDemo_format/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java b/BasicJava/OffsetDateTimeDemo_format/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java
new file mode 100644
index 000000000..14d866bac
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_format/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java
@@ -0,0 +1,32 @@
+import java.time.OffsetDateTime;
+import java.time.format.DateTimeFormatter;
+
+public class OffsetDateTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+
+ OffsetDateTime offsetDateTime = OffsetDateTime.now();
+ System.out.println(offsetDateTime);
+ DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ISO_DATE;
+
+ /*
+ * Parameters:
+ *
+ * formatter - the formatter to use, not null
+ *
+ * Returns:
+ *
+ * the formatted date-time string, not null
+ */
+ String formatedDate = offsetDateTime.format(dateTimeFormatter);
+ System.out.println("ISO_DATE = " + formatedDate);
+
+ dateTimeFormatter = DateTimeFormatter.ISO_TIME;
+ formatedDate = offsetDateTime.format(dateTimeFormatter);
+ System.out.println("ISO_TIME = " + formatedDate);
+
+ }
+
+}
diff --git a/BasicJava/OffsetDateTimeDemo_format/Output.txt b/BasicJava/OffsetDateTimeDemo_format/Output.txt
new file mode 100644
index 000000000..07f673b7f
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_format/Output.txt
@@ -0,0 +1,3 @@
+2018-01-27T09:00:14.857+05:30
+ISO_DATE = 2018-01-27+05:30
+ISO_TIME = 09:00:14.857+05:30
diff --git a/BasicJava/OffsetDateTimeDemo_from/OffsetDateTimeDemo/.classpath b/BasicJava/OffsetDateTimeDemo_from/OffsetDateTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_from/OffsetDateTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/OffsetDateTimeDemo_from/OffsetDateTimeDemo/.project b/BasicJava/OffsetDateTimeDemo_from/OffsetDateTimeDemo/.project
new file mode 100644
index 000000000..fc86e1541
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_from/OffsetDateTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ OffsetDateTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/OffsetDateTimeDemo_from/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/OffsetDateTimeDemo_from/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_from/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/OffsetDateTimeDemo_from/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class b/BasicJava/OffsetDateTimeDemo_from/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class
new file mode 100644
index 000000000..279d05f07
Binary files /dev/null and b/BasicJava/OffsetDateTimeDemo_from/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class differ
diff --git a/BasicJava/OffsetDateTimeDemo_from/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java b/BasicJava/OffsetDateTimeDemo_from/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java
new file mode 100644
index 000000000..1d88294b5
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_from/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java
@@ -0,0 +1,28 @@
+import java.time.OffsetDateTime;
+import java.time.ZonedDateTime;
+
+public class OffsetDateTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+
+ ZonedDateTime zonedDateTime = ZonedDateTime.now();
+ System.out.println(zonedDateTime);
+
+
+ /*
+ * Parameters:
+ *
+ * temporal - the temporal object to convert, not null
+ *
+ * Returns:
+ *
+ * the offset date-time, not null
+ */
+ OffsetDateTime offsetDateTime = OffsetDateTime.from(zonedDateTime);
+ System.out.println(offsetDateTime);
+
+ }
+
+}
diff --git a/BasicJava/OffsetDateTimeDemo_from/Output.txt b/BasicJava/OffsetDateTimeDemo_from/Output.txt
new file mode 100644
index 000000000..81aa4baea
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_from/Output.txt
@@ -0,0 +1,2 @@
+2018-01-28T08:24:05.350+05:30[Asia/Calcutta]
+2018-01-28T08:24:05.350+05:30
diff --git a/BasicJava/OffsetDateTimeDemo_get_temporalfield/OffsetDateTimeDemo/.classpath b/BasicJava/OffsetDateTimeDemo_get_temporalfield/OffsetDateTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_get_temporalfield/OffsetDateTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/OffsetDateTimeDemo_get_temporalfield/OffsetDateTimeDemo/.project b/BasicJava/OffsetDateTimeDemo_get_temporalfield/OffsetDateTimeDemo/.project
new file mode 100644
index 000000000..fc86e1541
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_get_temporalfield/OffsetDateTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ OffsetDateTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/OffsetDateTimeDemo_get_temporalfield/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/OffsetDateTimeDemo_get_temporalfield/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_get_temporalfield/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/OffsetDateTimeDemo_get_temporalfield/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class b/BasicJava/OffsetDateTimeDemo_get_temporalfield/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class
new file mode 100644
index 000000000..64bd5e597
Binary files /dev/null and b/BasicJava/OffsetDateTimeDemo_get_temporalfield/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class differ
diff --git a/BasicJava/OffsetDateTimeDemo_get_temporalfield/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java b/BasicJava/OffsetDateTimeDemo_get_temporalfield/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java
new file mode 100644
index 000000000..7f2078027
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_get_temporalfield/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java
@@ -0,0 +1,30 @@
+import java.time.OffsetDateTime;
+import java.time.temporal.ChronoField;
+
+public class OffsetDateTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+
+ OffsetDateTime offsetDateTime = OffsetDateTime.now();
+ System.out.println(offsetDateTime);
+
+ /*
+ * Parameters:
+ *
+ * field - the field to get, not null
+ *
+ * Returns:
+ *
+ * the value for the field
+ */
+ int dayOfMonth = offsetDateTime.get(ChronoField.DAY_OF_MONTH);
+ System.out.println("dayOfMonth = " + dayOfMonth);
+
+ int monthOfYear = offsetDateTime.get(ChronoField.MONTH_OF_YEAR);
+ System.out.println("monthOfYear = " + monthOfYear);
+
+ }
+
+}
diff --git a/BasicJava/OffsetDateTimeDemo_get_temporalfield/Output.txt b/BasicJava/OffsetDateTimeDemo_get_temporalfield/Output.txt
new file mode 100644
index 000000000..60f638e87
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_get_temporalfield/Output.txt
@@ -0,0 +1,3 @@
+2018-01-28T08:35:20.954+05:30
+dayOfMonth = 28
+monthOfYear = 1
diff --git a/BasicJava/OffsetDateTimeDemo_intro/OffsetDateTimeDemo/.classpath b/BasicJava/OffsetDateTimeDemo_intro/OffsetDateTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_intro/OffsetDateTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/OffsetDateTimeDemo_intro/OffsetDateTimeDemo/.project b/BasicJava/OffsetDateTimeDemo_intro/OffsetDateTimeDemo/.project
new file mode 100644
index 000000000..fc86e1541
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_intro/OffsetDateTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ OffsetDateTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/OffsetDateTimeDemo_intro/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/OffsetDateTimeDemo_intro/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_intro/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/OffsetDateTimeDemo_intro/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class b/BasicJava/OffsetDateTimeDemo_intro/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class
new file mode 100644
index 000000000..5761db2e2
Binary files /dev/null and b/BasicJava/OffsetDateTimeDemo_intro/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class differ
diff --git a/BasicJava/OffsetDateTimeDemo_intro/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java b/BasicJava/OffsetDateTimeDemo_intro/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java
new file mode 100644
index 000000000..06d5322f4
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_intro/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java
@@ -0,0 +1,29 @@
+import java.time.OffsetDateTime;
+
+public class OffsetDateTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+ /*
+ * Returns:the current date-time using the system clock, not
+ * null.
+ */
+ OffsetDateTime offsetDateTime = OffsetDateTime.now();
+ System.out.println(offsetDateTime);
+
+ System.out.println("Year = "+offsetDateTime.getYear());
+ System.out.println("Month = "+offsetDateTime.getMonth());
+ System.out.println("Month Value = "+offsetDateTime.getMonthValue());
+ System.out.println("getDayOfMonth = "+offsetDateTime.getDayOfMonth());
+ System.out.println("Hour = "+offsetDateTime.getHour());
+ System.out.println("Min = "+offsetDateTime.getMinute());
+ System.out.println("Second = "+offsetDateTime.getSecond());
+ System.out.println("Nano Second = "+offsetDateTime.getNano());
+ System.out.println("Offset = "+offsetDateTime.getOffset());
+ System.out.println("DayOfYear = "+offsetDateTime.getDayOfYear());
+ System.out.println("DayOfWeek = "+offsetDateTime.getDayOfWeek());
+
+ }
+
+}
diff --git a/BasicJava/OffsetDateTimeDemo_intro/Output.txt b/BasicJava/OffsetDateTimeDemo_intro/Output.txt
new file mode 100644
index 000000000..11b7cad44
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_intro/Output.txt
@@ -0,0 +1,12 @@
+2018-01-25T10:04:20.738+05:30
+Year = 2018
+Month = JANUARY
+Month Value = 1
+getDayOfMonth = 25
+Hour = 10
+Min = 4
+Second = 20
+Nano Second = 738000000
+Offset = +05:30
+DayOfYear = 25
+DayOfWeek = THURSDAY
diff --git a/BasicJava/OffsetDateTimeDemo_isafter_before/OffsetDateTimeDemo/.classpath b/BasicJava/OffsetDateTimeDemo_isafter_before/OffsetDateTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_isafter_before/OffsetDateTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/OffsetDateTimeDemo_isafter_before/OffsetDateTimeDemo/.project b/BasicJava/OffsetDateTimeDemo_isafter_before/OffsetDateTimeDemo/.project
new file mode 100644
index 000000000..fc86e1541
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_isafter_before/OffsetDateTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ OffsetDateTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/OffsetDateTimeDemo_isafter_before/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/OffsetDateTimeDemo_isafter_before/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_isafter_before/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/OffsetDateTimeDemo_isafter_before/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class b/BasicJava/OffsetDateTimeDemo_isafter_before/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class
new file mode 100644
index 000000000..cf4f3d921
Binary files /dev/null and b/BasicJava/OffsetDateTimeDemo_isafter_before/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class differ
diff --git a/BasicJava/OffsetDateTimeDemo_isafter_before/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java b/BasicJava/OffsetDateTimeDemo_isafter_before/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java
new file mode 100644
index 000000000..ff493496c
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_isafter_before/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java
@@ -0,0 +1,36 @@
+import java.time.OffsetDateTime;
+
+public class OffsetDateTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+
+ OffsetDateTime offsetDateTime1 = OffsetDateTime
+ .parse("2016-02-03T12:30:30+01:00");
+ System.out.println(offsetDateTime1);
+
+ OffsetDateTime offsetDateTime2 = OffsetDateTime
+ .parse("2017-02-03T12:30:30+01:00");
+ System.out.println(offsetDateTime2);
+ /*
+ * Returns:true if this is equal to the other date-time
+ */
+ System.out.println(offsetDateTime1.equals(offsetDateTime2));
+
+ /*
+ * Returns:true if this date-time is after the specified
+ * date-time
+ */
+ System.out.println(offsetDateTime1.isAfter(offsetDateTime2));
+
+ /*
+ * Returns:true if this date-time is before the specified
+ * date-time
+ */
+
+ System.out.println(offsetDateTime1.isBefore(offsetDateTime2));
+
+ }
+
+}
diff --git a/BasicJava/OffsetDateTimeDemo_isafter_before/Output.txt b/BasicJava/OffsetDateTimeDemo_isafter_before/Output.txt
new file mode 100644
index 000000000..1f49b7aef
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_isafter_before/Output.txt
@@ -0,0 +1,5 @@
+2016-02-03T12:30:30+01:00
+2017-02-03T12:30:30+01:00
+false
+false
+true
diff --git a/BasicJava/OffsetDateTimeDemo_minus/OffsetDateTimeDemo/.classpath b/BasicJava/OffsetDateTimeDemo_minus/OffsetDateTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_minus/OffsetDateTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/OffsetDateTimeDemo_minus/OffsetDateTimeDemo/.project b/BasicJava/OffsetDateTimeDemo_minus/OffsetDateTimeDemo/.project
new file mode 100644
index 000000000..fc86e1541
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_minus/OffsetDateTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ OffsetDateTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/OffsetDateTimeDemo_minus/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/OffsetDateTimeDemo_minus/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_minus/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/OffsetDateTimeDemo_minus/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class b/BasicJava/OffsetDateTimeDemo_minus/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class
new file mode 100644
index 000000000..0444c9bbe
Binary files /dev/null and b/BasicJava/OffsetDateTimeDemo_minus/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class differ
diff --git a/BasicJava/OffsetDateTimeDemo_minus/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java b/BasicJava/OffsetDateTimeDemo_minus/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java
new file mode 100644
index 000000000..7c4433415
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_minus/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java
@@ -0,0 +1,41 @@
+import java.time.OffsetDateTime;
+
+public class OffsetDateTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+ /*
+ * Returns:the current date-time using the system clock, not
+ * null.
+ */
+ OffsetDateTime offsetDateTime1 = OffsetDateTime.now();
+ System.out.println(offsetDateTime1);
+
+ OffsetDateTime offsetDateTime2 = offsetDateTime1.minusYears(2);
+ System.out.println("\nYear changed = "+offsetDateTime2);
+
+ OffsetDateTime offsetDateTime3 = offsetDateTime2.minusMonths(3);
+ System.out.println("Month changed = "+offsetDateTime3);
+
+ OffsetDateTime offsetDateTime4 = offsetDateTime3.minusDays(5);
+ System.out.println("Day changed = "+offsetDateTime4);
+
+ OffsetDateTime offsetDateTime5 = offsetDateTime4.minusHours(1);
+ System.out.println("Hour changed = "+offsetDateTime5);
+
+ OffsetDateTime offsetDateTime6 = offsetDateTime5.minusMinutes(10);
+ System.out.println("Min changed = "+offsetDateTime6);
+
+ OffsetDateTime offsetDateTime7 = offsetDateTime6.minusSeconds(20);
+ System.out.println("Sec changed = "+offsetDateTime7);
+
+ OffsetDateTime offsetDateTime8 = offsetDateTime7.minusNanos(50);
+ System.out.println("NanoSec changed = "+offsetDateTime8);
+
+ OffsetDateTime offsetDateTime9 = offsetDateTime8.minusWeeks(3);
+ System.out.println("Week changed = "+offsetDateTime9);
+
+ }
+
+}
diff --git a/BasicJava/OffsetDateTimeDemo_minus/Output.txt b/BasicJava/OffsetDateTimeDemo_minus/Output.txt
new file mode 100644
index 000000000..85d9239ce
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_minus/Output.txt
@@ -0,0 +1,10 @@
+2018-01-25T12:48:58.275+05:30
+
+Year changed = 2016-01-25T12:48:58.275+05:30
+Month changed = 2015-10-25T12:48:58.275+05:30
+Day changed = 2015-10-20T12:48:58.275+05:30
+Hour changed = 2015-10-20T11:48:58.275+05:30
+Min changed = 2015-10-20T11:38:58.275+05:30
+Sec changed = 2015-10-20T11:38:38.275+05:30
+NanoSec changed = 2015-10-20T11:38:38.274999950+05:30
+Week changed = 2015-09-29T11:38:38.274999950+05:30
diff --git a/BasicJava/OffsetDateTimeDemo_now_methods/OffsetDateTimeDemo/.classpath b/BasicJava/OffsetDateTimeDemo_now_methods/OffsetDateTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_now_methods/OffsetDateTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/OffsetDateTimeDemo_now_methods/OffsetDateTimeDemo/.project b/BasicJava/OffsetDateTimeDemo_now_methods/OffsetDateTimeDemo/.project
new file mode 100644
index 000000000..fc86e1541
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_now_methods/OffsetDateTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ OffsetDateTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/OffsetDateTimeDemo_now_methods/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/OffsetDateTimeDemo_now_methods/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_now_methods/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/OffsetDateTimeDemo_now_methods/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class b/BasicJava/OffsetDateTimeDemo_now_methods/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class
new file mode 100644
index 000000000..0f3b65c20
Binary files /dev/null and b/BasicJava/OffsetDateTimeDemo_now_methods/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class differ
diff --git a/BasicJava/OffsetDateTimeDemo_now_methods/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java b/BasicJava/OffsetDateTimeDemo_now_methods/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java
new file mode 100644
index 000000000..d60852a3e
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_now_methods/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java
@@ -0,0 +1,40 @@
+import java.time.Clock;
+import java.time.OffsetDateTime;
+import java.time.ZoneId;
+
+public class OffsetDateTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+
+ Clock clock = Clock.systemUTC();
+ System.out.println(clock);
+
+ /*
+ * Parameters:
+ *
+ * clock - the clock to use, not null
+ *
+ * Returns:the current date-time, not null
+ */
+ OffsetDateTime offsetDateTime1 = OffsetDateTime.now(clock);
+ System.out.println(offsetDateTime1);
+
+ ZoneId zoneId = ZoneId.systemDefault();
+ System.out.println(zoneId);
+
+ /*
+ * Parameters:
+ *
+ * zone - the zone ID to use, not null
+ *
+ * Returns:the current date-time using the system clock, not
+ * null
+ */
+ OffsetDateTime offsetDateTime2 = OffsetDateTime.now(zoneId);
+ System.out.println(offsetDateTime2);
+
+ }
+
+}
diff --git a/BasicJava/OffsetDateTimeDemo_now_methods/Output.txt b/BasicJava/OffsetDateTimeDemo_now_methods/Output.txt
new file mode 100644
index 000000000..548b821d5
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_now_methods/Output.txt
@@ -0,0 +1,4 @@
+SystemClock[Z]
+2018-01-29T03:53:50.554Z
+Asia/Calcutta
+2018-01-29T09:24:15.069+05:30
diff --git a/BasicJava/OffsetDateTimeDemo_ofInstant/OffsetDateTimeDemo/.classpath b/BasicJava/OffsetDateTimeDemo_ofInstant/OffsetDateTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_ofInstant/OffsetDateTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/OffsetDateTimeDemo_ofInstant/OffsetDateTimeDemo/.project b/BasicJava/OffsetDateTimeDemo_ofInstant/OffsetDateTimeDemo/.project
new file mode 100644
index 000000000..fc86e1541
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_ofInstant/OffsetDateTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ OffsetDateTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/OffsetDateTimeDemo_ofInstant/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/OffsetDateTimeDemo_ofInstant/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_ofInstant/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/OffsetDateTimeDemo_ofInstant/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class b/BasicJava/OffsetDateTimeDemo_ofInstant/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class
new file mode 100644
index 000000000..2176c3f7a
Binary files /dev/null and b/BasicJava/OffsetDateTimeDemo_ofInstant/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class differ
diff --git a/BasicJava/OffsetDateTimeDemo_ofInstant/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java b/BasicJava/OffsetDateTimeDemo_ofInstant/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java
new file mode 100644
index 000000000..eb8c5ecdd
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_ofInstant/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java
@@ -0,0 +1,30 @@
+import java.time.Instant;
+import java.time.OffsetDateTime;
+import java.time.ZoneId;
+
+public class OffsetDateTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+ Instant instant = Instant.now();
+ ZoneId zoneId = ZoneId.systemDefault();
+
+ /*
+ * Parameters:
+ *
+ * instant - the instant to create the date-time from, not
+ * null
+ *
+ * zone - the time-zone, which may be an offset, not null
+ *
+ * Returns:
+ *
+ * the offset date-time, not null
+ */
+ OffsetDateTime offsetDateTime = OffsetDateTime.ofInstant(instant,
+ zoneId);
+ System.out.println(offsetDateTime);
+ }
+
+}
diff --git a/BasicJava/OffsetDateTimeDemo_ofInstant/Output.txt b/BasicJava/OffsetDateTimeDemo_ofInstant/Output.txt
new file mode 100644
index 000000000..6ea6ad352
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_ofInstant/Output.txt
@@ -0,0 +1 @@
+2018-01-29T09:57:07.220+05:30
diff --git a/BasicJava/OffsetDateTimeDemo_of_methods/OffsetDateTimeDemo/.classpath b/BasicJava/OffsetDateTimeDemo_of_methods/OffsetDateTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_of_methods/OffsetDateTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/OffsetDateTimeDemo_of_methods/OffsetDateTimeDemo/.project b/BasicJava/OffsetDateTimeDemo_of_methods/OffsetDateTimeDemo/.project
new file mode 100644
index 000000000..fc86e1541
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_of_methods/OffsetDateTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ OffsetDateTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/OffsetDateTimeDemo_of_methods/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/OffsetDateTimeDemo_of_methods/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_of_methods/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/OffsetDateTimeDemo_of_methods/OffsetDateTimeDemo/bin/OffsetDateTimeDemo1.class b/BasicJava/OffsetDateTimeDemo_of_methods/OffsetDateTimeDemo/bin/OffsetDateTimeDemo1.class
new file mode 100644
index 000000000..db6c80830
Binary files /dev/null and b/BasicJava/OffsetDateTimeDemo_of_methods/OffsetDateTimeDemo/bin/OffsetDateTimeDemo1.class differ
diff --git a/BasicJava/OffsetDateTimeDemo_of_methods/OffsetDateTimeDemo/bin/OffsetDateTimeDemo2.class b/BasicJava/OffsetDateTimeDemo_of_methods/OffsetDateTimeDemo/bin/OffsetDateTimeDemo2.class
new file mode 100644
index 000000000..52d7c872c
Binary files /dev/null and b/BasicJava/OffsetDateTimeDemo_of_methods/OffsetDateTimeDemo/bin/OffsetDateTimeDemo2.class differ
diff --git a/BasicJava/OffsetDateTimeDemo_of_methods/OffsetDateTimeDemo/bin/OffsetDateTimeDemo3.class b/BasicJava/OffsetDateTimeDemo_of_methods/OffsetDateTimeDemo/bin/OffsetDateTimeDemo3.class
new file mode 100644
index 000000000..d4286d3f7
Binary files /dev/null and b/BasicJava/OffsetDateTimeDemo_of_methods/OffsetDateTimeDemo/bin/OffsetDateTimeDemo3.class differ
diff --git a/BasicJava/OffsetDateTimeDemo_of_methods/OffsetDateTimeDemo/src/OffsetDateTimeDemo1.java b/BasicJava/OffsetDateTimeDemo_of_methods/OffsetDateTimeDemo/src/OffsetDateTimeDemo1.java
new file mode 100644
index 000000000..3af84b192
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_of_methods/OffsetDateTimeDemo/src/OffsetDateTimeDemo1.java
@@ -0,0 +1,41 @@
+import java.time.OffsetDateTime;
+import java.time.ZoneOffset;
+
+public class OffsetDateTimeDemo1
+{
+
+ public static void main(String[] args)
+ {
+
+ /*
+ * Parameters:
+ *
+ * year - the year to represent, from MIN_YEAR to MAX_YEAR
+ *
+ * month - the month-of-year to represent, from 1 (January) to
+ * 12 (December)
+ *
+ * dayOfMonth - the day-of-month to represent, from 1 to 31
+ *
+ * hour - the hour-of-day to represent, from 0 to 23
+ *
+ * minute - the minute-of-hour to represent, from 0 to 59
+ *
+ * second - the second-of-minute to represent, from 0 to 59
+ *
+ * nanoOfSecond - the nano-of-second to represent, from 0 to
+ * 999,999,999
+ *
+ * offset - the zone offset, not null
+ *
+ * Returns:
+ *
+ * the offset date-time, not null
+ */
+ OffsetDateTime offsetDateTime1 = OffsetDateTime.of(2017, 2, 28, 6, 50,
+ 40, 50000, ZoneOffset.UTC);
+ System.out.println(offsetDateTime1);
+
+ }
+
+}
diff --git a/BasicJava/OffsetDateTimeDemo_of_methods/OffsetDateTimeDemo/src/OffsetDateTimeDemo2.java b/BasicJava/OffsetDateTimeDemo_of_methods/OffsetDateTimeDemo/src/OffsetDateTimeDemo2.java
new file mode 100644
index 000000000..5d4a3b670
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_of_methods/OffsetDateTimeDemo/src/OffsetDateTimeDemo2.java
@@ -0,0 +1,36 @@
+import java.time.LocalDate;
+import java.time.LocalTime;
+import java.time.OffsetDateTime;
+import java.time.ZoneOffset;
+
+public class OffsetDateTimeDemo2
+{
+
+ public static void main(String[] args)
+ {
+
+ LocalDate localDate = LocalDate.parse("2017-02-03");
+ LocalTime localTime = LocalTime.parse("12:30:30");
+ ZoneOffset zoneOffset = ZoneOffset.UTC;
+
+ /*
+ * Parameters:
+ *
+ * date - the local date, not null.
+ *
+ * time - the local time, not null
+ *
+ * offset - the zone offset, not null.
+ *
+ * Returns:
+ *
+ * the offset date-time, not null
+ */
+
+ OffsetDateTime offsetDateTime = OffsetDateTime.of(localDate, localTime,
+ zoneOffset);
+ System.out.println(offsetDateTime);
+
+ }
+
+}
diff --git a/BasicJava/OffsetDateTimeDemo_of_methods/OffsetDateTimeDemo/src/OffsetDateTimeDemo3.java b/BasicJava/OffsetDateTimeDemo_of_methods/OffsetDateTimeDemo/src/OffsetDateTimeDemo3.java
new file mode 100644
index 000000000..98697430a
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_of_methods/OffsetDateTimeDemo/src/OffsetDateTimeDemo3.java
@@ -0,0 +1,30 @@
+import java.time.LocalDateTime;
+import java.time.OffsetDateTime;
+import java.time.ZoneOffset;
+
+public class OffsetDateTimeDemo3
+{
+
+ public static void main(String[] args)
+ {
+ LocalDateTime localDateTime = LocalDateTime
+ .parse("2017-02-03T12:20:30");
+ ZoneOffset zoneOffset = ZoneOffset.UTC;
+
+ /*
+ * Parameters:
+ *
+ * dateTime - the local date-time, not null.
+ *
+ * offset - the zone offset, not null
+ *
+ * Returns:
+ *
+ * the offset date-time, not null
+ */
+ OffsetDateTime offsetDateTime = OffsetDateTime.of(localDateTime,
+ zoneOffset);
+ System.out.println(offsetDateTime);
+ }
+
+}
diff --git a/BasicJava/OffsetDateTimeDemo_of_methods/OffsetDateTimeDemo1_Output.txt b/BasicJava/OffsetDateTimeDemo_of_methods/OffsetDateTimeDemo1_Output.txt
new file mode 100644
index 000000000..3d2d5a1d9
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_of_methods/OffsetDateTimeDemo1_Output.txt
@@ -0,0 +1 @@
+2017-02-28T06:50:40.000050Z
diff --git a/BasicJava/OffsetDateTimeDemo_of_methods/OffsetDateTimeDemo2_Output.txt b/BasicJava/OffsetDateTimeDemo_of_methods/OffsetDateTimeDemo2_Output.txt
new file mode 100644
index 000000000..f5306c63c
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_of_methods/OffsetDateTimeDemo2_Output.txt
@@ -0,0 +1 @@
+2017-02-03T12:30:30Z
diff --git a/BasicJava/OffsetDateTimeDemo_of_methods/OffsetDateTimeDemo3_Output.txt b/BasicJava/OffsetDateTimeDemo_of_methods/OffsetDateTimeDemo3_Output.txt
new file mode 100644
index 000000000..e586df5a1
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_of_methods/OffsetDateTimeDemo3_Output.txt
@@ -0,0 +1 @@
+2017-02-03T12:20:30Z
diff --git a/BasicJava/OffsetDateTimeDemo_parse_formatter/OffsetDateTimeDemo/.classpath b/BasicJava/OffsetDateTimeDemo_parse_formatter/OffsetDateTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_parse_formatter/OffsetDateTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/OffsetDateTimeDemo_parse_formatter/OffsetDateTimeDemo/.project b/BasicJava/OffsetDateTimeDemo_parse_formatter/OffsetDateTimeDemo/.project
new file mode 100644
index 000000000..fc86e1541
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_parse_formatter/OffsetDateTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ OffsetDateTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/OffsetDateTimeDemo_parse_formatter/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/OffsetDateTimeDemo_parse_formatter/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_parse_formatter/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/OffsetDateTimeDemo_parse_formatter/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class b/BasicJava/OffsetDateTimeDemo_parse_formatter/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class
new file mode 100644
index 000000000..b4843f13c
Binary files /dev/null and b/BasicJava/OffsetDateTimeDemo_parse_formatter/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class differ
diff --git a/BasicJava/OffsetDateTimeDemo_parse_formatter/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java b/BasicJava/OffsetDateTimeDemo_parse_formatter/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java
new file mode 100644
index 000000000..d84905a7f
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_parse_formatter/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java
@@ -0,0 +1,29 @@
+import java.time.OffsetDateTime;
+import java.time.format.DateTimeFormatter;
+
+public class OffsetDateTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+
+ DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
+ String strDate = "2017-12-03T10:15:30+01:00";
+
+ /*
+ * Parameters:
+ *
+ * text - the text to parse, not null
+ *
+ * formatter - the formatter to use, not null
+ *
+ * Returns:
+ *
+ * the parsed offset date-time, not null
+ */
+ OffsetDateTime offsetDateTime = OffsetDateTime.parse(strDate,
+ dateTimeFormatter);
+ System.out.println(offsetDateTime);
+ }
+
+}
diff --git a/BasicJava/OffsetDateTimeDemo_parse_formatter/Output.txt b/BasicJava/OffsetDateTimeDemo_parse_formatter/Output.txt
new file mode 100644
index 000000000..91be259f9
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_parse_formatter/Output.txt
@@ -0,0 +1 @@
+2017-12-03T10:15:30+01:00
diff --git a/BasicJava/OffsetDateTimeDemo_plus/OffsetDateTimeDemo/.classpath b/BasicJava/OffsetDateTimeDemo_plus/OffsetDateTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_plus/OffsetDateTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/OffsetDateTimeDemo_plus/OffsetDateTimeDemo/.project b/BasicJava/OffsetDateTimeDemo_plus/OffsetDateTimeDemo/.project
new file mode 100644
index 000000000..fc86e1541
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_plus/OffsetDateTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ OffsetDateTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/OffsetDateTimeDemo_plus/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/OffsetDateTimeDemo_plus/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_plus/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/OffsetDateTimeDemo_plus/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class b/BasicJava/OffsetDateTimeDemo_plus/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class
new file mode 100644
index 000000000..51507dd59
Binary files /dev/null and b/BasicJava/OffsetDateTimeDemo_plus/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class differ
diff --git a/BasicJava/OffsetDateTimeDemo_plus/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java b/BasicJava/OffsetDateTimeDemo_plus/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java
new file mode 100644
index 000000000..eb500bb34
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_plus/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java
@@ -0,0 +1,41 @@
+import java.time.OffsetDateTime;
+
+public class OffsetDateTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+ /*
+ * Returns:the current date-time using the system clock, not
+ * null.
+ */
+ OffsetDateTime offsetDateTime1 = OffsetDateTime.now();
+ System.out.println(offsetDateTime1);
+
+ OffsetDateTime offsetDateTime2 = offsetDateTime1.plusYears(2);
+ System.out.println("\nYear changed = "+offsetDateTime2);
+
+ OffsetDateTime offsetDateTime3 = offsetDateTime2.plusMonths(3);
+ System.out.println("Month changed = "+offsetDateTime3);
+
+ OffsetDateTime offsetDateTime4 = offsetDateTime3.plusDays(5);
+ System.out.println("Day changed = "+offsetDateTime4);
+
+ OffsetDateTime offsetDateTime5 = offsetDateTime4.plusHours(1);
+ System.out.println("Hour changed = "+offsetDateTime5);
+
+ OffsetDateTime offsetDateTime6 = offsetDateTime5.plusMinutes(10);
+ System.out.println("Min changed = "+offsetDateTime6);
+
+ OffsetDateTime offsetDateTime7 = offsetDateTime6.plusSeconds(20);
+ System.out.println("Sec changed = "+offsetDateTime7);
+
+ OffsetDateTime offsetDateTime8 = offsetDateTime7.plusNanos(50);
+ System.out.println("NanoSec changed = "+offsetDateTime8);
+
+ OffsetDateTime offsetDateTime9 = offsetDateTime8.plusWeeks(3);
+ System.out.println("Week changed = "+offsetDateTime9);
+
+ }
+
+}
diff --git a/BasicJava/OffsetDateTimeDemo_plus/Output.txt b/BasicJava/OffsetDateTimeDemo_plus/Output.txt
new file mode 100644
index 000000000..9839dc9b5
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_plus/Output.txt
@@ -0,0 +1,10 @@
+2018-01-25T13:01:11.660+05:30
+
+Year changed = 2020-01-25T13:01:11.660+05:30
+Month changed = 2020-04-25T13:01:11.660+05:30
+Day changed = 2020-04-30T13:01:11.660+05:30
+Hour changed = 2020-04-30T14:01:11.660+05:30
+Min changed = 2020-04-30T14:11:11.660+05:30
+Sec changed = 2020-04-30T14:11:31.660+05:30
+NanoSec changed = 2020-04-30T14:11:31.660000050+05:30
+Week changed = 2020-05-21T14:11:31.660000050+05:30
diff --git a/BasicJava/OffsetDateTimeDemo_to_methods/OffsetDateTimeDemo/.classpath b/BasicJava/OffsetDateTimeDemo_to_methods/OffsetDateTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_to_methods/OffsetDateTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/OffsetDateTimeDemo_to_methods/OffsetDateTimeDemo/.project b/BasicJava/OffsetDateTimeDemo_to_methods/OffsetDateTimeDemo/.project
new file mode 100644
index 000000000..fc86e1541
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_to_methods/OffsetDateTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ OffsetDateTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/OffsetDateTimeDemo_to_methods/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/OffsetDateTimeDemo_to_methods/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_to_methods/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/OffsetDateTimeDemo_to_methods/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class b/BasicJava/OffsetDateTimeDemo_to_methods/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class
new file mode 100644
index 000000000..e651c2f04
Binary files /dev/null and b/BasicJava/OffsetDateTimeDemo_to_methods/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class differ
diff --git a/BasicJava/OffsetDateTimeDemo_to_methods/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java b/BasicJava/OffsetDateTimeDemo_to_methods/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java
new file mode 100644
index 000000000..93c79e479
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_to_methods/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java
@@ -0,0 +1,37 @@
+import java.time.Instant;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.LocalTime;
+import java.time.OffsetDateTime;
+import java.time.OffsetTime;
+import java.time.ZonedDateTime;
+
+public class OffsetDateTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+
+ OffsetDateTime offsetDateTime = OffsetDateTime.now();
+ System.out.println("offsetDateTime = " + offsetDateTime);
+
+ Instant instant = offsetDateTime.toInstant();
+ System.out.println("instant = " + instant);
+
+ LocalDate localDate = offsetDateTime.toLocalDate();
+ System.out.println("localDate = " + localDate);
+
+ LocalDateTime localDateTime = offsetDateTime.toLocalDateTime();
+ System.out.println("localDateTime = " + localDateTime);
+
+ LocalTime localTime = offsetDateTime.toLocalTime();
+ System.out.println("localTime = " + localTime);
+
+ OffsetTime offsetTime = offsetDateTime.toOffsetTime();
+ System.out.println("offsetTime = " + offsetTime);
+
+ ZonedDateTime zonedDateTime = offsetDateTime.toZonedDateTime();
+ System.out.println("zonedDateTime = " + zonedDateTime);
+ }
+
+}
diff --git a/BasicJava/OffsetDateTimeDemo_to_methods/Output.txt b/BasicJava/OffsetDateTimeDemo_to_methods/Output.txt
new file mode 100644
index 000000000..41f6999fe
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_to_methods/Output.txt
@@ -0,0 +1,7 @@
+offsetDateTime = 2018-01-30T09:24:53.355+05:30
+instant = 2018-01-30T03:54:53.355Z
+localDate = 2018-01-30
+localDateTime = 2018-01-30T09:24:53.355
+localTime = 09:24:53.355
+offsetTime = 09:24:53.355+05:30
+zonedDateTime = 2018-01-30T09:24:53.355+05:30
diff --git a/BasicJava/OffsetDateTimeDemo_with/OffsetDateTimeDemo/.classpath b/BasicJava/OffsetDateTimeDemo_with/OffsetDateTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_with/OffsetDateTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/OffsetDateTimeDemo_with/OffsetDateTimeDemo/.project b/BasicJava/OffsetDateTimeDemo_with/OffsetDateTimeDemo/.project
new file mode 100644
index 000000000..fc86e1541
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_with/OffsetDateTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ OffsetDateTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/OffsetDateTimeDemo_with/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/OffsetDateTimeDemo_with/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_with/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/OffsetDateTimeDemo_with/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class b/BasicJava/OffsetDateTimeDemo_with/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class
new file mode 100644
index 000000000..e70ccc2f0
Binary files /dev/null and b/BasicJava/OffsetDateTimeDemo_with/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class differ
diff --git a/BasicJava/OffsetDateTimeDemo_with/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java b/BasicJava/OffsetDateTimeDemo_with/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java
new file mode 100644
index 000000000..b3693b7bc
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_with/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java
@@ -0,0 +1,34 @@
+import java.time.OffsetDateTime;
+
+public class OffsetDateTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+ OffsetDateTime offsetDateTime1 = OffsetDateTime.parse("2017-02-03T10:15:30+01:00");
+ System.out.println("offsetDateTime1 = "+offsetDateTime1);
+
+ OffsetDateTime offsetDateTime2 = offsetDateTime1.withYear(2018);
+ System.out.println("\nYear changed = "+offsetDateTime2);
+
+ OffsetDateTime offsetDateTime3 = offsetDateTime2.withMonth(10);
+ System.out.println("Month changed = "+offsetDateTime3);
+
+ OffsetDateTime offsetDateTime4 = offsetDateTime3.withDayOfMonth(25);
+ System.out.println("Day changed = "+offsetDateTime4);
+
+ OffsetDateTime offsetDateTime5 = offsetDateTime4.withHour(1);
+ System.out.println("Hour changed = "+offsetDateTime5);
+
+ OffsetDateTime offsetDateTime6 = offsetDateTime5.withMinute(10);
+ System.out.println("Min changed = "+offsetDateTime6);
+
+ OffsetDateTime offsetDateTime7 = offsetDateTime6.withSecond(20);
+ System.out.println("Sec changed = "+offsetDateTime7);
+
+ OffsetDateTime offsetDateTime8 = offsetDateTime7.withNano(50);
+ System.out.println("NanoSec changed = "+offsetDateTime8);
+
+ }
+
+}
diff --git a/BasicJava/OffsetDateTimeDemo_with/Output.txt b/BasicJava/OffsetDateTimeDemo_with/Output.txt
new file mode 100644
index 000000000..4ea76d4f1
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_with/Output.txt
@@ -0,0 +1,9 @@
+offsetDateTime1 = 2017-02-03T10:15:30+01:00
+
+Year changed = 2018-02-03T10:15:30+01:00
+Month changed = 2018-10-03T10:15:30+01:00
+Day changed = 2018-10-25T10:15:30+01:00
+Hour changed = 2018-10-25T01:15:30+01:00
+Min changed = 2018-10-25T01:10:30+01:00
+Sec changed = 2018-10-25T01:10:20+01:00
+NanoSec changed = 2018-10-25T01:10:20.000000050+01:00
diff --git a/BasicJava/OffsetDateTimeDemo_withOffsetSameLocal/OffsetDateTimeDemo/.classpath b/BasicJava/OffsetDateTimeDemo_withOffsetSameLocal/OffsetDateTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_withOffsetSameLocal/OffsetDateTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/OffsetDateTimeDemo_withOffsetSameLocal/OffsetDateTimeDemo/.project b/BasicJava/OffsetDateTimeDemo_withOffsetSameLocal/OffsetDateTimeDemo/.project
new file mode 100644
index 000000000..fc86e1541
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_withOffsetSameLocal/OffsetDateTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ OffsetDateTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/OffsetDateTimeDemo_withOffsetSameLocal/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/OffsetDateTimeDemo_withOffsetSameLocal/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_withOffsetSameLocal/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/OffsetDateTimeDemo_withOffsetSameLocal/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class b/BasicJava/OffsetDateTimeDemo_withOffsetSameLocal/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class
new file mode 100644
index 000000000..df88e0269
Binary files /dev/null and b/BasicJava/OffsetDateTimeDemo_withOffsetSameLocal/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class differ
diff --git a/BasicJava/OffsetDateTimeDemo_withOffsetSameLocal/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java b/BasicJava/OffsetDateTimeDemo_withOffsetSameLocal/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java
new file mode 100644
index 000000000..b93c69868
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_withOffsetSameLocal/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java
@@ -0,0 +1,27 @@
+import java.time.OffsetDateTime;
+import java.time.ZoneOffset;
+
+public class OffsetDateTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+ OffsetDateTime offsetDateTime1 = OffsetDateTime
+ .parse("2017-02-03T10:15:30+01:00");
+ System.out.println("offsetDateTime1 = " + offsetDateTime1);
+ /*
+ * Parameters:
+ *
+ * offset - the zone offset to change to, not null
+ *
+ * Returns:
+ *
+ * an OffsetDateTime based on this date-time with the
+ * requested offset, not null
+ */
+ OffsetDateTime offsetDateTime2 = offsetDateTime1
+ .withOffsetSameLocal(ZoneOffset.UTC);
+ System.out.println("Offset changed = " + offsetDateTime2);
+ }
+
+}
diff --git a/BasicJava/OffsetDateTimeDemo_withOffsetSameLocal/Output.txt b/BasicJava/OffsetDateTimeDemo_withOffsetSameLocal/Output.txt
new file mode 100644
index 000000000..90a08819f
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_withOffsetSameLocal/Output.txt
@@ -0,0 +1,2 @@
+offsetDateTime1 = 2017-02-03T10:15:30+01:00
+Offset changed = 2017-02-03T10:15:30Z
diff --git a/BasicJava/OffsetDateTimeDemo_with_dayofyear/OffsetDateTimeDemo/.classpath b/BasicJava/OffsetDateTimeDemo_with_dayofyear/OffsetDateTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_with_dayofyear/OffsetDateTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/OffsetDateTimeDemo_with_dayofyear/OffsetDateTimeDemo/.project b/BasicJava/OffsetDateTimeDemo_with_dayofyear/OffsetDateTimeDemo/.project
new file mode 100644
index 000000000..fc86e1541
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_with_dayofyear/OffsetDateTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ OffsetDateTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/OffsetDateTimeDemo_with_dayofyear/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/OffsetDateTimeDemo_with_dayofyear/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_with_dayofyear/OffsetDateTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/OffsetDateTimeDemo_with_dayofyear/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class b/BasicJava/OffsetDateTimeDemo_with_dayofyear/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class
new file mode 100644
index 000000000..5d9549505
Binary files /dev/null and b/BasicJava/OffsetDateTimeDemo_with_dayofyear/OffsetDateTimeDemo/bin/OffsetDateTimeDemo.class differ
diff --git a/BasicJava/OffsetDateTimeDemo_with_dayofyear/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java b/BasicJava/OffsetDateTimeDemo_with_dayofyear/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java
new file mode 100644
index 000000000..3210da786
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_with_dayofyear/OffsetDateTimeDemo/src/OffsetDateTimeDemo.java
@@ -0,0 +1,37 @@
+import java.time.OffsetDateTime;
+import java.time.ZoneOffset;
+
+public class OffsetDateTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+ OffsetDateTime offsetDateTime1 = OffsetDateTime
+ .parse("2017-02-03T10:15:30+01:00");
+ System.out.println("offsetDateTime1 = " + offsetDateTime1);
+ /*
+ * Parameters:
+ *
+ * dayOfYear - the day-of-year to set in the result, from 1 to
+ * 365-366
+ *
+ * Returns:an OffsetDateTime based on this date with the
+ * requested day, not null
+ */
+ OffsetDateTime offsetDateTime2 = offsetDateTime1.withDayOfYear(150);
+ System.out.println("DayOfYear changed = " + offsetDateTime2);
+
+ /*
+ * Parameters:
+ *
+ * offset - the zone offset to change to, not null
+ *
+ * Returns:an OffsetDateTime based on this date-time with the
+ * requested offset, not null
+ */
+ OffsetDateTime offsetDateTime3 = offsetDateTime2
+ .withOffsetSameInstant(ZoneOffset.UTC);
+ System.out.println("Offset changed = " + offsetDateTime3);
+ }
+
+}
diff --git a/BasicJava/OffsetDateTimeDemo_with_dayofyear/Output.txt b/BasicJava/OffsetDateTimeDemo_with_dayofyear/Output.txt
new file mode 100644
index 000000000..0a4226644
--- /dev/null
+++ b/BasicJava/OffsetDateTimeDemo_with_dayofyear/Output.txt
@@ -0,0 +1,3 @@
+offsetDateTime1 = 2017-02-03T10:15:30+01:00
+DayOfYear changed = 2017-05-30T10:15:30+01:00
+Offset changed = 2017-05-30T09:15:30Z
diff --git a/BasicJava/OffsetTimeDemo-minus_temporalunit/OffsetTimeDemo/.classpath b/BasicJava/OffsetTimeDemo-minus_temporalunit/OffsetTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo-minus_temporalunit/OffsetTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/OffsetTimeDemo-minus_temporalunit/OffsetTimeDemo/.project b/BasicJava/OffsetTimeDemo-minus_temporalunit/OffsetTimeDemo/.project
new file mode 100644
index 000000000..d1f0664d6
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo-minus_temporalunit/OffsetTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ OffsetTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/OffsetTimeDemo-minus_temporalunit/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/OffsetTimeDemo-minus_temporalunit/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo-minus_temporalunit/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/OffsetTimeDemo-minus_temporalunit/OffsetTimeDemo/bin/OffsetTimeDemo.class b/BasicJava/OffsetTimeDemo-minus_temporalunit/OffsetTimeDemo/bin/OffsetTimeDemo.class
new file mode 100644
index 000000000..0a152b400
Binary files /dev/null and b/BasicJava/OffsetTimeDemo-minus_temporalunit/OffsetTimeDemo/bin/OffsetTimeDemo.class differ
diff --git a/BasicJava/OffsetTimeDemo-minus_temporalunit/OffsetTimeDemo/src/OffsetTimeDemo.java b/BasicJava/OffsetTimeDemo-minus_temporalunit/OffsetTimeDemo/src/OffsetTimeDemo.java
new file mode 100644
index 000000000..f3ac9b602
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo-minus_temporalunit/OffsetTimeDemo/src/OffsetTimeDemo.java
@@ -0,0 +1,33 @@
+import java.time.OffsetTime;
+import java.time.temporal.ChronoUnit;
+
+public class OffsetTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+ OffsetTime offsetTime1 = OffsetTime.now();
+ System.out.println("offsetTime1 = " + offsetTime1);
+
+ /*
+ * Parameters:
+ *
+ * amountToSubtract - the amount of the unit to subtract from
+ * the result, may be negative
+ *
+ * unit - the unit of the amount to subtract, not null
+ *
+ * Returns:
+ *
+ * an OffsetTime based on this time with the specified amount
+ * subtracted, not null
+ */
+ OffsetTime offsetTime2 = offsetTime1.minus(2, ChronoUnit.HOURS);
+ System.out.println("offsetTime2 = " + offsetTime2);
+
+
+ OffsetTime offsetTime3 = offsetTime2.minus(20, ChronoUnit.MINUTES);
+ System.out.println("offsetTime3 = " + offsetTime3);
+ }
+
+}
diff --git a/BasicJava/OffsetTimeDemo-minus_temporalunit/Output.txt b/BasicJava/OffsetTimeDemo-minus_temporalunit/Output.txt
new file mode 100644
index 000000000..ef0a0c53a
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo-minus_temporalunit/Output.txt
@@ -0,0 +1,3 @@
+offsetTime1 = 09:58:11.901+05:30
+offsetTime2 = 07:58:11.901+05:30
+offsetTime3 = 07:38:11.901+05:30
diff --git a/BasicJava/OffsetTimeDemo_atDate/OffsetTimeDemo/.classpath b/BasicJava/OffsetTimeDemo_atDate/OffsetTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_atDate/OffsetTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/OffsetTimeDemo_atDate/OffsetTimeDemo/.project b/BasicJava/OffsetTimeDemo_atDate/OffsetTimeDemo/.project
new file mode 100644
index 000000000..d1f0664d6
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_atDate/OffsetTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ OffsetTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/OffsetTimeDemo_atDate/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/OffsetTimeDemo_atDate/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_atDate/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/OffsetTimeDemo_atDate/OffsetTimeDemo/bin/OffsetTimeDemo.class b/BasicJava/OffsetTimeDemo_atDate/OffsetTimeDemo/bin/OffsetTimeDemo.class
new file mode 100644
index 000000000..6b3f2a256
Binary files /dev/null and b/BasicJava/OffsetTimeDemo_atDate/OffsetTimeDemo/bin/OffsetTimeDemo.class differ
diff --git a/BasicJava/OffsetTimeDemo_atDate/OffsetTimeDemo/src/OffsetTimeDemo.java b/BasicJava/OffsetTimeDemo_atDate/OffsetTimeDemo/src/OffsetTimeDemo.java
new file mode 100644
index 000000000..2f49f68bc
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_atDate/OffsetTimeDemo/src/OffsetTimeDemo.java
@@ -0,0 +1,33 @@
+import java.time.LocalDate;
+import java.time.OffsetDateTime;
+import java.time.OffsetTime;
+
+public class OffsetTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+
+ OffsetTime offsetTime = OffsetTime.parse("10:30:30+05:30");
+ System.out.println("offsetTime = " + offsetTime);
+
+ LocalDate localDate = LocalDate.now();
+ System.out.println("localDate = " + localDate);
+
+ /*
+ * Combines this time with a date to create an OffsetDateTime.
+ *
+ * Parameters:
+ *
+ * date - the date to combine with, not null
+ *
+ * Returns:
+ *
+ * the offset date-time formed from this time and the
+ * specified date, not null
+ */
+ OffsetDateTime offsetDateTime = offsetTime.atDate(localDate);
+ System.out.println("offsetDateTime = " + offsetDateTime);
+ }
+
+}
diff --git a/BasicJava/OffsetTimeDemo_atDate/Output.txt b/BasicJava/OffsetTimeDemo_atDate/Output.txt
new file mode 100644
index 000000000..dc04b332c
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_atDate/Output.txt
@@ -0,0 +1,3 @@
+offsetTime = 10:30:30+05:30
+localDate = 2018-01-31
+offsetDateTime = 2018-01-31T10:30:30+05:30
diff --git a/BasicJava/OffsetTimeDemo_from/OffsetTimeDemo/.classpath b/BasicJava/OffsetTimeDemo_from/OffsetTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_from/OffsetTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/OffsetTimeDemo_from/OffsetTimeDemo/.project b/BasicJava/OffsetTimeDemo_from/OffsetTimeDemo/.project
new file mode 100644
index 000000000..d1f0664d6
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_from/OffsetTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ OffsetTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/OffsetTimeDemo_from/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/OffsetTimeDemo_from/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_from/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/OffsetTimeDemo_from/OffsetTimeDemo/bin/OffsetTimeDemo.class b/BasicJava/OffsetTimeDemo_from/OffsetTimeDemo/bin/OffsetTimeDemo.class
new file mode 100644
index 000000000..3a524809c
Binary files /dev/null and b/BasicJava/OffsetTimeDemo_from/OffsetTimeDemo/bin/OffsetTimeDemo.class differ
diff --git a/BasicJava/OffsetTimeDemo_from/OffsetTimeDemo/src/OffsetTimeDemo.java b/BasicJava/OffsetTimeDemo_from/OffsetTimeDemo/src/OffsetTimeDemo.java
new file mode 100644
index 000000000..c0cdf900f
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_from/OffsetTimeDemo/src/OffsetTimeDemo.java
@@ -0,0 +1,26 @@
+import java.time.OffsetTime;
+import java.time.ZonedDateTime;
+
+public class OffsetTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+
+ ZonedDateTime zonedDateTime = ZonedDateTime.now();
+ System.out.println("zonedDateTime = " + zonedDateTime);
+
+ /*
+ * Parameters:
+ *
+ * temporal - the temporal object to convert, not null
+ *
+ * Returns:
+ *
+ * the offset time, not null
+ */
+ OffsetTime offsetTime = OffsetTime.from(zonedDateTime);
+ System.out.println("offsetTime = " + offsetTime);
+ }
+
+}
diff --git a/BasicJava/OffsetTimeDemo_from/Output.txt b/BasicJava/OffsetTimeDemo_from/Output.txt
new file mode 100644
index 000000000..292c4a695
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_from/Output.txt
@@ -0,0 +1,2 @@
+zonedDateTime = 2018-02-02T09:44:31.196+05:30[Asia/Calcutta]
+offsetTime = 09:44:31.196+05:30
diff --git a/BasicJava/OffsetTimeDemo_get_field/OffsetTimeDemo/.classpath b/BasicJava/OffsetTimeDemo_get_field/OffsetTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_get_field/OffsetTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/OffsetTimeDemo_get_field/OffsetTimeDemo/.project b/BasicJava/OffsetTimeDemo_get_field/OffsetTimeDemo/.project
new file mode 100644
index 000000000..d1f0664d6
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_get_field/OffsetTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ OffsetTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/OffsetTimeDemo_get_field/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/OffsetTimeDemo_get_field/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_get_field/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/OffsetTimeDemo_get_field/OffsetTimeDemo/bin/OffsetTimeDemo.class b/BasicJava/OffsetTimeDemo_get_field/OffsetTimeDemo/bin/OffsetTimeDemo.class
new file mode 100644
index 000000000..0e7557c56
Binary files /dev/null and b/BasicJava/OffsetTimeDemo_get_field/OffsetTimeDemo/bin/OffsetTimeDemo.class differ
diff --git a/BasicJava/OffsetTimeDemo_get_field/OffsetTimeDemo/src/OffsetTimeDemo.java b/BasicJava/OffsetTimeDemo_get_field/OffsetTimeDemo/src/OffsetTimeDemo.java
new file mode 100644
index 000000000..28e7cfa39
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_get_field/OffsetTimeDemo/src/OffsetTimeDemo.java
@@ -0,0 +1,32 @@
+import java.time.OffsetTime;
+import java.time.temporal.ChronoField;
+
+public class OffsetTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+ OffsetTime offsetTime = OffsetTime.now();
+ System.out.println("offsetTime = " + offsetTime);
+
+ /*
+ * Parameters:
+ *
+ * field - the field to get, not null
+ *
+ * Returns:
+ *
+ * the value for the field
+ *
+ */
+ int hour = offsetTime.get(ChronoField.HOUR_OF_DAY);
+ System.out.println("hour = " + hour);
+
+ int minute = offsetTime.get(ChronoField.MINUTE_OF_HOUR);
+ System.out.println("minute = " + minute);
+
+ int seconds = offsetTime.get(ChronoField.SECOND_OF_MINUTE);
+ System.out.println("seconds = " + seconds);
+ }
+
+}
diff --git a/BasicJava/OffsetTimeDemo_get_field/Output.txt b/BasicJava/OffsetTimeDemo_get_field/Output.txt
new file mode 100644
index 000000000..2e6e122a5
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_get_field/Output.txt
@@ -0,0 +1,4 @@
+offsetTime = 09:58:56.596+05:30
+hour = 9
+minute = 58
+seconds = 56
diff --git a/BasicJava/OffsetTimeDemo_intro/OffsetTimeDemo/.classpath b/BasicJava/OffsetTimeDemo_intro/OffsetTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_intro/OffsetTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/OffsetTimeDemo_intro/OffsetTimeDemo/.project b/BasicJava/OffsetTimeDemo_intro/OffsetTimeDemo/.project
new file mode 100644
index 000000000..d1f0664d6
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_intro/OffsetTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ OffsetTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/OffsetTimeDemo_intro/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/OffsetTimeDemo_intro/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_intro/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/OffsetTimeDemo_intro/OffsetTimeDemo/bin/OffsetTimeDemo.class b/BasicJava/OffsetTimeDemo_intro/OffsetTimeDemo/bin/OffsetTimeDemo.class
new file mode 100644
index 000000000..fe584bd04
Binary files /dev/null and b/BasicJava/OffsetTimeDemo_intro/OffsetTimeDemo/bin/OffsetTimeDemo.class differ
diff --git a/BasicJava/OffsetTimeDemo_intro/OffsetTimeDemo/src/OffsetTimeDemo.java b/BasicJava/OffsetTimeDemo_intro/OffsetTimeDemo/src/OffsetTimeDemo.java
new file mode 100644
index 000000000..defbd2af0
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_intro/OffsetTimeDemo/src/OffsetTimeDemo.java
@@ -0,0 +1,35 @@
+import java.time.OffsetTime;
+import java.time.ZoneOffset;
+
+public class OffsetTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+
+ /*
+ * Returns:
+ *
+ * the current time using the system clock and default
+ * time-zone, not null
+ */
+ OffsetTime currentTime = OffsetTime.now();
+ System.out.println("currentTime = " + currentTime);
+
+ int hour = currentTime.getHour();
+ System.out.println("hour = " + hour);
+
+ int minute = currentTime.getMinute();
+ System.out.println("minute = " + minute);
+
+ int seconds = currentTime.getSecond();
+ System.out.println("seconds = " + seconds);
+
+ int nanoSeconds = currentTime.getNano();
+ System.out.println("nanoSeconds = " + nanoSeconds);
+
+ ZoneOffset zoneOffset = currentTime.getOffset();
+ System.out.println("zoneOffset = " + zoneOffset.getId());
+ }
+
+}
diff --git a/BasicJava/OffsetTimeDemo_intro/Output.txt b/BasicJava/OffsetTimeDemo_intro/Output.txt
new file mode 100644
index 000000000..47eada1d9
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_intro/Output.txt
@@ -0,0 +1,6 @@
+currentTime = 09:55:12.169+05:30
+hour = 9
+minute = 55
+seconds = 12
+nanoSeconds = 169000000
+zoneOffset = +05:30
diff --git a/BasicJava/OffsetTimeDemo_isAfter_before/OffsetTimeDemo/.classpath b/BasicJava/OffsetTimeDemo_isAfter_before/OffsetTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_isAfter_before/OffsetTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/OffsetTimeDemo_isAfter_before/OffsetTimeDemo/.project b/BasicJava/OffsetTimeDemo_isAfter_before/OffsetTimeDemo/.project
new file mode 100644
index 000000000..d1f0664d6
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_isAfter_before/OffsetTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ OffsetTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/OffsetTimeDemo_isAfter_before/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/OffsetTimeDemo_isAfter_before/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_isAfter_before/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/OffsetTimeDemo_isAfter_before/OffsetTimeDemo/bin/OffsetTimeDemo.class b/BasicJava/OffsetTimeDemo_isAfter_before/OffsetTimeDemo/bin/OffsetTimeDemo.class
new file mode 100644
index 000000000..f3ab7c5df
Binary files /dev/null and b/BasicJava/OffsetTimeDemo_isAfter_before/OffsetTimeDemo/bin/OffsetTimeDemo.class differ
diff --git a/BasicJava/OffsetTimeDemo_isAfter_before/OffsetTimeDemo/src/OffsetTimeDemo.java b/BasicJava/OffsetTimeDemo_isAfter_before/OffsetTimeDemo/src/OffsetTimeDemo.java
new file mode 100644
index 000000000..008e66206
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_isAfter_before/OffsetTimeDemo/src/OffsetTimeDemo.java
@@ -0,0 +1,35 @@
+import java.time.OffsetTime;
+
+public class OffsetTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+
+ OffsetTime offsetTime1 = OffsetTime.parse("10:30:30+05:30");
+ System.out.println("offsetTime1 = " + offsetTime1);
+
+ OffsetTime offsetTime2 = OffsetTime.parse("12:30:30+05:30");
+ System.out.println("offsetTime2 = " + offsetTime2);
+
+ /*
+ * Returns:true if this is equal to the other time
+ */
+ System.out.println(offsetTime1.equals(offsetTime2));
+
+ /*
+ * Returns:true if this is after the instant of the specified
+ * time
+ */
+ System.out.println(offsetTime1.isAfter(offsetTime2));
+
+ /*
+ * Returns:true if this is before the instant of the specified
+ * time
+ */
+
+ System.out.println(offsetTime1.isBefore(offsetTime2));
+
+ }
+
+}
diff --git a/BasicJava/OffsetTimeDemo_isAfter_before/Output.txt b/BasicJava/OffsetTimeDemo_isAfter_before/Output.txt
new file mode 100644
index 000000000..af3fd80e4
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_isAfter_before/Output.txt
@@ -0,0 +1,5 @@
+offsetTime1 = 10:30:30+05:30
+offsetTime2 = 12:30:30+05:30
+false
+false
+true
diff --git a/BasicJava/OffsetTimeDemo_minus/OffsetTimeDemo/.classpath b/BasicJava/OffsetTimeDemo_minus/OffsetTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_minus/OffsetTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/OffsetTimeDemo_minus/OffsetTimeDemo/.project b/BasicJava/OffsetTimeDemo_minus/OffsetTimeDemo/.project
new file mode 100644
index 000000000..d1f0664d6
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_minus/OffsetTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ OffsetTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/OffsetTimeDemo_minus/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/OffsetTimeDemo_minus/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_minus/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/OffsetTimeDemo_minus/OffsetTimeDemo/bin/OffsetTimeDemo.class b/BasicJava/OffsetTimeDemo_minus/OffsetTimeDemo/bin/OffsetTimeDemo.class
new file mode 100644
index 000000000..d07bfa4d5
Binary files /dev/null and b/BasicJava/OffsetTimeDemo_minus/OffsetTimeDemo/bin/OffsetTimeDemo.class differ
diff --git a/BasicJava/OffsetTimeDemo_minus/OffsetTimeDemo/src/OffsetTimeDemo.java b/BasicJava/OffsetTimeDemo_minus/OffsetTimeDemo/src/OffsetTimeDemo.java
new file mode 100644
index 000000000..db30cfdce
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_minus/OffsetTimeDemo/src/OffsetTimeDemo.java
@@ -0,0 +1,26 @@
+import java.time.OffsetTime;
+
+public class OffsetTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+
+ OffsetTime offsetTime1 = OffsetTime.now();
+ System.out.println("offsetTime1 = " + offsetTime1);
+
+ OffsetTime offsetTime2 = offsetTime1.minusHours(1);
+ System.out.println("Hour changed = " + offsetTime2);
+
+ OffsetTime offsetTime3 = offsetTime2.minusMinutes(10);
+ System.out.println("Min changed = " + offsetTime3);
+
+ OffsetTime offsetTime4 = offsetTime3.minusSeconds(20);
+ System.out.println("Sec changed = " + offsetTime4);
+
+ OffsetTime offsetTime5 = offsetTime4.minusNanos(50);
+ System.out.println("NanoSec changed = " + offsetTime5);
+
+ }
+
+}
diff --git a/BasicJava/OffsetTimeDemo_minus/Output.txt b/BasicJava/OffsetTimeDemo_minus/Output.txt
new file mode 100644
index 000000000..fea76ff4f
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_minus/Output.txt
@@ -0,0 +1,5 @@
+offsetTime1 = 09:40:02.729+05:30
+Hour changed = 08:40:02.729+05:30
+Min changed = 08:30:02.729+05:30
+Sec changed = 08:29:42.729+05:30
+NanoSec changed = 08:29:42.728999950+05:30
diff --git a/BasicJava/OffsetTimeDemo_minus_temporalAmount/OffsetTimeDemo/.classpath b/BasicJava/OffsetTimeDemo_minus_temporalAmount/OffsetTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_minus_temporalAmount/OffsetTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/OffsetTimeDemo_minus_temporalAmount/OffsetTimeDemo/.project b/BasicJava/OffsetTimeDemo_minus_temporalAmount/OffsetTimeDemo/.project
new file mode 100644
index 000000000..d1f0664d6
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_minus_temporalAmount/OffsetTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ OffsetTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/OffsetTimeDemo_minus_temporalAmount/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/OffsetTimeDemo_minus_temporalAmount/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_minus_temporalAmount/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/OffsetTimeDemo_minus_temporalAmount/OffsetTimeDemo/bin/OffsetTimeDemo.class b/BasicJava/OffsetTimeDemo_minus_temporalAmount/OffsetTimeDemo/bin/OffsetTimeDemo.class
new file mode 100644
index 000000000..667c3332e
Binary files /dev/null and b/BasicJava/OffsetTimeDemo_minus_temporalAmount/OffsetTimeDemo/bin/OffsetTimeDemo.class differ
diff --git a/BasicJava/OffsetTimeDemo_minus_temporalAmount/OffsetTimeDemo/src/OffsetTimeDemo.java b/BasicJava/OffsetTimeDemo_minus_temporalAmount/OffsetTimeDemo/src/OffsetTimeDemo.java
new file mode 100644
index 000000000..06526cdef
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_minus_temporalAmount/OffsetTimeDemo/src/OffsetTimeDemo.java
@@ -0,0 +1,29 @@
+import java.time.Duration;
+import java.time.OffsetTime;
+
+public class OffsetTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+ OffsetTime offsetTime1 = OffsetTime.now();
+ System.out.println("offsetTime1 = " + offsetTime1);
+
+ Duration duration = Duration.ofHours(2);
+ System.out.println("duration = "+duration);
+
+ /*
+ * Parameters:
+ *
+ * amountToSubtract - the amount to subtract, not null
+ *
+ * Returns:
+ *
+ * an OffsetTime based on this time with the subtraction made,
+ * not null
+ */
+ OffsetTime offsetTime2 = offsetTime1.minus(duration);
+ System.out.println("offsetTime2 = " + offsetTime2);
+ }
+
+}
diff --git a/BasicJava/OffsetTimeDemo_minus_temporalAmount/Output.txt b/BasicJava/OffsetTimeDemo_minus_temporalAmount/Output.txt
new file mode 100644
index 000000000..269176fba
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_minus_temporalAmount/Output.txt
@@ -0,0 +1,3 @@
+offsetTime1 = 10:08:03.779+05:30
+duration = PT2H
+offsetTime2 = 08:08:03.779+05:30
diff --git a/BasicJava/OffsetTimeDemo_now_clock_zone/OffsetTimeDemo/.classpath b/BasicJava/OffsetTimeDemo_now_clock_zone/OffsetTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_now_clock_zone/OffsetTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/OffsetTimeDemo_now_clock_zone/OffsetTimeDemo/.project b/BasicJava/OffsetTimeDemo_now_clock_zone/OffsetTimeDemo/.project
new file mode 100644
index 000000000..d1f0664d6
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_now_clock_zone/OffsetTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ OffsetTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/OffsetTimeDemo_now_clock_zone/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/OffsetTimeDemo_now_clock_zone/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_now_clock_zone/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/OffsetTimeDemo_now_clock_zone/OffsetTimeDemo/bin/OffsetTimeDemo.class b/BasicJava/OffsetTimeDemo_now_clock_zone/OffsetTimeDemo/bin/OffsetTimeDemo.class
new file mode 100644
index 000000000..2305be00f
Binary files /dev/null and b/BasicJava/OffsetTimeDemo_now_clock_zone/OffsetTimeDemo/bin/OffsetTimeDemo.class differ
diff --git a/BasicJava/OffsetTimeDemo_now_clock_zone/OffsetTimeDemo/src/OffsetTimeDemo.java b/BasicJava/OffsetTimeDemo_now_clock_zone/OffsetTimeDemo/src/OffsetTimeDemo.java
new file mode 100644
index 000000000..777b3994a
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_now_clock_zone/OffsetTimeDemo/src/OffsetTimeDemo.java
@@ -0,0 +1,43 @@
+import java.time.Clock;
+import java.time.OffsetTime;
+import java.time.ZoneId;
+
+public class OffsetTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+
+ Clock clock = Clock.systemUTC();
+ System.out.println(clock);
+
+ /*
+ * Parameters:
+ *
+ * clock - the clock to use, not null
+ *
+ * Returns:
+ *
+ * the current time, not null
+ */
+
+ OffsetTime offsetTime1 = OffsetTime.now(clock);
+ System.out.println("offsetTime1 = " + offsetTime1);
+
+ ZoneId zoneId = ZoneId.systemDefault();
+ System.out.println(zoneId);
+
+ /*
+ * Parameters:
+ *
+ * zone - the zone ID to use, not null
+ *
+ * Returns:
+ *
+ * the current time using the system clock, not null
+ */
+ OffsetTime offsetTime2 = OffsetTime.now(zoneId);
+ System.out.println("offsetTime2 = " + offsetTime2);
+ }
+
+}
diff --git a/BasicJava/OffsetTimeDemo_now_clock_zone/Output.txt b/BasicJava/OffsetTimeDemo_now_clock_zone/Output.txt
new file mode 100644
index 000000000..34cf2285d
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_now_clock_zone/Output.txt
@@ -0,0 +1,4 @@
+SystemClock[Z]
+offsetTime1 = 02:57:23.033Z
+Asia/Calcutta
+offsetTime2 = 08:27:48.717+05:30
diff --git a/BasicJava/OffsetTimeDemo_ofInstant/OffsetTimeDemo/.classpath b/BasicJava/OffsetTimeDemo_ofInstant/OffsetTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_ofInstant/OffsetTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/OffsetTimeDemo_ofInstant/OffsetTimeDemo/.project b/BasicJava/OffsetTimeDemo_ofInstant/OffsetTimeDemo/.project
new file mode 100644
index 000000000..d1f0664d6
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_ofInstant/OffsetTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ OffsetTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/OffsetTimeDemo_ofInstant/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/OffsetTimeDemo_ofInstant/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_ofInstant/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/OffsetTimeDemo_ofInstant/OffsetTimeDemo/bin/OffsetTimeDemo.class b/BasicJava/OffsetTimeDemo_ofInstant/OffsetTimeDemo/bin/OffsetTimeDemo.class
new file mode 100644
index 000000000..057839993
Binary files /dev/null and b/BasicJava/OffsetTimeDemo_ofInstant/OffsetTimeDemo/bin/OffsetTimeDemo.class differ
diff --git a/BasicJava/OffsetTimeDemo_ofInstant/OffsetTimeDemo/src/OffsetTimeDemo.java b/BasicJava/OffsetTimeDemo_ofInstant/OffsetTimeDemo/src/OffsetTimeDemo.java
new file mode 100644
index 000000000..ddf6a7eb9
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_ofInstant/OffsetTimeDemo/src/OffsetTimeDemo.java
@@ -0,0 +1,36 @@
+import java.time.Instant;
+import java.time.OffsetTime;
+import java.time.ZoneId;
+
+public class OffsetTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+
+ Instant instant = Instant.now();
+ System.out.println("instant = " + instant);
+
+ ZoneId zoneId = ZoneId.systemDefault();
+ System.out.println("zondId = "+zoneId);
+
+ /*
+ * Obtains an instance of OffsetTime from an Instant and zone ID.
+ *
+ * Parameters:
+ *
+ * instant - the instant to create the time from, not null
+ *
+ * zone - the time-zone, which may be an offset, not null
+ *
+ * Returns:
+ *
+ * the offset time, not null
+ */
+
+ OffsetTime offsetTime = OffsetTime.ofInstant(instant, zoneId);
+ System.out.println("offsetTime = " + offsetTime);
+
+ }
+
+}
diff --git a/BasicJava/OffsetTimeDemo_ofInstant/Output.txt b/BasicJava/OffsetTimeDemo_ofInstant/Output.txt
new file mode 100644
index 000000000..00ae41d53
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_ofInstant/Output.txt
@@ -0,0 +1,3 @@
+instant = 2018-02-04T02:36:47.762Z
+zondId = Asia/Calcutta
+offsetTime = 08:06:47.762+05:30
diff --git a/BasicJava/OffsetTimeDemo_of_methods/OffsetTimeDemo/.classpath b/BasicJava/OffsetTimeDemo_of_methods/OffsetTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_of_methods/OffsetTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/OffsetTimeDemo_of_methods/OffsetTimeDemo/.project b/BasicJava/OffsetTimeDemo_of_methods/OffsetTimeDemo/.project
new file mode 100644
index 000000000..d1f0664d6
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_of_methods/OffsetTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ OffsetTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/OffsetTimeDemo_of_methods/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/OffsetTimeDemo_of_methods/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_of_methods/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/OffsetTimeDemo_of_methods/OffsetTimeDemo/bin/OffsetTimeDemo.class b/BasicJava/OffsetTimeDemo_of_methods/OffsetTimeDemo/bin/OffsetTimeDemo.class
new file mode 100644
index 000000000..c05263fc9
Binary files /dev/null and b/BasicJava/OffsetTimeDemo_of_methods/OffsetTimeDemo/bin/OffsetTimeDemo.class differ
diff --git a/BasicJava/OffsetTimeDemo_of_methods/OffsetTimeDemo/src/OffsetTimeDemo.java b/BasicJava/OffsetTimeDemo_of_methods/OffsetTimeDemo/src/OffsetTimeDemo.java
new file mode 100644
index 000000000..91b614a7a
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_of_methods/OffsetTimeDemo/src/OffsetTimeDemo.java
@@ -0,0 +1,50 @@
+import java.time.LocalTime;
+import java.time.OffsetTime;
+import java.time.ZoneOffset;
+
+public class OffsetTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+
+ /*
+ * Parameters:
+ *
+ * hour - the hour-of-day to represent, from 0 to 23
+ *
+ * minute - the minute-of-hour to represent, from 0 to 59
+ *
+ * second - the second-of-minute to represent, from 0 to 59
+ *
+ * nanoOfSecond - the nano-of-second to represent, from 0 to
+ * 999,999,999
+ *
+ * offset - the zone offset, not null
+ *
+ * Returns:
+ *
+ * the offset time, not null
+ */
+
+ OffsetTime offsetTime1 = OffsetTime.of(6, 30, 40, 50000,
+ ZoneOffset.UTC);
+ System.out.println("offsetTime1 = " + offsetTime1);
+
+ LocalTime localTime = LocalTime.now();
+ /*
+ * Parameters:
+ *
+ * time - the local time, not null
+ *
+ * offset - the zone offset, not null
+ *
+ * Returns:
+ *
+ * the offset time, not null
+ */
+ OffsetTime offsetTime2 = OffsetTime.of(localTime, ZoneOffset.UTC);
+ System.out.println("offsetTime2 = " + offsetTime2);
+ }
+
+}
diff --git a/BasicJava/OffsetTimeDemo_of_methods/Output.txt b/BasicJava/OffsetTimeDemo_of_methods/Output.txt
new file mode 100644
index 000000000..4987782b7
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_of_methods/Output.txt
@@ -0,0 +1,2 @@
+offsetTime1 = 06:30:40.000050Z
+offsetTime2 = 07:51:57.581Z
diff --git a/BasicJava/OffsetTimeDemo_plus/OffsetTimeDemo/.classpath b/BasicJava/OffsetTimeDemo_plus/OffsetTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_plus/OffsetTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/OffsetTimeDemo_plus/OffsetTimeDemo/.project b/BasicJava/OffsetTimeDemo_plus/OffsetTimeDemo/.project
new file mode 100644
index 000000000..d1f0664d6
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_plus/OffsetTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ OffsetTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/OffsetTimeDemo_plus/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/OffsetTimeDemo_plus/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_plus/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/OffsetTimeDemo_plus/OffsetTimeDemo/bin/OffsetTimeDemo.class b/BasicJava/OffsetTimeDemo_plus/OffsetTimeDemo/bin/OffsetTimeDemo.class
new file mode 100644
index 000000000..b1797afc7
Binary files /dev/null and b/BasicJava/OffsetTimeDemo_plus/OffsetTimeDemo/bin/OffsetTimeDemo.class differ
diff --git a/BasicJava/OffsetTimeDemo_plus/OffsetTimeDemo/src/OffsetTimeDemo.java b/BasicJava/OffsetTimeDemo_plus/OffsetTimeDemo/src/OffsetTimeDemo.java
new file mode 100644
index 000000000..b78bd07ba
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_plus/OffsetTimeDemo/src/OffsetTimeDemo.java
@@ -0,0 +1,26 @@
+import java.time.OffsetTime;
+
+public class OffsetTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+
+ OffsetTime offsetTime1 = OffsetTime.now();
+ System.out.println("offsetTime1 = " + offsetTime1);
+
+ OffsetTime offsetTime2 = offsetTime1.plusHours(1);
+ System.out.println("Hour changed = " + offsetTime2);
+
+ OffsetTime offsetTime3 = offsetTime2.plusMinutes(10);
+ System.out.println("Min changed = " + offsetTime3);
+
+ OffsetTime offsetTime4 = offsetTime3.plusSeconds(20);
+ System.out.println("Sec changed = " + offsetTime4);
+
+ OffsetTime offsetTime5 = offsetTime4.plusNanos(50);
+ System.out.println("NanoSec changed = " + offsetTime5);
+
+ }
+
+}
diff --git a/BasicJava/OffsetTimeDemo_plus/Output.txt b/BasicJava/OffsetTimeDemo_plus/Output.txt
new file mode 100644
index 000000000..a1366f41c
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_plus/Output.txt
@@ -0,0 +1,5 @@
+offsetTime1 = 09:52:52.892+05:30
+Hour changed = 10:52:52.892+05:30
+Min changed = 11:02:52.892+05:30
+Sec changed = 11:03:12.892+05:30
+NanoSec changed = 11:03:12.892000050+05:30
diff --git a/BasicJava/OffsetTimeDemo_plus_long_unit/OffsetTimeDemo/.classpath b/BasicJava/OffsetTimeDemo_plus_long_unit/OffsetTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_plus_long_unit/OffsetTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/OffsetTimeDemo_plus_long_unit/OffsetTimeDemo/.project b/BasicJava/OffsetTimeDemo_plus_long_unit/OffsetTimeDemo/.project
new file mode 100644
index 000000000..d1f0664d6
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_plus_long_unit/OffsetTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ OffsetTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/OffsetTimeDemo_plus_long_unit/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/OffsetTimeDemo_plus_long_unit/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_plus_long_unit/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/OffsetTimeDemo_plus_long_unit/OffsetTimeDemo/bin/OffsetTimeDemo.class b/BasicJava/OffsetTimeDemo_plus_long_unit/OffsetTimeDemo/bin/OffsetTimeDemo.class
new file mode 100644
index 000000000..8121b0719
Binary files /dev/null and b/BasicJava/OffsetTimeDemo_plus_long_unit/OffsetTimeDemo/bin/OffsetTimeDemo.class differ
diff --git a/BasicJava/OffsetTimeDemo_plus_long_unit/OffsetTimeDemo/src/OffsetTimeDemo.java b/BasicJava/OffsetTimeDemo_plus_long_unit/OffsetTimeDemo/src/OffsetTimeDemo.java
new file mode 100644
index 000000000..7e57d86d5
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_plus_long_unit/OffsetTimeDemo/src/OffsetTimeDemo.java
@@ -0,0 +1,33 @@
+import java.time.OffsetTime;
+import java.time.temporal.ChronoUnit;
+
+public class OffsetTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+ OffsetTime offsetTime1 = OffsetTime.now();
+ System.out.println("offsetTime1 = " + offsetTime1);
+
+ /*
+ * Parameters:
+ *
+ * amountToAdd - the amount of the unit to add to the result,
+ * may be negative
+ *
+ * unit - the unit of the amount to add, not null
+ *
+ * Returns:
+ *
+ * an OffsetTime based on this time with the specified
+ * amount added, not null
+ */
+ OffsetTime offsetTime2 = offsetTime1.plus(2, ChronoUnit.HOURS);
+ System.out.println("offsetTime2 = " + offsetTime2);
+
+
+ OffsetTime offsetTime3 = offsetTime2.plus(20, ChronoUnit.MINUTES);
+ System.out.println("offsetTime3 = " + offsetTime3);
+ }
+
+}
diff --git a/BasicJava/OffsetTimeDemo_plus_long_unit/Output.txt b/BasicJava/OffsetTimeDemo_plus_long_unit/Output.txt
new file mode 100644
index 000000000..54967cf21
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_plus_long_unit/Output.txt
@@ -0,0 +1,3 @@
+offsetTime1 = 08:16:57.698+05:30
+offsetTime2 = 10:16:57.698+05:30
+offsetTime3 = 10:36:57.698+05:30
diff --git a/BasicJava/OffsetTimeDemo_plus_temporalAmount/OffsetTimeDemo/.classpath b/BasicJava/OffsetTimeDemo_plus_temporalAmount/OffsetTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_plus_temporalAmount/OffsetTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/OffsetTimeDemo_plus_temporalAmount/OffsetTimeDemo/.project b/BasicJava/OffsetTimeDemo_plus_temporalAmount/OffsetTimeDemo/.project
new file mode 100644
index 000000000..d1f0664d6
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_plus_temporalAmount/OffsetTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ OffsetTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/OffsetTimeDemo_plus_temporalAmount/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/OffsetTimeDemo_plus_temporalAmount/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_plus_temporalAmount/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/OffsetTimeDemo_plus_temporalAmount/OffsetTimeDemo/bin/OffsetTimeDemo.class b/BasicJava/OffsetTimeDemo_plus_temporalAmount/OffsetTimeDemo/bin/OffsetTimeDemo.class
new file mode 100644
index 000000000..5fac3cbe6
Binary files /dev/null and b/BasicJava/OffsetTimeDemo_plus_temporalAmount/OffsetTimeDemo/bin/OffsetTimeDemo.class differ
diff --git a/BasicJava/OffsetTimeDemo_plus_temporalAmount/OffsetTimeDemo/src/OffsetTimeDemo.java b/BasicJava/OffsetTimeDemo_plus_temporalAmount/OffsetTimeDemo/src/OffsetTimeDemo.java
new file mode 100644
index 000000000..775fadde6
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_plus_temporalAmount/OffsetTimeDemo/src/OffsetTimeDemo.java
@@ -0,0 +1,29 @@
+import java.time.Duration;
+import java.time.OffsetTime;
+
+public class OffsetTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+ OffsetTime offsetTime1 = OffsetTime.now();
+ System.out.println("offsetTime1 = " + offsetTime1);
+
+ Duration duration = Duration.ofHours(2);
+ System.out.println("duration = "+duration);
+
+ /*
+ * Parameters:
+ *
+ * amountToAdd - the amount to add, not null
+ *
+ * Returns:
+ *
+ * an OffsetTime based on this time with the addition made,
+ * not null
+ */
+ OffsetTime offsetTime2 = offsetTime1.plus(duration);
+ System.out.println("offsetTime2 = " + offsetTime2);
+ }
+
+}
diff --git a/BasicJava/OffsetTimeDemo_plus_temporalAmount/Output.txt b/BasicJava/OffsetTimeDemo_plus_temporalAmount/Output.txt
new file mode 100644
index 000000000..bfc32cf81
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_plus_temporalAmount/Output.txt
@@ -0,0 +1,3 @@
+offsetTime1 = 07:58:35.706+05:30
+duration = PT2H
+offsetTime2 = 09:58:35.706+05:30
diff --git a/BasicJava/OffsetTimeDemo_range/OffsetTimeDemo/.classpath b/BasicJava/OffsetTimeDemo_range/OffsetTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_range/OffsetTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/OffsetTimeDemo_range/OffsetTimeDemo/.project b/BasicJava/OffsetTimeDemo_range/OffsetTimeDemo/.project
new file mode 100644
index 000000000..d1f0664d6
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_range/OffsetTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ OffsetTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/OffsetTimeDemo_range/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/OffsetTimeDemo_range/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_range/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/OffsetTimeDemo_range/OffsetTimeDemo/bin/OffsetTimeDemo.class b/BasicJava/OffsetTimeDemo_range/OffsetTimeDemo/bin/OffsetTimeDemo.class
new file mode 100644
index 000000000..808fa0e99
Binary files /dev/null and b/BasicJava/OffsetTimeDemo_range/OffsetTimeDemo/bin/OffsetTimeDemo.class differ
diff --git a/BasicJava/OffsetTimeDemo_range/OffsetTimeDemo/src/OffsetTimeDemo.java b/BasicJava/OffsetTimeDemo_range/OffsetTimeDemo/src/OffsetTimeDemo.java
new file mode 100644
index 000000000..0b1030793
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_range/OffsetTimeDemo/src/OffsetTimeDemo.java
@@ -0,0 +1,32 @@
+import java.time.OffsetTime;
+import java.time.temporal.ChronoField;
+import java.time.temporal.ValueRange;
+
+public class OffsetTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+
+ OffsetTime offsetTime = OffsetTime.now();
+ System.out.println("offsetTime = " + offsetTime);
+
+ /*
+ * Gets the range of valid values for the specified field.
+ *
+ * Parameters:
+ *
+ * field - the field to query the range for, not null
+ *
+ * Returns:
+ *
+ * the range of valid values for the field, not null
+ */
+ ValueRange valueRange = offsetTime.range(ChronoField.CLOCK_HOUR_OF_DAY);
+
+ System.out.println("Range = " + valueRange);
+ System.out.println("Max = " + valueRange.getMaximum());
+ System.out.println("min = " + valueRange.getMinimum());
+ }
+
+}
diff --git a/BasicJava/OffsetTimeDemo_range/Output.txt b/BasicJava/OffsetTimeDemo_range/Output.txt
new file mode 100644
index 000000000..0cc4c2100
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_range/Output.txt
@@ -0,0 +1,4 @@
+offsetTime = 08:19:20.784+05:30
+Range = 1 - 24
+Max = 24
+min = 1
diff --git a/BasicJava/OffsetTimeDemo_with/OffsetTimeDemo/.classpath b/BasicJava/OffsetTimeDemo_with/OffsetTimeDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_with/OffsetTimeDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/OffsetTimeDemo_with/OffsetTimeDemo/.project b/BasicJava/OffsetTimeDemo_with/OffsetTimeDemo/.project
new file mode 100644
index 000000000..d1f0664d6
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_with/OffsetTimeDemo/.project
@@ -0,0 +1,17 @@
+
+
+ OffsetTimeDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/OffsetTimeDemo_with/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/OffsetTimeDemo_with/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_with/OffsetTimeDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/OffsetTimeDemo_with/OffsetTimeDemo/bin/OffsetTimeDemo.class b/BasicJava/OffsetTimeDemo_with/OffsetTimeDemo/bin/OffsetTimeDemo.class
new file mode 100644
index 000000000..4a97e951f
Binary files /dev/null and b/BasicJava/OffsetTimeDemo_with/OffsetTimeDemo/bin/OffsetTimeDemo.class differ
diff --git a/BasicJava/OffsetTimeDemo_with/OffsetTimeDemo/src/OffsetTimeDemo.java b/BasicJava/OffsetTimeDemo_with/OffsetTimeDemo/src/OffsetTimeDemo.java
new file mode 100644
index 000000000..469513599
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_with/OffsetTimeDemo/src/OffsetTimeDemo.java
@@ -0,0 +1,61 @@
+import java.time.OffsetTime;
+
+public class OffsetTimeDemo
+{
+
+ public static void main(String[] args)
+ {
+
+ OffsetTime offsetTime1 = OffsetTime.now();
+ System.out.println("offsetTime1 = " + offsetTime1);
+
+ /*
+ * Parameters:
+ *
+ * hour - the hour-of-day to set in the result, from 0 to 23
+ *
+ * Returns:an OffsetTime based on this time with the requested
+ * hour, not null
+ */
+ OffsetTime offsetTime2 = offsetTime1.withHour(1);
+ System.out.println("Hour changed = " + offsetTime2);
+
+ /*
+ * Parameters:
+ *
+ * minute - the minute-of-hour to set in the result, from 0 to
+ * 59
+ *
+ * Returns:an OffsetTime based on this time with the requested
+ * minute, not null
+ */
+ OffsetTime offsetTime3 = offsetTime2.withMinute(10);
+ System.out.println("Min changed = " + offsetTime3);
+
+ /*
+ * Parameters:
+ *
+ * second - the second-of-minute to set in the result, from 0
+ * to 59
+ *
+ * Returns:an OffsetTime based on this time with the requested
+ * second, not null
+ */
+ OffsetTime offsetTime4 = offsetTime3.withSecond(20);
+ System.out.println("Sec changed = " + offsetTime4);
+
+ /*
+ * Parameters:
+ *
+ * nanoOfSecond - the nano-of-second to set in the result,
+ * from 0 to 999,999,999
+ *
+ * Returns:an OffsetTime based on this time with the requested
+ * nanosecond, not null
+ */
+ OffsetTime offsetTime5 = offsetTime4.withNano(50);
+ System.out.println("NanoSec changed = " + offsetTime5);
+
+ }
+
+}
diff --git a/BasicJava/OffsetTimeDemo_with/Output.txt b/BasicJava/OffsetTimeDemo_with/Output.txt
new file mode 100644
index 000000000..f480e3222
--- /dev/null
+++ b/BasicJava/OffsetTimeDemo_with/Output.txt
@@ -0,0 +1,5 @@
+offsetTime1 = 10:07:26.171+05:30
+Hour changed = 01:07:26.171+05:30
+Min changed = 01:10:26.171+05:30
+Sec changed = 01:10:20.171+05:30
+NanoSec changed = 01:10:20.000000050+05:30
diff --git a/BasicJava/ReflectionDemo-invoke_method/Output.txt b/BasicJava/ReflectionDemo-invoke_method/Output.txt
new file mode 100644
index 000000000..45b983be3
--- /dev/null
+++ b/BasicJava/ReflectionDemo-invoke_method/Output.txt
@@ -0,0 +1 @@
+hi
diff --git a/BasicJava/ReflectionDemo-invoke_method/ReflectionDemo/.classpath b/BasicJava/ReflectionDemo-invoke_method/ReflectionDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/ReflectionDemo-invoke_method/ReflectionDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/ReflectionDemo-invoke_method/ReflectionDemo/.project b/BasicJava/ReflectionDemo-invoke_method/ReflectionDemo/.project
new file mode 100644
index 000000000..7e4540c4f
--- /dev/null
+++ b/BasicJava/ReflectionDemo-invoke_method/ReflectionDemo/.project
@@ -0,0 +1,17 @@
+
+
+ ReflectionDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/ReflectionDemo-invoke_method/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/ReflectionDemo-invoke_method/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/ReflectionDemo-invoke_method/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/ReflectionDemo-invoke_method/ReflectionDemo/bin/DisplayMessage.class b/BasicJava/ReflectionDemo-invoke_method/ReflectionDemo/bin/DisplayMessage.class
new file mode 100644
index 000000000..fd6152fcc
Binary files /dev/null and b/BasicJava/ReflectionDemo-invoke_method/ReflectionDemo/bin/DisplayMessage.class differ
diff --git a/BasicJava/ReflectionDemo-invoke_method/ReflectionDemo/bin/ReflectionDemo.class b/BasicJava/ReflectionDemo-invoke_method/ReflectionDemo/bin/ReflectionDemo.class
new file mode 100644
index 000000000..4e5860ad5
Binary files /dev/null and b/BasicJava/ReflectionDemo-invoke_method/ReflectionDemo/bin/ReflectionDemo.class differ
diff --git a/BasicJava/ReflectionDemo-invoke_method/ReflectionDemo/src/DisplayMessage.java b/BasicJava/ReflectionDemo-invoke_method/ReflectionDemo/src/DisplayMessage.java
new file mode 100644
index 000000000..ed54ca308
--- /dev/null
+++ b/BasicJava/ReflectionDemo-invoke_method/ReflectionDemo/src/DisplayMessage.java
@@ -0,0 +1,8 @@
+class DisplayMessage
+{
+ public void displayMessage(String message)
+ {
+ System.out.println(message);
+ }
+}
+
diff --git a/BasicJava/ReflectionDemo-invoke_method/ReflectionDemo/src/ReflectionDemo.java b/BasicJava/ReflectionDemo-invoke_method/ReflectionDemo/src/ReflectionDemo.java
new file mode 100644
index 000000000..4aa563c5f
--- /dev/null
+++ b/BasicJava/ReflectionDemo-invoke_method/ReflectionDemo/src/ReflectionDemo.java
@@ -0,0 +1,35 @@
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+/**
+ *
+ * Invoking Methods using Method Object.
+ *
+ */
+public class ReflectionDemo
+{
+ public static void main(String[] args)
+ {
+ try
+ {
+ Class classObj = DisplayMessage.class;
+ Method method = classObj.getMethod("displayMessage",
+ new Class[] { String.class });
+
+ DisplayMessage displayMessageObj= classObj.newInstance();
+ /*
+ * Invokes the underlying method represented by this Method object,
+ * on the specified object with the specified parameters.
+ */
+ method.invoke(displayMessageObj, "hi");
+
+ }
+ catch (SecurityException | IllegalArgumentException
+ | NoSuchMethodException | IllegalAccessException
+ | InvocationTargetException | InstantiationException e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/ReflectionDemo-invoke_staticmethod/Output.txt b/BasicJava/ReflectionDemo-invoke_staticmethod/Output.txt
new file mode 100644
index 000000000..45b983be3
--- /dev/null
+++ b/BasicJava/ReflectionDemo-invoke_staticmethod/Output.txt
@@ -0,0 +1 @@
+hi
diff --git a/BasicJava/ReflectionDemo-invoke_staticmethod/ReflectionDemo/.classpath b/BasicJava/ReflectionDemo-invoke_staticmethod/ReflectionDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/ReflectionDemo-invoke_staticmethod/ReflectionDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/ReflectionDemo-invoke_staticmethod/ReflectionDemo/.project b/BasicJava/ReflectionDemo-invoke_staticmethod/ReflectionDemo/.project
new file mode 100644
index 000000000..7e4540c4f
--- /dev/null
+++ b/BasicJava/ReflectionDemo-invoke_staticmethod/ReflectionDemo/.project
@@ -0,0 +1,17 @@
+
+
+ ReflectionDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/ReflectionDemo-invoke_staticmethod/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/ReflectionDemo-invoke_staticmethod/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/ReflectionDemo-invoke_staticmethod/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/ReflectionDemo-invoke_staticmethod/ReflectionDemo/bin/DisplayMessage.class b/BasicJava/ReflectionDemo-invoke_staticmethod/ReflectionDemo/bin/DisplayMessage.class
new file mode 100644
index 000000000..e84d9398e
Binary files /dev/null and b/BasicJava/ReflectionDemo-invoke_staticmethod/ReflectionDemo/bin/DisplayMessage.class differ
diff --git a/BasicJava/ReflectionDemo-invoke_staticmethod/ReflectionDemo/bin/ReflectionDemo.class b/BasicJava/ReflectionDemo-invoke_staticmethod/ReflectionDemo/bin/ReflectionDemo.class
new file mode 100644
index 000000000..1935d9ee0
Binary files /dev/null and b/BasicJava/ReflectionDemo-invoke_staticmethod/ReflectionDemo/bin/ReflectionDemo.class differ
diff --git a/BasicJava/ReflectionDemo-invoke_staticmethod/ReflectionDemo/src/DisplayMessage.java b/BasicJava/ReflectionDemo-invoke_staticmethod/ReflectionDemo/src/DisplayMessage.java
new file mode 100644
index 000000000..e6587f9e5
--- /dev/null
+++ b/BasicJava/ReflectionDemo-invoke_staticmethod/ReflectionDemo/src/DisplayMessage.java
@@ -0,0 +1,8 @@
+class DisplayMessage
+{
+ public static void displayMessage(String message)
+ {
+ System.out.println(message);
+ }
+}
+
diff --git a/BasicJava/ReflectionDemo-invoke_staticmethod/ReflectionDemo/src/ReflectionDemo.java b/BasicJava/ReflectionDemo-invoke_staticmethod/ReflectionDemo/src/ReflectionDemo.java
new file mode 100644
index 000000000..23881284a
--- /dev/null
+++ b/BasicJava/ReflectionDemo-invoke_staticmethod/ReflectionDemo/src/ReflectionDemo.java
@@ -0,0 +1,35 @@
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+/**
+ *
+ * Invoking Static Method using Method Object.
+ *
+ */
+public class ReflectionDemo
+{
+ public static void main(String[] args)
+ {
+ try
+ {
+ Class classObj = DisplayMessage.class;
+
+ Method method = classObj.getMethod("displayMessage",
+ new Class[] { String.class });
+
+ /*
+ * Invokes the underlying method represented by this Method object,
+ * on the specified object with the specified parameters.
+ */
+ method.invoke(null, "hi");
+
+ }
+ catch (SecurityException | IllegalArgumentException
+ | NoSuchMethodException | IllegalAccessException
+ | InvocationTargetException e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/ReflectionDemo_Call_Private_method/Output.txt b/BasicJava/ReflectionDemo_Call_Private_method/Output.txt
new file mode 100644
index 000000000..865228379
--- /dev/null
+++ b/BasicJava/ReflectionDemo_Call_Private_method/Output.txt
@@ -0,0 +1 @@
+Peter J
diff --git a/BasicJava/ReflectionDemo_Call_Private_method/ReflectionDemo/.classpath b/BasicJava/ReflectionDemo_Call_Private_method/ReflectionDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/ReflectionDemo_Call_Private_method/ReflectionDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/ReflectionDemo_Call_Private_method/ReflectionDemo/.project b/BasicJava/ReflectionDemo_Call_Private_method/ReflectionDemo/.project
new file mode 100644
index 000000000..7e4540c4f
--- /dev/null
+++ b/BasicJava/ReflectionDemo_Call_Private_method/ReflectionDemo/.project
@@ -0,0 +1,17 @@
+
+
+ ReflectionDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/ReflectionDemo_Call_Private_method/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/ReflectionDemo_Call_Private_method/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/ReflectionDemo_Call_Private_method/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/ReflectionDemo_Call_Private_method/ReflectionDemo/bin/ReflectionDemo.class b/BasicJava/ReflectionDemo_Call_Private_method/ReflectionDemo/bin/ReflectionDemo.class
new file mode 100644
index 000000000..a2293cda2
Binary files /dev/null and b/BasicJava/ReflectionDemo_Call_Private_method/ReflectionDemo/bin/ReflectionDemo.class differ
diff --git a/BasicJava/ReflectionDemo_Call_Private_method/ReflectionDemo/bin/Student.class b/BasicJava/ReflectionDemo_Call_Private_method/ReflectionDemo/bin/Student.class
new file mode 100644
index 000000000..e62bd73cd
Binary files /dev/null and b/BasicJava/ReflectionDemo_Call_Private_method/ReflectionDemo/bin/Student.class differ
diff --git a/BasicJava/ReflectionDemo_Call_Private_method/ReflectionDemo/src/ReflectionDemo.java b/BasicJava/ReflectionDemo_Call_Private_method/ReflectionDemo/src/ReflectionDemo.java
new file mode 100644
index 000000000..c3eb26cfb
--- /dev/null
+++ b/BasicJava/ReflectionDemo_Call_Private_method/ReflectionDemo/src/ReflectionDemo.java
@@ -0,0 +1,45 @@
+import java.lang.reflect.Method;
+
+/**
+ * How to call private method from another class in java?
+ *
+ * We can call the private method from outside the class by changing
+ * the runtime behaviour of the class.
+ *
+ * By the help of "java.lang.Class" class and
+ * "java.lang.reflect.Method" class, we can call private method from
+ * any other class.
+ *
+ */
+public class ReflectionDemo
+{
+ public static void main(String[] args)
+ {
+ try
+ {
+ Class> classObj = Class.forName("Student");
+ Student studentObj = (Student) classObj.newInstance();
+ Method method = classObj.getDeclaredMethod("showStudentFullName", null);
+ method.setAccessible(true);
+ /*
+ * Parameters:
+ *
+ * obj - the object the underlying method is invoked from
+ *
+ * args - the arguments used for the method call
+ *
+ * Returns: the result of dispatching the method
+ * represented by this object on obj with parameters args
+ *
+ */
+
+ method.invoke(studentObj, null);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/ReflectionDemo_Call_Private_method/ReflectionDemo/src/Student.java b/BasicJava/ReflectionDemo_Call_Private_method/ReflectionDemo/src/Student.java
new file mode 100644
index 000000000..5147e1f68
--- /dev/null
+++ b/BasicJava/ReflectionDemo_Call_Private_method/ReflectionDemo/src/Student.java
@@ -0,0 +1,13 @@
+
+public class Student
+{
+ private String firstName = "Peter";
+ private String lastName = "J";
+
+
+ private void showStudentFullName()
+ {
+ System.out.println(firstName + " " + lastName);
+ }
+
+}
diff --git a/BasicJava/ReflectionDemo_Intro/Output.txt b/BasicJava/ReflectionDemo_Intro/Output.txt
new file mode 100644
index 000000000..e89b6462b
--- /dev/null
+++ b/BasicJava/ReflectionDemo_Intro/Output.txt
@@ -0,0 +1,16 @@
+getName
+setName
+getAge
+setAge
+wait
+wait
+wait
+equals
+toString
+hashCode
+getClass
+notify
+notifyAll
+----------------------------------
+name
+age
diff --git a/BasicJava/ReflectionDemo_Intro/ReflectionDemo/.classpath b/BasicJava/ReflectionDemo_Intro/ReflectionDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/ReflectionDemo_Intro/ReflectionDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/ReflectionDemo_Intro/ReflectionDemo/.project b/BasicJava/ReflectionDemo_Intro/ReflectionDemo/.project
new file mode 100644
index 000000000..7e4540c4f
--- /dev/null
+++ b/BasicJava/ReflectionDemo_Intro/ReflectionDemo/.project
@@ -0,0 +1,17 @@
+
+
+ ReflectionDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/ReflectionDemo_Intro/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/ReflectionDemo_Intro/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/ReflectionDemo_Intro/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/ReflectionDemo_Intro/ReflectionDemo/bin/ReflectionDemo.class b/BasicJava/ReflectionDemo_Intro/ReflectionDemo/bin/ReflectionDemo.class
new file mode 100644
index 000000000..5e1112229
Binary files /dev/null and b/BasicJava/ReflectionDemo_Intro/ReflectionDemo/bin/ReflectionDemo.class differ
diff --git a/BasicJava/ReflectionDemo_Intro/ReflectionDemo/bin/Student.class b/BasicJava/ReflectionDemo_Intro/ReflectionDemo/bin/Student.class
new file mode 100644
index 000000000..d92290344
Binary files /dev/null and b/BasicJava/ReflectionDemo_Intro/ReflectionDemo/bin/Student.class differ
diff --git a/BasicJava/ReflectionDemo_Intro/ReflectionDemo/src/ReflectionDemo.java b/BasicJava/ReflectionDemo_Intro/ReflectionDemo/src/ReflectionDemo.java
new file mode 100644
index 000000000..2e910bcc8
--- /dev/null
+++ b/BasicJava/ReflectionDemo_Intro/ReflectionDemo/src/ReflectionDemo.java
@@ -0,0 +1,43 @@
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+
+public class ReflectionDemo
+{
+ public static void main(String[] args)
+ {
+ Student student = new Student("Peter", 25);
+
+ /*
+ * Returns: The Class object that represents the runtime class
+ * of this object.
+ *
+ */
+ Class extends Student> studentClass = student.getClass();
+
+ /*
+ * Returns: the array of Method objects representing the
+ * public methods of this class
+ */
+ Method[] methodArray = studentClass.getMethods();
+
+ for (Method method : methodArray)
+ {
+ System.out.println(method.getName());
+ }
+
+ System.out.println("----------------------------------");
+
+ /*
+ * Returns:the array of Field objects representing all the
+ * declared fields of this class
+ */
+ Field[] fieldArray = studentClass.getDeclaredFields();
+
+ for (Field field : fieldArray)
+ {
+ System.out.println(field.getName());
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/ReflectionDemo_Intro/ReflectionDemo/src/Student.java b/BasicJava/ReflectionDemo_Intro/ReflectionDemo/src/Student.java
new file mode 100644
index 000000000..1f18bee50
--- /dev/null
+++ b/BasicJava/ReflectionDemo_Intro/ReflectionDemo/src/Student.java
@@ -0,0 +1,33 @@
+public class Student
+{
+ private String name;
+ private int age;
+
+ public Student(String name, int age)
+ {
+ super();
+ this.name = name;
+ this.age = age;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public int getAge()
+ {
+ return age;
+ }
+
+ public void setAge(int age)
+ {
+ this.age = age;
+ }
+
+}
diff --git a/BasicJava/ReflectionDemo_Intro_2_details/Output.txt b/BasicJava/ReflectionDemo_Intro_2_details/Output.txt
new file mode 100644
index 000000000..ef5f01cc5
--- /dev/null
+++ b/BasicJava/ReflectionDemo_Intro_2_details/Output.txt
@@ -0,0 +1,19 @@
+The name of class is Display
+The name of constructor is Display
+
+The public methods of class are :
+method2
+method1
+wait
+wait
+wait
+equals
+toString
+hashCode
+getClass
+notify
+notifyAll
+
+Inside method2,The number is 19
+Inside method1,The string is JAVA
+Private method invoked
diff --git a/BasicJava/ReflectionDemo_Intro_2_details/ReflectionDemo/.classpath b/BasicJava/ReflectionDemo_Intro_2_details/ReflectionDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/ReflectionDemo_Intro_2_details/ReflectionDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/ReflectionDemo_Intro_2_details/ReflectionDemo/.project b/BasicJava/ReflectionDemo_Intro_2_details/ReflectionDemo/.project
new file mode 100644
index 000000000..7e4540c4f
--- /dev/null
+++ b/BasicJava/ReflectionDemo_Intro_2_details/ReflectionDemo/.project
@@ -0,0 +1,17 @@
+
+
+ ReflectionDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/ReflectionDemo_Intro_2_details/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/ReflectionDemo_Intro_2_details/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/ReflectionDemo_Intro_2_details/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/ReflectionDemo_Intro_2_details/ReflectionDemo/bin/Display.class b/BasicJava/ReflectionDemo_Intro_2_details/ReflectionDemo/bin/Display.class
new file mode 100644
index 000000000..38fcd811a
Binary files /dev/null and b/BasicJava/ReflectionDemo_Intro_2_details/ReflectionDemo/bin/Display.class differ
diff --git a/BasicJava/ReflectionDemo_Intro_2_details/ReflectionDemo/bin/ReflectionDemo.class b/BasicJava/ReflectionDemo_Intro_2_details/ReflectionDemo/bin/ReflectionDemo.class
new file mode 100644
index 000000000..a729c5079
Binary files /dev/null and b/BasicJava/ReflectionDemo_Intro_2_details/ReflectionDemo/bin/ReflectionDemo.class differ
diff --git a/BasicJava/ReflectionDemo_Intro_2_details/ReflectionDemo/src/Display.java b/BasicJava/ReflectionDemo_Intro_2_details/ReflectionDemo/src/Display.java
new file mode 100644
index 000000000..23dc10353
--- /dev/null
+++ b/BasicJava/ReflectionDemo_Intro_2_details/ReflectionDemo/src/Display.java
@@ -0,0 +1,24 @@
+class Display
+{
+ private String str;
+
+ public Display()
+ {
+ str = "Welcome";
+ }
+
+ public void method1()
+ {
+ System.out.println("Inside method1,The string is " + str);
+ }
+
+ public void method2(int n)
+ {
+ System.out.println("\nInside method2,The number is " + n);
+ }
+
+ private void method3()
+ {
+ System.out.println("Private method invoked");
+ }
+}
diff --git a/BasicJava/ReflectionDemo_Intro_2_details/ReflectionDemo/src/ReflectionDemo.java b/BasicJava/ReflectionDemo_Intro_2_details/ReflectionDemo/src/ReflectionDemo.java
new file mode 100644
index 000000000..7033fde40
--- /dev/null
+++ b/BasicJava/ReflectionDemo_Intro_2_details/ReflectionDemo/src/ReflectionDemo.java
@@ -0,0 +1,103 @@
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+
+/*
+ * A simple Java program to demonstrate the use of reflection.
+ */
+public class ReflectionDemo
+{
+ public static void main(String[] args) throws Exception
+ {
+ /*
+ * Creating object whose property is to be checked
+ */
+ Display displayObj = new Display();
+
+ /*
+ * Creating class object from the object using getclass method
+ */
+ Class extends Display> classObj = displayObj.getClass();
+ System.out.println("The name of class is " + classObj.getName());
+
+ /*
+ * Getting the constructor of the class through the object of the class
+ */
+ Constructor extends Display> constructor = classObj.getConstructor();
+ System.out.println("The name of constructor is " + constructor.getName());
+
+ System.out.println("\nThe public methods of class are : ");
+
+ /*
+ * Getting methods of the class through the object of the class by using
+ * getMethods
+ */
+ Method[] methodArray = classObj.getMethods();
+
+ /*
+ * Printing method names
+ */
+ for (Method method : methodArray)
+ {
+ System.out.println(method.getName());
+ }
+
+ /*
+ * Creates object of desired method by providing the method name and
+ * parameter class as arguments to the getDeclaredMethod
+ */
+ Method method2Obj = classObj.getDeclaredMethod("method2", int.class);
+
+ /*
+ * invokes the method at runtime
+ */
+ method2Obj.invoke(displayObj, 19);
+
+ /*
+ * Creates object of the desired field by providing the name of field as
+ * argument to the getDeclaredField method
+ */
+ Field field = classObj.getDeclaredField("str");
+
+ /*
+ * Allows the object to access the field irrespective of the access
+ * specifier used with the field
+ */
+ field.setAccessible(true);
+
+ /*
+ * Takes object and the new value to be assigned to the field as
+ * arguments
+ */
+ field.set(displayObj, "JAVA");
+
+ /*
+ * Creates object of desired method by providing the method name as
+ * argument to the getDeclaredMethod
+ */
+ Method method1Obj = classObj.getDeclaredMethod("method1");
+
+ /*
+ * invokes the method at runtime
+ */
+ method1Obj.invoke(displayObj);
+
+ /*
+ * Creates object of the desired method by providing the name of method
+ * as argument to the getDeclaredMethod method
+ */
+ Method method3Obj = classObj.getDeclaredMethod("method3");
+
+ /*
+ * Allows the object to access the method irrespective
+ * of the access specifier used with the method
+ */
+ method3Obj.setAccessible(true);
+
+ /*
+ * invokes the method at runtime
+ */
+ method3Obj.invoke(displayObj);
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo/.classpath b/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo/.project b/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo/.project
new file mode 100644
index 000000000..7e4540c4f
--- /dev/null
+++ b/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo/.project
@@ -0,0 +1,17 @@
+
+
+ ReflectionDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo/bin/ReflectionDemo1.class b/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo/bin/ReflectionDemo1.class
new file mode 100644
index 000000000..143a5fe12
Binary files /dev/null and b/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo/bin/ReflectionDemo1.class differ
diff --git a/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo/bin/ReflectionDemo2.class b/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo/bin/ReflectionDemo2.class
new file mode 100644
index 000000000..87310c8d6
Binary files /dev/null and b/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo/bin/ReflectionDemo2.class differ
diff --git a/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo/bin/ReflectionDemo3.class b/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo/bin/ReflectionDemo3.class
new file mode 100644
index 000000000..f8c8e8247
Binary files /dev/null and b/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo/bin/ReflectionDemo3.class differ
diff --git a/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo/bin/ReflectionDemo4.class b/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo/bin/ReflectionDemo4.class
new file mode 100644
index 000000000..57f3a9309
Binary files /dev/null and b/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo/bin/ReflectionDemo4.class differ
diff --git a/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo/bin/Student.class b/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo/bin/Student.class
new file mode 100644
index 000000000..9c2c91c82
Binary files /dev/null and b/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo/bin/Student.class differ
diff --git a/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo/src/ReflectionDemo1.java b/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo/src/ReflectionDemo1.java
new file mode 100644
index 000000000..e7c02d903
--- /dev/null
+++ b/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo/src/ReflectionDemo1.java
@@ -0,0 +1,22 @@
+public class ReflectionDemo1
+{
+ public static void main(String[] args)
+ {
+ try
+ {
+ /*
+ * forName method takes fully qualified name of classes or interface
+ * as its argument and returns instance of the class assocaited with
+ * it.
+ */
+ Class> classObj = Class.forName("Student");
+ System.out.println(classObj.getName());
+ }
+ catch (ClassNotFoundException e)
+ {
+ e.printStackTrace();
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo/src/ReflectionDemo2.java b/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo/src/ReflectionDemo2.java
new file mode 100644
index 000000000..b59654e2f
--- /dev/null
+++ b/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo/src/ReflectionDemo2.java
@@ -0,0 +1,40 @@
+import java.lang.reflect.Constructor;
+
+public class ReflectionDemo2
+{
+ public static void main(String[] args)
+ {
+
+ try
+ {
+ Class> classObj = Class.forName("Student");
+
+ /*
+ * getConstructors() method returns array of Constructors object
+ * that represent all the public constructors of the invoking
+ * object. Remember, this method only returns public constructors.
+ */
+ Constructor>[] ct = classObj.getConstructors();
+ for (int i = 0; i < ct.length; i++)
+ {
+ System.out.println(ct[i]);
+ }
+
+ System.out.println("--------------------------------------");
+
+ /*
+ * If you want to see all the declared constructors of a class then
+ * use getDeclaredConstructors()
+ */
+ Constructor>[] cdt = classObj.getDeclaredConstructors();
+ for (int i = 0; i < cdt.length; i++)
+ {
+ System.out.println(cdt[i]);
+ }
+ }
+ catch (ClassNotFoundException e)
+ {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo/src/ReflectionDemo3.java b/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo/src/ReflectionDemo3.java
new file mode 100644
index 000000000..b652a213f
--- /dev/null
+++ b/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo/src/ReflectionDemo3.java
@@ -0,0 +1,38 @@
+import java.lang.reflect.Method;
+
+public class ReflectionDemo3
+{
+ public static void main(String[] args)
+ {
+ try
+ {
+ Class> classObj = Class.forName("Student");
+
+ /*
+ * getMethods() method returns array of Method object that reflect
+ * all the public method of invoking object.
+ */
+ Method[] methodArray = classObj.getMethods();
+ for (int i = 0; i < methodArray.length; i++)
+ {
+ System.out.println(methodArray[i]);
+ }
+
+ System.out.println("---------------------------------");
+
+ /*
+ * getDeclaredMethods() returns only the declared methods of the
+ * invoking class object.
+ */
+ Method[] declaredMethodArray = classObj.getDeclaredMethods();
+ for (Method method : declaredMethodArray)
+ {
+ System.out.println(method);
+ }
+ }
+ catch (ClassNotFoundException e)
+ {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo/src/ReflectionDemo4.java b/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo/src/ReflectionDemo4.java
new file mode 100644
index 000000000..99cf0068c
--- /dev/null
+++ b/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo/src/ReflectionDemo4.java
@@ -0,0 +1,41 @@
+import java.lang.reflect.Field;
+
+public class ReflectionDemo4
+{
+ public static void main(String[] args)
+ {
+ try
+ {
+ Class> classObj = Class.forName("Student");
+
+ /*
+ * getFields() returns an array containing Field objects reflecting
+ * all the accessible public members of the class or interface
+ * represented by this Class object.
+ */
+ Field[] fieldArray = classObj.getFields();
+ for (Field field : fieldArray)
+ {
+ System.out.println(field);
+ }
+
+ System.out.println("-------------------------------");
+
+ /*
+ * getDeclaredFields() returns array of Field objects reflecting all
+ * the fields declared by the class or interface represented by this
+ * Class object.
+ */
+ Field[] declaredFieldArray = classObj.getDeclaredFields();
+ for (Field field : declaredFieldArray)
+ {
+ System.out.println(field);
+ }
+
+ }
+ catch (ClassNotFoundException e)
+ {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo/src/Student.java b/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo/src/Student.java
new file mode 100644
index 000000000..90971483c
--- /dev/null
+++ b/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo/src/Student.java
@@ -0,0 +1,30 @@
+class Student
+{
+ public String name;
+ public int age;
+ private String gender;
+
+ public Student()
+ {
+
+ }
+
+ private Student(String name, int age)
+ {
+ super();
+ this.name = name;
+ this.age = age;
+ }
+
+ public void displayHello()
+ {
+ System.out.println("Hello");
+ }
+
+
+ private void displayWelcome()
+ {
+ System.out.println("Welcome");
+ }
+
+}
diff --git a/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo1_Output.txt b/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo1_Output.txt
new file mode 100644
index 000000000..ee5ad868c
--- /dev/null
+++ b/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo1_Output.txt
@@ -0,0 +1 @@
+Student
diff --git a/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo2_Output.txt b/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo2_Output.txt
new file mode 100644
index 000000000..55c94eece
--- /dev/null
+++ b/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo2_Output.txt
@@ -0,0 +1,4 @@
+public Student()
+--------------------------------------
+public Student()
+private Student(java.lang.String,int)
diff --git a/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo3_Output.txt b/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo3_Output.txt
new file mode 100644
index 000000000..39083a6a4
--- /dev/null
+++ b/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo3_Output.txt
@@ -0,0 +1,13 @@
+public void Student.displayHello()
+public final void java.lang.Object.wait() throws java.lang.InterruptedException
+public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException
+public final native void java.lang.Object.wait(long) throws java.lang.InterruptedException
+public boolean java.lang.Object.equals(java.lang.Object)
+public java.lang.String java.lang.Object.toString()
+public native int java.lang.Object.hashCode()
+public final native java.lang.Class java.lang.Object.getClass()
+public final native void java.lang.Object.notify()
+public final native void java.lang.Object.notifyAll()
+---------------------------------
+public void Student.displayHello()
+private void Student.displayWelcome()
diff --git a/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo4_Output.txt b/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo4_Output.txt
new file mode 100644
index 000000000..3cbf53555
--- /dev/null
+++ b/BasicJava/ReflectionDemo_Intro_3_details/ReflectionDemo4_Output.txt
@@ -0,0 +1,6 @@
+public java.lang.String Student.name
+public int Student.age
+-------------------------------
+public java.lang.String Student.name
+public int Student.age
+private java.lang.String Student.gender
diff --git a/BasicJava/ReflectionDemo_access_annotation/Output.txt b/BasicJava/ReflectionDemo_access_annotation/Output.txt
new file mode 100644
index 000000000..7f9393a2e
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_annotation/Output.txt
@@ -0,0 +1 @@
+@MyAnnotation()
diff --git a/BasicJava/ReflectionDemo_access_annotation/ReflectionDemo/.classpath b/BasicJava/ReflectionDemo_access_annotation/ReflectionDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_annotation/ReflectionDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/ReflectionDemo_access_annotation/ReflectionDemo/.project b/BasicJava/ReflectionDemo_access_annotation/ReflectionDemo/.project
new file mode 100644
index 000000000..7e4540c4f
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_annotation/ReflectionDemo/.project
@@ -0,0 +1,17 @@
+
+
+ ReflectionDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/ReflectionDemo_access_annotation/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/ReflectionDemo_access_annotation/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_annotation/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/ReflectionDemo_access_annotation/ReflectionDemo/bin/Display.class b/BasicJava/ReflectionDemo_access_annotation/ReflectionDemo/bin/Display.class
new file mode 100644
index 000000000..8a96796fe
Binary files /dev/null and b/BasicJava/ReflectionDemo_access_annotation/ReflectionDemo/bin/Display.class differ
diff --git a/BasicJava/ReflectionDemo_access_annotation/ReflectionDemo/bin/MyAnnotation.class b/BasicJava/ReflectionDemo_access_annotation/ReflectionDemo/bin/MyAnnotation.class
new file mode 100644
index 000000000..ae262baaf
Binary files /dev/null and b/BasicJava/ReflectionDemo_access_annotation/ReflectionDemo/bin/MyAnnotation.class differ
diff --git a/BasicJava/ReflectionDemo_access_annotation/ReflectionDemo/bin/ReflectionDemo.class b/BasicJava/ReflectionDemo_access_annotation/ReflectionDemo/bin/ReflectionDemo.class
new file mode 100644
index 000000000..0d7ad0f47
Binary files /dev/null and b/BasicJava/ReflectionDemo_access_annotation/ReflectionDemo/bin/ReflectionDemo.class differ
diff --git a/BasicJava/ReflectionDemo_access_annotation/ReflectionDemo/src/Display.java b/BasicJava/ReflectionDemo_access_annotation/ReflectionDemo/src/Display.java
new file mode 100644
index 000000000..014a12ec5
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_annotation/ReflectionDemo/src/Display.java
@@ -0,0 +1,23 @@
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Inherited
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.RUNTIME)
+@interface MyAnnotation
+ {
+
+ }
+
+@MyAnnotation
+class Display
+{
+ public void showMessage()
+ {
+ System.out.println("Hi");
+ }
+}
+
diff --git a/BasicJava/ReflectionDemo_access_annotation/ReflectionDemo/src/ReflectionDemo.java b/BasicJava/ReflectionDemo_access_annotation/ReflectionDemo/src/ReflectionDemo.java
new file mode 100644
index 000000000..cb39fac41
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_annotation/ReflectionDemo/src/ReflectionDemo.java
@@ -0,0 +1,28 @@
+import java.lang.annotation.Annotation;
+
+/**
+ *
+ * We can access the class annotations of a class.
+ *
+ */
+public class ReflectionDemo
+{
+ public static void main(String[] args)
+ {
+
+ Class classObj = Display.class;
+
+ /*
+ * Returns:annotations present on this element.
+ */
+
+ Annotation[] annotationArray = classObj.getAnnotations();
+
+ for (Annotation annotation : annotationArray)
+ {
+ System.out.println(annotation);
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/ReflectionDemo_access_class_annotation/ReflectionDemo/.classpath b/BasicJava/ReflectionDemo_access_class_annotation/ReflectionDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_class_annotation/ReflectionDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/ReflectionDemo_access_class_annotation/ReflectionDemo/.project b/BasicJava/ReflectionDemo_access_class_annotation/ReflectionDemo/.project
new file mode 100644
index 000000000..7e4540c4f
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_class_annotation/ReflectionDemo/.project
@@ -0,0 +1,17 @@
+
+
+ ReflectionDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/ReflectionDemo_access_class_annotation/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/ReflectionDemo_access_class_annotation/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_class_annotation/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/ReflectionDemo_access_class_annotation/ReflectionDemo/bin/Display.class b/BasicJava/ReflectionDemo_access_class_annotation/ReflectionDemo/bin/Display.class
new file mode 100644
index 000000000..da558183d
Binary files /dev/null and b/BasicJava/ReflectionDemo_access_class_annotation/ReflectionDemo/bin/Display.class differ
diff --git a/BasicJava/ReflectionDemo_access_class_annotation/ReflectionDemo/bin/MyAnnotation.class b/BasicJava/ReflectionDemo_access_class_annotation/ReflectionDemo/bin/MyAnnotation.class
new file mode 100644
index 000000000..3591c657a
Binary files /dev/null and b/BasicJava/ReflectionDemo_access_class_annotation/ReflectionDemo/bin/MyAnnotation.class differ
diff --git a/BasicJava/ReflectionDemo_access_class_annotation/ReflectionDemo/bin/ReflectionDemo1.class b/BasicJava/ReflectionDemo_access_class_annotation/ReflectionDemo/bin/ReflectionDemo1.class
new file mode 100644
index 000000000..1b091078d
Binary files /dev/null and b/BasicJava/ReflectionDemo_access_class_annotation/ReflectionDemo/bin/ReflectionDemo1.class differ
diff --git a/BasicJava/ReflectionDemo_access_class_annotation/ReflectionDemo/bin/ReflectionDemo2.class b/BasicJava/ReflectionDemo_access_class_annotation/ReflectionDemo/bin/ReflectionDemo2.class
new file mode 100644
index 000000000..005e3d296
Binary files /dev/null and b/BasicJava/ReflectionDemo_access_class_annotation/ReflectionDemo/bin/ReflectionDemo2.class differ
diff --git a/BasicJava/ReflectionDemo_access_class_annotation/ReflectionDemo/src/Display.java b/BasicJava/ReflectionDemo_access_class_annotation/ReflectionDemo/src/Display.java
new file mode 100644
index 000000000..77c699d77
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_class_annotation/ReflectionDemo/src/Display.java
@@ -0,0 +1,20 @@
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+
+@interface MyAnnotation
+{
+ public String name();
+
+ public String value();
+}
+
+@MyAnnotation(name = "age", value = "23")
+public class Display
+{
+
+}
diff --git a/BasicJava/ReflectionDemo_access_class_annotation/ReflectionDemo/src/ReflectionDemo1.java b/BasicJava/ReflectionDemo_access_class_annotation/ReflectionDemo/src/ReflectionDemo1.java
new file mode 100644
index 000000000..b004c57de
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_class_annotation/ReflectionDemo/src/ReflectionDemo1.java
@@ -0,0 +1,30 @@
+import java.lang.annotation.Annotation;
+
+/**
+ * We can access the annotations of a class, method or field at
+ * runtime.
+ *
+ * Class Annotations Example:
+ */
+public class ReflectionDemo1
+{
+ public static void main(String[] args)
+ {
+ Class classObj = Display.class;
+ /*
+ * Returns:annotations present on this element
+ */
+ Annotation[] annotationArray = classObj.getAnnotations();
+
+ for (Annotation annotation : annotationArray)
+ {
+ if (annotation instanceof MyAnnotation)
+ {
+ MyAnnotation myAnnotation = (MyAnnotation) annotation;
+ System.out.println("name: " + myAnnotation.name());
+ System.out.println("value: " + myAnnotation.value());
+ }
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/ReflectionDemo_access_class_annotation/ReflectionDemo/src/ReflectionDemo2.java b/BasicJava/ReflectionDemo_access_class_annotation/ReflectionDemo/src/ReflectionDemo2.java
new file mode 100644
index 000000000..8a303cbbd
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_class_annotation/ReflectionDemo/src/ReflectionDemo2.java
@@ -0,0 +1,22 @@
+/**
+ * We can access the annotations of a class, method or field at
+ * runtime.
+ *
+ * Class Annotations Example:
+ */
+public class ReflectionDemo2
+{
+ public static void main(String[] args)
+ {
+ Class classObj = Display.class;
+ /*
+ * Returns:this element's annotation for the specified
+ * annotation type if present on this element, else null
+ */
+ MyAnnotation myAnnotation = classObj.getAnnotation(MyAnnotation.class);
+
+ System.out.println("name: " + myAnnotation.name());
+ System.out.println("value: " + myAnnotation.value());
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/ReflectionDemo_access_class_annotation/ReflectionDemo1_Output.txt b/BasicJava/ReflectionDemo_access_class_annotation/ReflectionDemo1_Output.txt
new file mode 100644
index 000000000..4a4fd0d0c
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_class_annotation/ReflectionDemo1_Output.txt
@@ -0,0 +1,2 @@
+name: age
+value: 23
diff --git a/BasicJava/ReflectionDemo_access_class_annotation/ReflectionDemo2_Output.txt b/BasicJava/ReflectionDemo_access_class_annotation/ReflectionDemo2_Output.txt
new file mode 100644
index 000000000..4a4fd0d0c
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_class_annotation/ReflectionDemo2_Output.txt
@@ -0,0 +1,2 @@
+name: age
+value: 23
diff --git a/BasicJava/ReflectionDemo_access_constructors/Output.txt b/BasicJava/ReflectionDemo_access_constructors/Output.txt
new file mode 100644
index 000000000..7484011b2
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_constructors/Output.txt
@@ -0,0 +1,12 @@
+public java.util.ArrayList(java.util.Collection)
+Name = java.util.ArrayList
+ParameterCount = 1
+-----------------------------
+public java.util.ArrayList()
+Name = java.util.ArrayList
+ParameterCount = 0
+-----------------------------
+public java.util.ArrayList(int)
+Name = java.util.ArrayList
+ParameterCount = 1
+-----------------------------
diff --git a/BasicJava/ReflectionDemo_access_constructors/ReflectionDemo/.classpath b/BasicJava/ReflectionDemo_access_constructors/ReflectionDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_constructors/ReflectionDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/ReflectionDemo_access_constructors/ReflectionDemo/.project b/BasicJava/ReflectionDemo_access_constructors/ReflectionDemo/.project
new file mode 100644
index 000000000..7e4540c4f
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_constructors/ReflectionDemo/.project
@@ -0,0 +1,17 @@
+
+
+ ReflectionDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/ReflectionDemo_access_constructors/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/ReflectionDemo_access_constructors/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_constructors/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/ReflectionDemo_access_constructors/ReflectionDemo/bin/ReflectionDemo.class b/BasicJava/ReflectionDemo_access_constructors/ReflectionDemo/bin/ReflectionDemo.class
new file mode 100644
index 000000000..e3b192b1c
Binary files /dev/null and b/BasicJava/ReflectionDemo_access_constructors/ReflectionDemo/bin/ReflectionDemo.class differ
diff --git a/BasicJava/ReflectionDemo_access_constructors/ReflectionDemo/src/ReflectionDemo.java b/BasicJava/ReflectionDemo_access_constructors/ReflectionDemo/src/ReflectionDemo.java
new file mode 100644
index 000000000..a5b71728e
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_constructors/ReflectionDemo/src/ReflectionDemo.java
@@ -0,0 +1,33 @@
+import java.lang.reflect.Constructor;
+import java.util.ArrayList;
+
+/**
+ *
+ * We can access the constructors of a class.
+ *
+ */
+public class ReflectionDemo
+{
+ public static void main(String[] args)
+ {
+
+ Class classObj = ArrayList.class;
+
+ /*
+ * Returns:the array of Constructor objects representing the public
+ * constructors of this class
+ */
+
+ Constructor>[] constructorArray = classObj.getConstructors();
+
+ for (Constructor constructor : constructorArray)
+ {
+ System.out.println(constructor);
+ System.out.println("Name = "+constructor.getName());
+ System.out.println("ParameterCount = "+constructor.getParameterCount());
+ System.out.println("-----------------------------");
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/ReflectionDemo_access_field_annotation/Output.txt b/BasicJava/ReflectionDemo_access_field_annotation/Output.txt
new file mode 100644
index 000000000..348c20542
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_field_annotation/Output.txt
@@ -0,0 +1,2 @@
+name: age
+value: 25
diff --git a/BasicJava/ReflectionDemo_access_field_annotation/ReflectionDemo/.classpath b/BasicJava/ReflectionDemo_access_field_annotation/ReflectionDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_field_annotation/ReflectionDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/ReflectionDemo_access_field_annotation/ReflectionDemo/.project b/BasicJava/ReflectionDemo_access_field_annotation/ReflectionDemo/.project
new file mode 100644
index 000000000..7e4540c4f
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_field_annotation/ReflectionDemo/.project
@@ -0,0 +1,17 @@
+
+
+ ReflectionDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/ReflectionDemo_access_field_annotation/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/ReflectionDemo_access_field_annotation/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_field_annotation/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/ReflectionDemo_access_field_annotation/ReflectionDemo/bin/Display.class b/BasicJava/ReflectionDemo_access_field_annotation/ReflectionDemo/bin/Display.class
new file mode 100644
index 000000000..5039c416a
Binary files /dev/null and b/BasicJava/ReflectionDemo_access_field_annotation/ReflectionDemo/bin/Display.class differ
diff --git a/BasicJava/ReflectionDemo_access_field_annotation/ReflectionDemo/bin/MyAnnotation.class b/BasicJava/ReflectionDemo_access_field_annotation/ReflectionDemo/bin/MyAnnotation.class
new file mode 100644
index 000000000..b6a0f64b7
Binary files /dev/null and b/BasicJava/ReflectionDemo_access_field_annotation/ReflectionDemo/bin/MyAnnotation.class differ
diff --git a/BasicJava/ReflectionDemo_access_field_annotation/ReflectionDemo/bin/ReflectionDemo1.class b/BasicJava/ReflectionDemo_access_field_annotation/ReflectionDemo/bin/ReflectionDemo1.class
new file mode 100644
index 000000000..336ef015e
Binary files /dev/null and b/BasicJava/ReflectionDemo_access_field_annotation/ReflectionDemo/bin/ReflectionDemo1.class differ
diff --git a/BasicJava/ReflectionDemo_access_field_annotation/ReflectionDemo/bin/ReflectionDemo2.class b/BasicJava/ReflectionDemo_access_field_annotation/ReflectionDemo/bin/ReflectionDemo2.class
new file mode 100644
index 000000000..68e1dbda5
Binary files /dev/null and b/BasicJava/ReflectionDemo_access_field_annotation/ReflectionDemo/bin/ReflectionDemo2.class differ
diff --git a/BasicJava/ReflectionDemo_access_field_annotation/ReflectionDemo/src/Display.java b/BasicJava/ReflectionDemo_access_field_annotation/ReflectionDemo/src/Display.java
new file mode 100644
index 000000000..c2a656561
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_field_annotation/ReflectionDemo/src/Display.java
@@ -0,0 +1,21 @@
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.FIELD)
+
+@interface MyAnnotation
+{
+ public String name();
+
+ public String value();
+}
+
+public class Display
+{
+
+ @MyAnnotation(name = "age", value = "25")
+ public String myField = null;
+}
diff --git a/BasicJava/ReflectionDemo_access_field_annotation/ReflectionDemo/src/ReflectionDemo1.java b/BasicJava/ReflectionDemo_access_field_annotation/ReflectionDemo/src/ReflectionDemo1.java
new file mode 100644
index 000000000..3e7389b66
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_field_annotation/ReflectionDemo/src/ReflectionDemo1.java
@@ -0,0 +1,34 @@
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Field;
+
+/**
+ * Example of a field with annotations
+ */
+public class ReflectionDemo1
+{
+ public static void main(String[] args)
+ {
+ try
+ {
+ Class classObj = Display.class;
+ Field field = classObj.getField("myField");
+ Annotation[] annotations = field.getDeclaredAnnotations();
+
+ for (Annotation annotation : annotations)
+ {
+ if (annotation instanceof MyAnnotation)
+ {
+ MyAnnotation myAnnotation = (MyAnnotation) annotation;
+ System.out.println("name: " + myAnnotation.name());
+ System.out.println("value: " + myAnnotation.value());
+ }
+ }
+ }
+ catch (NoSuchFieldException | SecurityException e)
+ {
+ e.printStackTrace();
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/ReflectionDemo_access_field_annotation/ReflectionDemo/src/ReflectionDemo2.java b/BasicJava/ReflectionDemo_access_field_annotation/ReflectionDemo/src/ReflectionDemo2.java
new file mode 100644
index 000000000..5ecb25eca
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_field_annotation/ReflectionDemo/src/ReflectionDemo2.java
@@ -0,0 +1,26 @@
+import java.lang.reflect.Field;
+
+/**
+ * Example of a field with annotations
+ */
+public class ReflectionDemo2
+{
+ public static void main(String[] args)
+ {
+ try
+ {
+ Class classObj = Display.class;
+ Field field = classObj.getField("myField");
+ MyAnnotation myAnnotation = field.getAnnotation(MyAnnotation.class);
+
+ System.out.println("name: " + myAnnotation.name());
+ System.out.println("value: " + myAnnotation.value());
+ }
+ catch (NoSuchFieldException | SecurityException e)
+ {
+ e.printStackTrace();
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/ReflectionDemo_access_fields/Output.txt b/BasicJava/ReflectionDemo_access_fields/Output.txt
new file mode 100644
index 000000000..730ed3d91
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_fields/Output.txt
@@ -0,0 +1,6 @@
+public java.lang.String Student.name
+name
+---------------------------------
+public java.lang.String Student.age
+age
+---------------------------------
diff --git a/BasicJava/ReflectionDemo_access_fields/ReflectionDemo/.classpath b/BasicJava/ReflectionDemo_access_fields/ReflectionDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_fields/ReflectionDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/ReflectionDemo_access_fields/ReflectionDemo/.project b/BasicJava/ReflectionDemo_access_fields/ReflectionDemo/.project
new file mode 100644
index 000000000..7e4540c4f
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_fields/ReflectionDemo/.project
@@ -0,0 +1,17 @@
+
+
+ ReflectionDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/ReflectionDemo_access_fields/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/ReflectionDemo_access_fields/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_fields/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/ReflectionDemo_access_fields/ReflectionDemo/bin/ReflectionDemo.class b/BasicJava/ReflectionDemo_access_fields/ReflectionDemo/bin/ReflectionDemo.class
new file mode 100644
index 000000000..f05d10bc4
Binary files /dev/null and b/BasicJava/ReflectionDemo_access_fields/ReflectionDemo/bin/ReflectionDemo.class differ
diff --git a/BasicJava/ReflectionDemo_access_fields/ReflectionDemo/bin/Student.class b/BasicJava/ReflectionDemo_access_fields/ReflectionDemo/bin/Student.class
new file mode 100644
index 000000000..02ee8a2e1
Binary files /dev/null and b/BasicJava/ReflectionDemo_access_fields/ReflectionDemo/bin/Student.class differ
diff --git a/BasicJava/ReflectionDemo_access_fields/ReflectionDemo/src/ReflectionDemo.java b/BasicJava/ReflectionDemo_access_fields/ReflectionDemo/src/ReflectionDemo.java
new file mode 100644
index 000000000..9464a9c2a
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_fields/ReflectionDemo/src/ReflectionDemo.java
@@ -0,0 +1,30 @@
+import java.lang.reflect.Field;
+
+/**
+ *
+ * We can access the fields (member variables) of a class.
+ *
+ */
+public class ReflectionDemo
+{
+ public static void main(String[] args)
+ {
+
+ Class classObj = Student.class;
+
+ /*
+ * Returns:the array of Field objects representing the public fields.
+ */
+
+ Field[] fieldArray = classObj.getFields();
+
+ for (Field field : fieldArray)
+ {
+ System.out.println(field);
+ System.out.println(field.getName());
+ System.out.println("---------------------------------");
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/ReflectionDemo_access_fields/ReflectionDemo/src/Student.java b/BasicJava/ReflectionDemo_access_fields/ReflectionDemo/src/Student.java
new file mode 100644
index 000000000..a8805d630
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_fields/ReflectionDemo/src/Student.java
@@ -0,0 +1,11 @@
+class Student
+{
+ public String name;
+ public String age;
+
+ public void showMessage()
+ {
+ System.out.println("Hi");
+ }
+}
+
diff --git a/BasicJava/ReflectionDemo_access_interfaces/Output.txt b/BasicJava/ReflectionDemo_access_interfaces/Output.txt
new file mode 100644
index 000000000..66ab41d6a
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_interfaces/Output.txt
@@ -0,0 +1,4 @@
+java.util.List
+java.util.RandomAccess
+java.lang.Cloneable
+java.io.Serializable
diff --git a/BasicJava/ReflectionDemo_access_interfaces/ReflectionDemo/.classpath b/BasicJava/ReflectionDemo_access_interfaces/ReflectionDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_interfaces/ReflectionDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/ReflectionDemo_access_interfaces/ReflectionDemo/.project b/BasicJava/ReflectionDemo_access_interfaces/ReflectionDemo/.project
new file mode 100644
index 000000000..7e4540c4f
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_interfaces/ReflectionDemo/.project
@@ -0,0 +1,17 @@
+
+
+ ReflectionDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/ReflectionDemo_access_interfaces/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/ReflectionDemo_access_interfaces/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_interfaces/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/ReflectionDemo_access_interfaces/ReflectionDemo/bin/ReflectionDemo.class b/BasicJava/ReflectionDemo_access_interfaces/ReflectionDemo/bin/ReflectionDemo.class
new file mode 100644
index 000000000..95235a75b
Binary files /dev/null and b/BasicJava/ReflectionDemo_access_interfaces/ReflectionDemo/bin/ReflectionDemo.class differ
diff --git a/BasicJava/ReflectionDemo_access_interfaces/ReflectionDemo/src/ReflectionDemo.java b/BasicJava/ReflectionDemo_access_interfaces/ReflectionDemo/src/ReflectionDemo.java
new file mode 100644
index 000000000..a4f288b2a
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_interfaces/ReflectionDemo/src/ReflectionDemo.java
@@ -0,0 +1,32 @@
+import java.util.ArrayList;
+
+/**
+ *
+ * It is possible to get a list of the interfaces implemented by a given class
+ *
+ */
+public class ReflectionDemo
+{
+ public static void main(String[] args)
+ {
+
+ Class classObj = ArrayList.class;
+
+ /*
+ * Returns:an array of interfaces implemented by this class.
+ *
+ * A class can implement many interfaces. Therefore an array of Class is
+ * returned. Interfaces are also represented by Class objects in Java
+ * Reflection.
+ */
+
+ Class[] classArray = classObj.getInterfaces();
+
+ for (Class class1 : classArray)
+ {
+ System.out.println(class1.getName());
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/ReflectionDemo_access_method_annotation/ReflectionDemo/.classpath b/BasicJava/ReflectionDemo_access_method_annotation/ReflectionDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_method_annotation/ReflectionDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/ReflectionDemo_access_method_annotation/ReflectionDemo/.project b/BasicJava/ReflectionDemo_access_method_annotation/ReflectionDemo/.project
new file mode 100644
index 000000000..7e4540c4f
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_method_annotation/ReflectionDemo/.project
@@ -0,0 +1,17 @@
+
+
+ ReflectionDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/ReflectionDemo_access_method_annotation/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/ReflectionDemo_access_method_annotation/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_method_annotation/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/ReflectionDemo_access_method_annotation/ReflectionDemo/bin/Display.class b/BasicJava/ReflectionDemo_access_method_annotation/ReflectionDemo/bin/Display.class
new file mode 100644
index 000000000..022a2ed9e
Binary files /dev/null and b/BasicJava/ReflectionDemo_access_method_annotation/ReflectionDemo/bin/Display.class differ
diff --git a/BasicJava/ReflectionDemo_access_method_annotation/ReflectionDemo/bin/MyAnnotation.class b/BasicJava/ReflectionDemo_access_method_annotation/ReflectionDemo/bin/MyAnnotation.class
new file mode 100644
index 000000000..8be981f2f
Binary files /dev/null and b/BasicJava/ReflectionDemo_access_method_annotation/ReflectionDemo/bin/MyAnnotation.class differ
diff --git a/BasicJava/ReflectionDemo_access_method_annotation/ReflectionDemo/bin/ReflectionDemo1.class b/BasicJava/ReflectionDemo_access_method_annotation/ReflectionDemo/bin/ReflectionDemo1.class
new file mode 100644
index 000000000..7c3986b52
Binary files /dev/null and b/BasicJava/ReflectionDemo_access_method_annotation/ReflectionDemo/bin/ReflectionDemo1.class differ
diff --git a/BasicJava/ReflectionDemo_access_method_annotation/ReflectionDemo/bin/ReflectionDemo2.class b/BasicJava/ReflectionDemo_access_method_annotation/ReflectionDemo/bin/ReflectionDemo2.class
new file mode 100644
index 000000000..5639afe6e
Binary files /dev/null and b/BasicJava/ReflectionDemo_access_method_annotation/ReflectionDemo/bin/ReflectionDemo2.class differ
diff --git a/BasicJava/ReflectionDemo_access_method_annotation/ReflectionDemo/src/Display.java b/BasicJava/ReflectionDemo_access_method_annotation/ReflectionDemo/src/Display.java
new file mode 100644
index 000000000..51ce3d10b
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_method_annotation/ReflectionDemo/src/Display.java
@@ -0,0 +1,22 @@
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.METHOD)
+
+@interface MyAnnotation
+{
+ public String name();
+
+ public String value();
+}
+
+public class Display
+{
+ @MyAnnotation(name = "Country", value = "India")
+ public void doSomething()
+ {
+ }
+}
diff --git a/BasicJava/ReflectionDemo_access_method_annotation/ReflectionDemo/src/ReflectionDemo1.java b/BasicJava/ReflectionDemo_access_method_annotation/ReflectionDemo/src/ReflectionDemo1.java
new file mode 100644
index 000000000..fb080b386
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_method_annotation/ReflectionDemo/src/ReflectionDemo1.java
@@ -0,0 +1,38 @@
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Method;
+
+/**
+ * We can access the annotations of a class,method or field at runtime.
+ *
+ * Method Annotations Example:
+ */
+public class ReflectionDemo1
+{
+ public static void main(String[] args)
+ {
+ try
+ {
+ Class classObj = Display.class;
+ Method method = classObj.getMethod("doSomething", null);
+ /*
+ * Returns:annotations present on this element *
+ */
+ Annotation[] annotationArray = method.getAnnotations();
+
+ for (Annotation annotation : annotationArray)
+ {
+ if(annotation instanceof MyAnnotation)
+ {
+ MyAnnotation myAnnotation = (MyAnnotation)annotation;
+ System.out.println("name: "+myAnnotation.name());
+ System.out.println("value: "+myAnnotation.value());
+ }
+ }
+ }
+ catch (NoSuchMethodException | SecurityException e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/ReflectionDemo_access_method_annotation/ReflectionDemo/src/ReflectionDemo2.java b/BasicJava/ReflectionDemo_access_method_annotation/ReflectionDemo/src/ReflectionDemo2.java
new file mode 100644
index 000000000..f9ad0f674
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_method_annotation/ReflectionDemo/src/ReflectionDemo2.java
@@ -0,0 +1,33 @@
+import java.lang.reflect.Method;
+
+/**
+ * We can access the annotations of a class,method or field at
+ * runtime.
+ *
+ * Method Annotations Example:
+ */
+public class ReflectionDemo2
+{
+ public static void main(String[] args)
+ {
+ try
+ {
+ Class classObj = Display.class;
+ Method method = classObj.getMethod("doSomething", null);
+ /*
+ * Returns: this element's annotation for the specified
+ * annotation type if present on this element, else null
+ *
+ */
+ MyAnnotation myAnnotation = method.getAnnotation(MyAnnotation.class);
+ System.out.println("name: " + myAnnotation.name());
+ System.out.println("value: " + myAnnotation.value());
+
+ }
+ catch (NoSuchMethodException | SecurityException e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/ReflectionDemo_access_method_annotation/ReflectionDemo1_Output.txt b/BasicJava/ReflectionDemo_access_method_annotation/ReflectionDemo1_Output.txt
new file mode 100644
index 000000000..ebfbbe14c
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_method_annotation/ReflectionDemo1_Output.txt
@@ -0,0 +1,2 @@
+name: Country
+value: India
diff --git a/BasicJava/ReflectionDemo_access_method_annotation/ReflectionDemo2_Output.txt b/BasicJava/ReflectionDemo_access_method_annotation/ReflectionDemo2_Output.txt
new file mode 100644
index 000000000..ebfbbe14c
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_method_annotation/ReflectionDemo2_Output.txt
@@ -0,0 +1,2 @@
+name: Country
+value: India
diff --git a/BasicJava/ReflectionDemo_access_methods/Output.txt b/BasicJava/ReflectionDemo_access_methods/Output.txt
new file mode 100644
index 000000000..e5a7cb556
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_methods/Output.txt
@@ -0,0 +1,42 @@
+public boolean java.util.ArrayList.add(java.lang.Object)
+public void java.util.ArrayList.add(int,java.lang.Object)
+public boolean java.util.ArrayList.remove(java.lang.Object)
+public java.lang.Object java.util.ArrayList.remove(int)
+public java.lang.Object java.util.ArrayList.get(int)
+public java.lang.Object java.util.ArrayList.clone()
+public int java.util.ArrayList.indexOf(java.lang.Object)
+public void java.util.ArrayList.clear()
+public boolean java.util.ArrayList.contains(java.lang.Object)
+public boolean java.util.ArrayList.isEmpty()
+public java.util.Iterator java.util.ArrayList.iterator()
+public int java.util.ArrayList.lastIndexOf(java.lang.Object)
+public void java.util.ArrayList.replaceAll(java.util.function.UnaryOperator)
+public int java.util.ArrayList.size()
+public java.util.List java.util.ArrayList.subList(int,int)
+public java.lang.Object[] java.util.ArrayList.toArray(java.lang.Object[])
+public java.lang.Object[] java.util.ArrayList.toArray()
+public java.util.Spliterator java.util.ArrayList.spliterator()
+public boolean java.util.ArrayList.addAll(int,java.util.Collection)
+public boolean java.util.ArrayList.addAll(java.util.Collection)
+public void java.util.ArrayList.forEach(java.util.function.Consumer)
+public java.lang.Object java.util.ArrayList.set(int,java.lang.Object)
+public void java.util.ArrayList.ensureCapacity(int)
+public void java.util.ArrayList.trimToSize()
+public java.util.ListIterator java.util.ArrayList.listIterator()
+public java.util.ListIterator java.util.ArrayList.listIterator(int)
+public boolean java.util.ArrayList.removeAll(java.util.Collection)
+public boolean java.util.ArrayList.removeIf(java.util.function.Predicate)
+public boolean java.util.ArrayList.retainAll(java.util.Collection)
+public void java.util.ArrayList.sort(java.util.Comparator)
+public boolean java.util.AbstractList.equals(java.lang.Object)
+public int java.util.AbstractList.hashCode()
+public java.lang.String java.util.AbstractCollection.toString()
+public boolean java.util.AbstractCollection.containsAll(java.util.Collection)
+public final void java.lang.Object.wait() throws java.lang.InterruptedException
+public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException
+public final native void java.lang.Object.wait(long) throws java.lang.InterruptedException
+public final native java.lang.Class java.lang.Object.getClass()
+public final native void java.lang.Object.notify()
+public final native void java.lang.Object.notifyAll()
+public default java.util.stream.Stream java.util.Collection.stream()
+public default java.util.stream.Stream java.util.Collection.parallelStream()
diff --git a/BasicJava/ReflectionDemo_access_methods/ReflectionDemo/.classpath b/BasicJava/ReflectionDemo_access_methods/ReflectionDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_methods/ReflectionDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/ReflectionDemo_access_methods/ReflectionDemo/.project b/BasicJava/ReflectionDemo_access_methods/ReflectionDemo/.project
new file mode 100644
index 000000000..7e4540c4f
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_methods/ReflectionDemo/.project
@@ -0,0 +1,17 @@
+
+
+ ReflectionDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/ReflectionDemo_access_methods/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/ReflectionDemo_access_methods/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_methods/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/ReflectionDemo_access_methods/ReflectionDemo/bin/ReflectionDemo.class b/BasicJava/ReflectionDemo_access_methods/ReflectionDemo/bin/ReflectionDemo.class
new file mode 100644
index 000000000..0399957a2
Binary files /dev/null and b/BasicJava/ReflectionDemo_access_methods/ReflectionDemo/bin/ReflectionDemo.class differ
diff --git a/BasicJava/ReflectionDemo_access_methods/ReflectionDemo/src/ReflectionDemo.java b/BasicJava/ReflectionDemo_access_methods/ReflectionDemo/src/ReflectionDemo.java
new file mode 100644
index 000000000..1992bdd58
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_methods/ReflectionDemo/src/ReflectionDemo.java
@@ -0,0 +1,30 @@
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+
+/**
+ *
+ * We can access the methods of a class.
+ *
+ */
+public class ReflectionDemo
+{
+ public static void main(String[] args)
+ {
+
+ Class classObj = ArrayList.class;
+
+ /*
+ * Returns:the array of Method objects representing the public methods
+ * of this class.
+ */
+
+ Method[] methodArray = classObj.getMethods();
+
+ for (Method method : methodArray)
+ {
+ System.out.println(method);
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/ReflectionDemo_access_param_annotation/Output.txt b/BasicJava/ReflectionDemo_access_param_annotation/Output.txt
new file mode 100644
index 000000000..5ad0afa81
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_param_annotation/Output.txt
@@ -0,0 +1,3 @@
+param: java.lang.String
+name : age
+value: 23
diff --git a/BasicJava/ReflectionDemo_access_param_annotation/ReflectionDemo/.classpath b/BasicJava/ReflectionDemo_access_param_annotation/ReflectionDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_param_annotation/ReflectionDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/ReflectionDemo_access_param_annotation/ReflectionDemo/.project b/BasicJava/ReflectionDemo_access_param_annotation/ReflectionDemo/.project
new file mode 100644
index 000000000..7e4540c4f
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_param_annotation/ReflectionDemo/.project
@@ -0,0 +1,17 @@
+
+
+ ReflectionDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/ReflectionDemo_access_param_annotation/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/ReflectionDemo_access_param_annotation/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_param_annotation/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/ReflectionDemo_access_param_annotation/ReflectionDemo/bin/Display.class b/BasicJava/ReflectionDemo_access_param_annotation/ReflectionDemo/bin/Display.class
new file mode 100644
index 000000000..8458b16c4
Binary files /dev/null and b/BasicJava/ReflectionDemo_access_param_annotation/ReflectionDemo/bin/Display.class differ
diff --git a/BasicJava/ReflectionDemo_access_param_annotation/ReflectionDemo/bin/MyAnnotation.class b/BasicJava/ReflectionDemo_access_param_annotation/ReflectionDemo/bin/MyAnnotation.class
new file mode 100644
index 000000000..d4481872d
Binary files /dev/null and b/BasicJava/ReflectionDemo_access_param_annotation/ReflectionDemo/bin/MyAnnotation.class differ
diff --git a/BasicJava/ReflectionDemo_access_param_annotation/ReflectionDemo/bin/ReflectionDemo.class b/BasicJava/ReflectionDemo_access_param_annotation/ReflectionDemo/bin/ReflectionDemo.class
new file mode 100644
index 000000000..9d13cfe70
Binary files /dev/null and b/BasicJava/ReflectionDemo_access_param_annotation/ReflectionDemo/bin/ReflectionDemo.class differ
diff --git a/BasicJava/ReflectionDemo_access_param_annotation/ReflectionDemo/src/Display.java b/BasicJava/ReflectionDemo_access_param_annotation/ReflectionDemo/src/Display.java
new file mode 100644
index 000000000..6deca0903
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_param_annotation/ReflectionDemo/src/Display.java
@@ -0,0 +1,22 @@
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.PARAMETER)
+
+@interface MyAnnotation
+{
+ public String name();
+
+ public String value();
+}
+
+public class Display
+{
+
+ public void doSomething(@MyAnnotation(name = "age", value = "23") String value)
+ {
+ }
+}
diff --git a/BasicJava/ReflectionDemo_access_param_annotation/ReflectionDemo/src/ReflectionDemo.java b/BasicJava/ReflectionDemo_access_param_annotation/ReflectionDemo/src/ReflectionDemo.java
new file mode 100644
index 000000000..cb9a0522f
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_param_annotation/ReflectionDemo/src/ReflectionDemo.java
@@ -0,0 +1,47 @@
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Method;
+
+/**
+ * Parameter Annotations:
+ *
+ * We can access parameter annotations from the Method object like below.
+ */
+public class ReflectionDemo
+{
+ public static void main(String[] args)
+ {
+ try
+ {
+ Class classObj = Display.class;
+ Method method = classObj.getMethod("doSomething", String.class);
+ /*
+ * Returns:a two-dimensional Annotation array, containing an
+ * array of annotations for each method parameter.
+ */
+ Annotation[][] parameterAnnotations = method.getParameterAnnotations();
+ Class[] parameterTypes = method.getParameterTypes();
+
+ int i = 0;
+ for (Annotation[] annotations : parameterAnnotations)
+ {
+ Class parameterType = parameterTypes[i++];
+
+ for (Annotation annotation : annotations)
+ {
+ if (annotation instanceof MyAnnotation)
+ {
+ MyAnnotation myAnnotation = (MyAnnotation) annotation;
+ System.out.println("param: " + parameterType.getName());
+ System.out.println("name : " + myAnnotation.name());
+ System.out.println("value: " + myAnnotation.value());
+ }
+ }
+ }
+ }
+ catch (NoSuchMethodException e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/ReflectionDemo_access_private_field/Output.txt b/BasicJava/ReflectionDemo_access_private_field/Output.txt
new file mode 100644
index 000000000..57e528a09
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_private_field/Output.txt
@@ -0,0 +1 @@
+privateNameField value = Peter
diff --git a/BasicJava/ReflectionDemo_access_private_field/ReflectionDemo/.classpath b/BasicJava/ReflectionDemo_access_private_field/ReflectionDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_private_field/ReflectionDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/ReflectionDemo_access_private_field/ReflectionDemo/.project b/BasicJava/ReflectionDemo_access_private_field/ReflectionDemo/.project
new file mode 100644
index 000000000..7e4540c4f
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_private_field/ReflectionDemo/.project
@@ -0,0 +1,17 @@
+
+
+ ReflectionDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/ReflectionDemo_access_private_field/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/ReflectionDemo_access_private_field/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_private_field/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/ReflectionDemo_access_private_field/ReflectionDemo/bin/ReflectionDemo.class b/BasicJava/ReflectionDemo_access_private_field/ReflectionDemo/bin/ReflectionDemo.class
new file mode 100644
index 000000000..c8a094f97
Binary files /dev/null and b/BasicJava/ReflectionDemo_access_private_field/ReflectionDemo/bin/ReflectionDemo.class differ
diff --git a/BasicJava/ReflectionDemo_access_private_field/ReflectionDemo/bin/Student.class b/BasicJava/ReflectionDemo_access_private_field/ReflectionDemo/bin/Student.class
new file mode 100644
index 000000000..8bcbd7c68
Binary files /dev/null and b/BasicJava/ReflectionDemo_access_private_field/ReflectionDemo/bin/Student.class differ
diff --git a/BasicJava/ReflectionDemo_access_private_field/ReflectionDemo/src/ReflectionDemo.java b/BasicJava/ReflectionDemo_access_private_field/ReflectionDemo/src/ReflectionDemo.java
new file mode 100644
index 000000000..317f7a83a
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_private_field/ReflectionDemo/src/ReflectionDemo.java
@@ -0,0 +1,47 @@
+import java.lang.reflect.Field;
+
+/**
+ *
+ * Despite the common belief it is actually possible to access private fields
+ * and methods of other classes via Java Reflection. It is not even that
+ * difficult. This can be very handy during unit testing.
+ *
+ */
+public class ReflectionDemo
+{
+ public static void main(String[] args)
+ {
+ try
+ {
+ Class classObj = Student.class;
+ Field privateFieldObj = classObj.getDeclaredField("name");
+ /*
+ * Set the accessible flag for this object to the indicated boolean
+ * value. A value of true indicates that the reflected object should
+ * suppress Java language access checking when it is used. A value
+ * of false indicates that the reflected object should enforce Java
+ * language access checks.
+ *
+ * First, if there is a security manager, its checkPermission method
+ * is called with a ReflectPermission("suppressAccessChecks")
+ * permission.
+ *
+ * By calling Field.setAcessible(true) you turn off the access
+ * checks for this particular Field instance, for reflection only.
+ * Now you can access it even if it is private, protected or package
+ * scope, even if the caller is not part of those scopes.
+ */
+ privateFieldObj.setAccessible(true);
+ Student student = new Student("Peter");
+ String fieldValue = (String) privateFieldObj.get(student);
+ System.out.println("privateNameField value = " + fieldValue);
+ }
+ catch (NoSuchFieldException | SecurityException
+ | IllegalArgumentException | IllegalAccessException e)
+ {
+ e.printStackTrace();
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/ReflectionDemo_access_private_field/ReflectionDemo/src/Student.java b/BasicJava/ReflectionDemo_access_private_field/ReflectionDemo/src/Student.java
new file mode 100644
index 000000000..d9eddc810
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_private_field/ReflectionDemo/src/Student.java
@@ -0,0 +1,10 @@
+class Student
+{
+ private String name;
+
+ public Student(String name)
+ {
+ this.name = name;
+ }
+
+}
diff --git a/BasicJava/ReflectionDemo_access_superclass/Output.txt b/BasicJava/ReflectionDemo_access_superclass/Output.txt
new file mode 100644
index 000000000..38fc6c540
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_superclass/Output.txt
@@ -0,0 +1,3 @@
+class java.util.AbstractList
+Name = java.util.AbstractList
+Simple Name = AbstractList
diff --git a/BasicJava/ReflectionDemo_access_superclass/ReflectionDemo/.classpath b/BasicJava/ReflectionDemo_access_superclass/ReflectionDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_superclass/ReflectionDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/ReflectionDemo_access_superclass/ReflectionDemo/.project b/BasicJava/ReflectionDemo_access_superclass/ReflectionDemo/.project
new file mode 100644
index 000000000..7e4540c4f
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_superclass/ReflectionDemo/.project
@@ -0,0 +1,17 @@
+
+
+ ReflectionDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/ReflectionDemo_access_superclass/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/ReflectionDemo_access_superclass/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_superclass/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/ReflectionDemo_access_superclass/ReflectionDemo/bin/ReflectionDemo.class b/BasicJava/ReflectionDemo_access_superclass/ReflectionDemo/bin/ReflectionDemo.class
new file mode 100644
index 000000000..509579d99
Binary files /dev/null and b/BasicJava/ReflectionDemo_access_superclass/ReflectionDemo/bin/ReflectionDemo.class differ
diff --git a/BasicJava/ReflectionDemo_access_superclass/ReflectionDemo/src/ReflectionDemo.java b/BasicJava/ReflectionDemo_access_superclass/ReflectionDemo/src/ReflectionDemo.java
new file mode 100644
index 000000000..478f13b2c
--- /dev/null
+++ b/BasicJava/ReflectionDemo_access_superclass/ReflectionDemo/src/ReflectionDemo.java
@@ -0,0 +1,27 @@
+import java.util.ArrayList;
+
+/**
+ *
+ * From the Class object we can access the superclass of the class.
+ *
+ */
+public class ReflectionDemo
+{
+ public static void main(String[] args)
+ {
+
+ Class classObj = ArrayList.class;
+
+ /*
+ * Returns:the superclass of the class represented by this object.
+ */
+
+ Class super ArrayList> superClass = classObj.getSuperclass();
+
+ System.out.println(superClass);
+ System.out.println("Name = "+superClass.getName());
+ System.out.println("Simple Name = "+superClass.getSimpleName());
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/ReflectionDemo_call_private_getmethod/Output.txt b/BasicJava/ReflectionDemo_call_private_getmethod/Output.txt
new file mode 100644
index 000000000..7e3fe5df7
--- /dev/null
+++ b/BasicJava/ReflectionDemo_call_private_getmethod/Output.txt
@@ -0,0 +1 @@
+returnValue = Peter
diff --git a/BasicJava/ReflectionDemo_call_private_getmethod/ReflectionDemo/.classpath b/BasicJava/ReflectionDemo_call_private_getmethod/ReflectionDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/ReflectionDemo_call_private_getmethod/ReflectionDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/ReflectionDemo_call_private_getmethod/ReflectionDemo/.project b/BasicJava/ReflectionDemo_call_private_getmethod/ReflectionDemo/.project
new file mode 100644
index 000000000..7e4540c4f
--- /dev/null
+++ b/BasicJava/ReflectionDemo_call_private_getmethod/ReflectionDemo/.project
@@ -0,0 +1,17 @@
+
+
+ ReflectionDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/ReflectionDemo_call_private_getmethod/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/ReflectionDemo_call_private_getmethod/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/ReflectionDemo_call_private_getmethod/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/ReflectionDemo_call_private_getmethod/ReflectionDemo/bin/ReflectionDemo.class b/BasicJava/ReflectionDemo_call_private_getmethod/ReflectionDemo/bin/ReflectionDemo.class
new file mode 100644
index 000000000..6fa1533ed
Binary files /dev/null and b/BasicJava/ReflectionDemo_call_private_getmethod/ReflectionDemo/bin/ReflectionDemo.class differ
diff --git a/BasicJava/ReflectionDemo_call_private_getmethod/ReflectionDemo/bin/Student.class b/BasicJava/ReflectionDemo_call_private_getmethod/ReflectionDemo/bin/Student.class
new file mode 100644
index 000000000..bae9e6a9d
Binary files /dev/null and b/BasicJava/ReflectionDemo_call_private_getmethod/ReflectionDemo/bin/Student.class differ
diff --git a/BasicJava/ReflectionDemo_call_private_getmethod/ReflectionDemo/src/ReflectionDemo.java b/BasicJava/ReflectionDemo_call_private_getmethod/ReflectionDemo/src/ReflectionDemo.java
new file mode 100644
index 000000000..eccd2f96f
--- /dev/null
+++ b/BasicJava/ReflectionDemo_call_private_getmethod/ReflectionDemo/src/ReflectionDemo.java
@@ -0,0 +1,52 @@
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+/**
+ *
+ * Despite the common belief it is actually possible to access private fields
+ * and methods of other classes via Java Reflection. It is not even that
+ * difficult. This can be very handy during unit testing.
+ *
+ */
+public class ReflectionDemo
+{
+ public static void main(String[] args)
+ {
+ try
+ {
+ Class classObj = Student.class;
+ Method privateGetNameMethod = classObj.getDeclaredMethod("getName", null);
+
+ /*
+ * Set the accessible flag for this object to the indicated boolean
+ * value. A value of true indicates that the reflected object should
+ * suppress Java language access checking when it is used. A value
+ * of false indicates that the reflected object should enforce Java
+ * language access checks.
+ *
+ * First, if there is a security manager, its checkPermission method
+ * is called with a ReflectPermission("suppressAccessChecks")
+ * permission.
+ *
+ * By calling Method.setAcessible(true) you turn off the access
+ * checks for this particular Method instance, for reflection only.
+ * Now you can access it even if it is private, protected or package
+ * scope, even if the caller is not part of those scopes.
+ *
+ */
+ privateGetNameMethod.setAccessible(true);
+
+ Student student = new Student("Peter");
+ String returnValue = (String) privateGetNameMethod.invoke(student,null);
+
+ System.out.println("returnValue = " + returnValue);
+ }
+ catch (NoSuchMethodException | InvocationTargetException
+ | IllegalAccessException | IllegalArgumentException e)
+ {
+ e.printStackTrace();
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/ReflectionDemo_call_private_getmethod/ReflectionDemo/src/Student.java b/BasicJava/ReflectionDemo_call_private_getmethod/ReflectionDemo/src/Student.java
new file mode 100644
index 000000000..a1ba2b7ac
--- /dev/null
+++ b/BasicJava/ReflectionDemo_call_private_getmethod/ReflectionDemo/src/Student.java
@@ -0,0 +1,15 @@
+class Student
+{
+ private String name;
+
+ public Student(String name)
+ {
+ this.name = name;
+ }
+
+ private String getName()
+ {
+ return name;
+ }
+
+}
diff --git a/BasicJava/ReflectionDemo_classObj_int_str_array/ReflectionDemo/.classpath b/BasicJava/ReflectionDemo_classObj_int_str_array/ReflectionDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/ReflectionDemo_classObj_int_str_array/ReflectionDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/ReflectionDemo_classObj_int_str_array/ReflectionDemo/.project b/BasicJava/ReflectionDemo_classObj_int_str_array/ReflectionDemo/.project
new file mode 100644
index 000000000..7e4540c4f
--- /dev/null
+++ b/BasicJava/ReflectionDemo_classObj_int_str_array/ReflectionDemo/.project
@@ -0,0 +1,17 @@
+
+
+ ReflectionDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/ReflectionDemo_classObj_int_str_array/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/ReflectionDemo_classObj_int_str_array/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/ReflectionDemo_classObj_int_str_array/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/ReflectionDemo_classObj_int_str_array/ReflectionDemo/bin/ReflectionDemo1.class b/BasicJava/ReflectionDemo_classObj_int_str_array/ReflectionDemo/bin/ReflectionDemo1.class
new file mode 100644
index 000000000..2cbf822ac
Binary files /dev/null and b/BasicJava/ReflectionDemo_classObj_int_str_array/ReflectionDemo/bin/ReflectionDemo1.class differ
diff --git a/BasicJava/ReflectionDemo_classObj_int_str_array/ReflectionDemo/bin/ReflectionDemo2.class b/BasicJava/ReflectionDemo_classObj_int_str_array/ReflectionDemo/bin/ReflectionDemo2.class
new file mode 100644
index 000000000..902c7c6e2
Binary files /dev/null and b/BasicJava/ReflectionDemo_classObj_int_str_array/ReflectionDemo/bin/ReflectionDemo2.class differ
diff --git a/BasicJava/ReflectionDemo_classObj_int_str_array/ReflectionDemo/src/ReflectionDemo1.java b/BasicJava/ReflectionDemo_classObj_int_str_array/ReflectionDemo/src/ReflectionDemo1.java
new file mode 100644
index 000000000..dc0c61fce
--- /dev/null
+++ b/BasicJava/ReflectionDemo_classObj_int_str_array/ReflectionDemo/src/ReflectionDemo1.java
@@ -0,0 +1,14 @@
+/**
+ * Obtaining the Class Object of an Array
+ *
+ */
+public class ReflectionDemo1
+{
+ public static void main(String[] args)
+ {
+ Class stringArrayClassObj = String[].class;
+ System.out.println(stringArrayClassObj);
+ System.out.println(stringArrayClassObj.getName());
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/ReflectionDemo_classObj_int_str_array/ReflectionDemo/src/ReflectionDemo2.java b/BasicJava/ReflectionDemo_classObj_int_str_array/ReflectionDemo/src/ReflectionDemo2.java
new file mode 100644
index 000000000..2361cab55
--- /dev/null
+++ b/BasicJava/ReflectionDemo_classObj_int_str_array/ReflectionDemo/src/ReflectionDemo2.java
@@ -0,0 +1,37 @@
+/**
+ * Obtaining the Class Object of an Array
+ *
+ */
+public class ReflectionDemo2
+{
+ public static void main(String[] args)
+ {
+ try
+ {
+ /*
+ * The JVM represents an int via the letter I. The [ on the left
+ * means it is the class of an int array I am interested in. This
+ * works for all other primitives too
+ */
+ Class intArrayClassObj = Class.forName("[I");
+ System.out.println(intArrayClassObj);
+ System.out.println(intArrayClassObj.getName());
+
+ System.out.println("------------------------------");
+
+ /*
+ * Notice the [L to the left of the class name, and the ; to the
+ * right. This means an array of objects with the given type.
+ */
+ Class stringArrayClassObj = Class.forName("[Ljava.lang.String;");
+ System.out.println(stringArrayClassObj);
+ System.out.println(stringArrayClassObj.getName());
+ }
+ catch (ClassNotFoundException e)
+ {
+ e.printStackTrace();
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/ReflectionDemo_classObj_int_str_array/ReflectionDemo1_Output.txt b/BasicJava/ReflectionDemo_classObj_int_str_array/ReflectionDemo1_Output.txt
new file mode 100644
index 000000000..37c46b424
--- /dev/null
+++ b/BasicJava/ReflectionDemo_classObj_int_str_array/ReflectionDemo1_Output.txt
@@ -0,0 +1,2 @@
+class [Ljava.lang.String;
+[Ljava.lang.String;
diff --git a/BasicJava/ReflectionDemo_classObj_int_str_array/ReflectionDemo2_Output.txt b/BasicJava/ReflectionDemo_classObj_int_str_array/ReflectionDemo2_Output.txt
new file mode 100644
index 000000000..80f03749a
--- /dev/null
+++ b/BasicJava/ReflectionDemo_classObj_int_str_array/ReflectionDemo2_Output.txt
@@ -0,0 +1,5 @@
+class [I
+[I
+------------------------------
+class [Ljava.lang.String;
+[Ljava.lang.String;
diff --git a/BasicJava/ReflectionDemo_cons_instantiate/Output.txt b/BasicJava/ReflectionDemo_cons_instantiate/Output.txt
new file mode 100644
index 000000000..5089231f7
--- /dev/null
+++ b/BasicJava/ReflectionDemo_cons_instantiate/Output.txt
@@ -0,0 +1 @@
+Peter
diff --git a/BasicJava/ReflectionDemo_cons_instantiate/ReflectionDemo/.classpath b/BasicJava/ReflectionDemo_cons_instantiate/ReflectionDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/ReflectionDemo_cons_instantiate/ReflectionDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/ReflectionDemo_cons_instantiate/ReflectionDemo/.project b/BasicJava/ReflectionDemo_cons_instantiate/ReflectionDemo/.project
new file mode 100644
index 000000000..7e4540c4f
--- /dev/null
+++ b/BasicJava/ReflectionDemo_cons_instantiate/ReflectionDemo/.project
@@ -0,0 +1,17 @@
+
+
+ ReflectionDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/ReflectionDemo_cons_instantiate/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/ReflectionDemo_cons_instantiate/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/ReflectionDemo_cons_instantiate/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/ReflectionDemo_cons_instantiate/ReflectionDemo/bin/ReflectionDemo.class b/BasicJava/ReflectionDemo_cons_instantiate/ReflectionDemo/bin/ReflectionDemo.class
new file mode 100644
index 000000000..9a1e37e26
Binary files /dev/null and b/BasicJava/ReflectionDemo_cons_instantiate/ReflectionDemo/bin/ReflectionDemo.class differ
diff --git a/BasicJava/ReflectionDemo_cons_instantiate/ReflectionDemo/src/ReflectionDemo.java b/BasicJava/ReflectionDemo_cons_instantiate/ReflectionDemo/src/ReflectionDemo.java
new file mode 100644
index 000000000..100a958bd
--- /dev/null
+++ b/BasicJava/ReflectionDemo_cons_instantiate/ReflectionDemo/src/ReflectionDemo.java
@@ -0,0 +1,46 @@
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+
+/**
+ *
+ * Instantiating Objects using Constructor Object.
+ *
+ */
+public class ReflectionDemo
+{
+ public static void main(String[] args)
+ {
+ try
+ {
+
+ Class classObj = String.class;
+ /*
+ * Parameters:
+ *
+ * parameterTypes - the parameter array
+ *
+ * Returns: the Constructor object of the public
+ * constructor that matches the specified parameterTypes
+ *
+ */
+
+ Constructor constructor = classObj.getConstructor(StringBuffer.class);
+ StringBuffer sb = new StringBuffer("Peter");
+ /*
+ * Returns:a new object created by calling the constructor
+ * this object represents
+ */
+ String str = (String) constructor.newInstance(sb);
+ System.out.println(str);
+ }
+ catch (NoSuchMethodException | SecurityException
+ | InstantiationException | IllegalAccessException
+ | IllegalArgumentException
+ | InvocationTargetException e)
+ {
+ e.printStackTrace();
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/ReflectionDemo_cons_param/Output.txt b/BasicJava/ReflectionDemo_cons_param/Output.txt
new file mode 100644
index 000000000..407276fd8
--- /dev/null
+++ b/BasicJava/ReflectionDemo_cons_param/Output.txt
@@ -0,0 +1,20 @@
+constructor = public java.util.HashSet(int)
+Parameter Count = 1
+Parameter Type = int
+Parameter Name = arg0
+--------------------------------
+constructor = public java.util.HashSet(int,float)
+Parameter Count = 2
+Parameter Type = int
+Parameter Name = arg0
+Parameter Type = float
+Parameter Name = arg1
+--------------------------------
+constructor = public java.util.HashSet(java.util.Collection)
+Parameter Count = 1
+Parameter Type = java.util.Collection extends E>
+Parameter Name = arg0
+--------------------------------
+constructor = public java.util.HashSet()
+Parameter Count = 0
+--------------------------------
diff --git a/BasicJava/ReflectionDemo_cons_param/ReflectionDemo/.classpath b/BasicJava/ReflectionDemo_cons_param/ReflectionDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/ReflectionDemo_cons_param/ReflectionDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/ReflectionDemo_cons_param/ReflectionDemo/.project b/BasicJava/ReflectionDemo_cons_param/ReflectionDemo/.project
new file mode 100644
index 000000000..7e4540c4f
--- /dev/null
+++ b/BasicJava/ReflectionDemo_cons_param/ReflectionDemo/.project
@@ -0,0 +1,17 @@
+
+
+ ReflectionDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/ReflectionDemo_cons_param/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/ReflectionDemo_cons_param/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/ReflectionDemo_cons_param/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/ReflectionDemo_cons_param/ReflectionDemo/bin/ReflectionDemo.class b/BasicJava/ReflectionDemo_cons_param/ReflectionDemo/bin/ReflectionDemo.class
new file mode 100644
index 000000000..9a9531b3f
Binary files /dev/null and b/BasicJava/ReflectionDemo_cons_param/ReflectionDemo/bin/ReflectionDemo.class differ
diff --git a/BasicJava/ReflectionDemo_cons_param/ReflectionDemo/bin/Student.class b/BasicJava/ReflectionDemo_cons_param/ReflectionDemo/bin/Student.class
new file mode 100644
index 000000000..02ee8a2e1
Binary files /dev/null and b/BasicJava/ReflectionDemo_cons_param/ReflectionDemo/bin/Student.class differ
diff --git a/BasicJava/ReflectionDemo_cons_param/ReflectionDemo/src/ReflectionDemo.java b/BasicJava/ReflectionDemo_cons_param/ReflectionDemo/src/ReflectionDemo.java
new file mode 100644
index 000000000..77644606f
--- /dev/null
+++ b/BasicJava/ReflectionDemo_cons_param/ReflectionDemo/src/ReflectionDemo.java
@@ -0,0 +1,43 @@
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Parameter;
+import java.util.HashSet;
+
+/**
+ *
+ * We can read what parameters a given constructor can takes.
+ *
+ */
+public class ReflectionDemo
+{
+ public static void main(String[] args)
+ {
+
+ Class classObj = HashSet.class;
+
+ /*
+ * Returns:the array of Constructor objects representing the public
+ * constructors of this class
+ */
+
+ Constructor[] constructorArray= classObj.getConstructors();
+
+ for (Constructor constructor : constructorArray)
+ {
+ System.out.println("constructor = "+constructor);
+ System.out.println("Parameter Count = "+constructor.getParameterCount());
+ /*
+ * Returns:an array of Parameter objects representing all the
+ * parameters to the executable this object represents.
+ */
+ Parameter[] parameterArray = constructor.getParameters();
+ for (Parameter parameter : parameterArray)
+ {
+ System.out.println("Parameter Type = "+parameter.getParameterizedType());
+ System.out.println("Parameter Name = "+parameter.getName());
+ }
+ System.out.println("--------------------------------");
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/ReflectionDemo_create_access_array/Output.txt b/BasicJava/ReflectionDemo_create_access_array/Output.txt
new file mode 100644
index 000000000..1acbf915c
--- /dev/null
+++ b/BasicJava/ReflectionDemo_create_access_array/Output.txt
@@ -0,0 +1,3 @@
+intArray[0] = 10
+intArray[1] = 20
+intArray[2] = 30
diff --git a/BasicJava/ReflectionDemo_create_access_array/ReflectionDemo/.classpath b/BasicJava/ReflectionDemo_create_access_array/ReflectionDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/ReflectionDemo_create_access_array/ReflectionDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/ReflectionDemo_create_access_array/ReflectionDemo/.project b/BasicJava/ReflectionDemo_create_access_array/ReflectionDemo/.project
new file mode 100644
index 000000000..7e4540c4f
--- /dev/null
+++ b/BasicJava/ReflectionDemo_create_access_array/ReflectionDemo/.project
@@ -0,0 +1,17 @@
+
+
+ ReflectionDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/ReflectionDemo_create_access_array/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/ReflectionDemo_create_access_array/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/ReflectionDemo_create_access_array/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/ReflectionDemo_create_access_array/ReflectionDemo/bin/ReflectionDemo.class b/BasicJava/ReflectionDemo_create_access_array/ReflectionDemo/bin/ReflectionDemo.class
new file mode 100644
index 000000000..7264f0705
Binary files /dev/null and b/BasicJava/ReflectionDemo_create_access_array/ReflectionDemo/bin/ReflectionDemo.class differ
diff --git a/BasicJava/ReflectionDemo_create_access_array/ReflectionDemo/src/ReflectionDemo.java b/BasicJava/ReflectionDemo_create_access_array/ReflectionDemo/src/ReflectionDemo.java
new file mode 100644
index 000000000..f8852b588
--- /dev/null
+++ b/BasicJava/ReflectionDemo_create_access_array/ReflectionDemo/src/ReflectionDemo.java
@@ -0,0 +1,37 @@
+import java.lang.reflect.Array;
+
+/**
+ * Creating Array and Accessing Array.
+ *
+ */
+public class ReflectionDemo
+{
+ public static void main(String[] args)
+ {
+ /*
+ * Creating arrays via Java Reflection is done using the
+ * java.lang.reflect.Array class
+ *
+ * This code sample creates an array of int. The first parameter
+ * int.class given to the Array.newInstance() method tells what type
+ * each element in the array should be of. The second parameter states
+ * how many elements the array should have space for.
+ */
+ int[] intArray = (int[]) Array.newInstance(int.class, 3);
+
+ /*
+ * It is possible to access the elements of an array using Java
+ * Reflection. This is done via the Array.get(...) and Array.set(...)
+ * methods.
+ */
+ Array.set(intArray, 0, 10);
+ Array.set(intArray, 1, 20);
+ Array.set(intArray, 2, 30);
+
+ System.out.println("intArray[0] = " + Array.get(intArray, 0));
+ System.out.println("intArray[1] = " + Array.get(intArray, 1));
+ System.out.println("intArray[2] = " + Array.get(intArray, 2));
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/ReflectionDemo_determine_classObj/Output.txt b/BasicJava/ReflectionDemo_determine_classObj/Output.txt
new file mode 100644
index 000000000..f79f690ce
--- /dev/null
+++ b/BasicJava/ReflectionDemo_determine_classObj/Output.txt
@@ -0,0 +1,3 @@
+Is a Interface = true
+Is a MemberClass = false
+Is a Primitive = false
diff --git a/BasicJava/ReflectionDemo_determine_classObj/ReflectionDemo/.classpath b/BasicJava/ReflectionDemo_determine_classObj/ReflectionDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/ReflectionDemo_determine_classObj/ReflectionDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/ReflectionDemo_determine_classObj/ReflectionDemo/.project b/BasicJava/ReflectionDemo_determine_classObj/ReflectionDemo/.project
new file mode 100644
index 000000000..7e4540c4f
--- /dev/null
+++ b/BasicJava/ReflectionDemo_determine_classObj/ReflectionDemo/.project
@@ -0,0 +1,17 @@
+
+
+ ReflectionDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/ReflectionDemo_determine_classObj/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/ReflectionDemo_determine_classObj/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/ReflectionDemo_determine_classObj/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/ReflectionDemo_determine_classObj/ReflectionDemo/bin/ReflectionDemo.class b/BasicJava/ReflectionDemo_determine_classObj/ReflectionDemo/bin/ReflectionDemo.class
new file mode 100644
index 000000000..5564bc7f7
Binary files /dev/null and b/BasicJava/ReflectionDemo_determine_classObj/ReflectionDemo/bin/ReflectionDemo.class differ
diff --git a/BasicJava/ReflectionDemo_determine_classObj/ReflectionDemo/src/ReflectionDemo.java b/BasicJava/ReflectionDemo_determine_classObj/ReflectionDemo/src/ReflectionDemo.java
new file mode 100644
index 000000000..cd72db85c
--- /dev/null
+++ b/BasicJava/ReflectionDemo_determine_classObj/ReflectionDemo/src/ReflectionDemo.java
@@ -0,0 +1,33 @@
+/**
+ * How to determine the class object.
+ *
+ */
+public class ReflectionDemo
+{
+ public static void main(String[] args)
+ {
+ try
+ {
+ Class> classObj = Class.forName("java.util.List");
+
+ /*
+ * Returns:true if this object represents an interface; false otherwise.
+ */
+ System.out.println("Is a Interface = " + classObj.isInterface());
+ /*
+ * Returns:true if and only if this class is a member class.
+ */
+ System.out.println("Is a MemberClass = " + classObj.isMemberClass());
+ /*
+ * Returns:true if and only if this class represents a primitive type
+ */
+ System.out.println("Is a Primitive = " + classObj.isPrimitive());
+ }
+ catch (ClassNotFoundException e)
+ {
+ e.printStackTrace();
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/ReflectionDemo_display_metadata/Output.txt b/BasicJava/ReflectionDemo_display_metadata/Output.txt
new file mode 100644
index 000000000..371c364fe
--- /dev/null
+++ b/BasicJava/ReflectionDemo_display_metadata/Output.txt
@@ -0,0 +1,65 @@
+Enter the ClassName: java.util.ArrayList
+Fields:
+private static final long java.util.ArrayList.serialVersionUID
+private static final int java.util.ArrayList.DEFAULT_CAPACITY
+private static final java.lang.Object[] java.util.ArrayList.EMPTY_ELEMENTDATA
+private static final java.lang.Object[] java.util.ArrayList.DEFAULTCAPACITY_EMPTY_ELEMENTDATA
+transient java.lang.Object[] java.util.ArrayList.elementData
+private int java.util.ArrayList.size
+private static final int java.util.ArrayList.MAX_ARRAY_SIZE
+---------------------------------------
+
+Constructors:
+public java.util.ArrayList(java.util.Collection)
+public java.util.ArrayList()
+public java.util.ArrayList(int)
+---------------------------------------
+
+Methods:
+public boolean java.util.ArrayList.add(java.lang.Object)
+public void java.util.ArrayList.add(int,java.lang.Object)
+public boolean java.util.ArrayList.remove(java.lang.Object)
+public java.lang.Object java.util.ArrayList.remove(int)
+public java.lang.Object java.util.ArrayList.get(int)
+public java.lang.Object java.util.ArrayList.clone()
+public int java.util.ArrayList.indexOf(java.lang.Object)
+public void java.util.ArrayList.clear()
+public boolean java.util.ArrayList.contains(java.lang.Object)
+public boolean java.util.ArrayList.isEmpty()
+public java.util.Iterator java.util.ArrayList.iterator()
+public int java.util.ArrayList.lastIndexOf(java.lang.Object)
+public void java.util.ArrayList.replaceAll(java.util.function.UnaryOperator)
+public int java.util.ArrayList.size()
+public java.util.List java.util.ArrayList.subList(int,int)
+public java.lang.Object[] java.util.ArrayList.toArray(java.lang.Object[])
+public java.lang.Object[] java.util.ArrayList.toArray()
+public java.util.Spliterator java.util.ArrayList.spliterator()
+static int java.util.ArrayList.access$100(java.util.ArrayList)
+public boolean java.util.ArrayList.addAll(int,java.util.Collection)
+public boolean java.util.ArrayList.addAll(java.util.Collection)
+private void java.util.ArrayList.readObject(java.io.ObjectInputStream)
+ throws java.io.IOException,java.lang.ClassNotFoundException
+private void java.util.ArrayList.writeObject(java.io.ObjectOutputStream)
+ throws java.io.IOException
+public void java.util.ArrayList.forEach(java.util.function.Consumer)
+public java.lang.Object java.util.ArrayList.set(int,java.lang.Object)
+public void java.util.ArrayList.ensureCapacity(int)
+public void java.util.ArrayList.trimToSize()
+private void java.util.ArrayList.ensureCapacityInternal(int)
+private static int java.util.ArrayList.hugeCapacity(int)
+java.lang.Object java.util.ArrayList.elementData(int)
+private void java.util.ArrayList.grow(int)
+public java.util.ListIterator java.util.ArrayList.listIterator()
+public java.util.ListIterator java.util.ArrayList.listIterator(int)
+public boolean java.util.ArrayList.removeAll(java.util.Collection)
+public boolean java.util.ArrayList.removeIf(java.util.function.Predicate)
+protected void java.util.ArrayList.removeRange(int,int)
+public boolean java.util.ArrayList.retainAll(java.util.Collection)
+public void java.util.ArrayList.sort(java.util.Comparator)
+private java.lang.String java.util.ArrayList.outOfBoundsMsg(int)
+private void java.util.ArrayList.rangeCheckForAdd(int)
+private boolean java.util.ArrayList.batchRemove(java.util.Collection,boolean)
+private void java.util.ArrayList.ensureExplicitCapacity(int)
+private void java.util.ArrayList.fastRemove(int)
+private void java.util.ArrayList.rangeCheck(int)
+static void java.util.ArrayList.subListRangeCheck(int,int,int)
diff --git a/BasicJava/ReflectionDemo_display_metadata/ReflectionDemo/.classpath b/BasicJava/ReflectionDemo_display_metadata/ReflectionDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/ReflectionDemo_display_metadata/ReflectionDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/ReflectionDemo_display_metadata/ReflectionDemo/.project b/BasicJava/ReflectionDemo_display_metadata/ReflectionDemo/.project
new file mode 100644
index 000000000..7e4540c4f
--- /dev/null
+++ b/BasicJava/ReflectionDemo_display_metadata/ReflectionDemo/.project
@@ -0,0 +1,17 @@
+
+
+ ReflectionDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/ReflectionDemo_display_metadata/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/ReflectionDemo_display_metadata/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/ReflectionDemo_display_metadata/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/ReflectionDemo_display_metadata/ReflectionDemo/bin/ReflectionDemo.class b/BasicJava/ReflectionDemo_display_metadata/ReflectionDemo/bin/ReflectionDemo.class
new file mode 100644
index 000000000..a4e2df9a0
Binary files /dev/null and b/BasicJava/ReflectionDemo_display_metadata/ReflectionDemo/bin/ReflectionDemo.class differ
diff --git a/BasicJava/ReflectionDemo_display_metadata/ReflectionDemo/bin/Student.class b/BasicJava/ReflectionDemo_display_metadata/ReflectionDemo/bin/Student.class
new file mode 100644
index 000000000..a69f0f358
Binary files /dev/null and b/BasicJava/ReflectionDemo_display_metadata/ReflectionDemo/bin/Student.class differ
diff --git a/BasicJava/ReflectionDemo_display_metadata/ReflectionDemo/src/ReflectionDemo.java b/BasicJava/ReflectionDemo_display_metadata/ReflectionDemo/src/ReflectionDemo.java
new file mode 100644
index 000000000..894761535
--- /dev/null
+++ b/BasicJava/ReflectionDemo_display_metadata/ReflectionDemo/src/ReflectionDemo.java
@@ -0,0 +1,70 @@
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+
+/**
+ * How to display the metadata of a class.
+ *
+ */
+public class ReflectionDemo
+{
+ public static void main(String[] args)
+ {
+
+ try
+ {
+ BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
+ System.out.print("Enter the ClassName: ");
+ String className= br.readLine();
+ br.close();
+
+ Class> classObj = Class.forName(className);
+ System.out.println("Fields: ");
+
+ /*
+ * Returns:the array of Field objects representing all the declared
+ * fields of this class
+ */
+ Field[] fieldArray = classObj.getDeclaredFields();
+ for (Field field : fieldArray)
+ {
+ System.out.println(field);
+ }
+
+ System.out.println("---------------------------------------");
+
+ System.out.println("\nConstructors:");
+ /*
+ * Returns:the array of Constructor objects representing all the
+ * declared constructors of this class
+ */
+ Constructor>[] constructorArray = classObj.getDeclaredConstructors();
+ for (Constructor> constructor : constructorArray)
+ {
+ System.out.println(constructor);
+ }
+ System.out.println("---------------------------------------");
+
+ System.out.println("\nMethods:");
+ /*
+ * Returns:the array of Method objects representing all the declared
+ * methods of this class
+ */
+ Method[] methodArray = classObj.getDeclaredMethods();
+
+ for (Method method : methodArray)
+ {
+ System.out.println(method);
+ }
+ }
+ catch (ClassNotFoundException | IOException e)
+ {
+ e.printStackTrace();
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/ReflectionDemo_display_metadata/ReflectionDemo/src/Student.java b/BasicJava/ReflectionDemo_display_metadata/ReflectionDemo/src/Student.java
new file mode 100644
index 000000000..855e7f3ac
--- /dev/null
+++ b/BasicJava/ReflectionDemo_display_metadata/ReflectionDemo/src/Student.java
@@ -0,0 +1,28 @@
+
+public class Student
+{
+ private String first; // first name
+ private String last; // last name
+ private String email; // email address
+ private int section; // section number
+
+ // construct a new student with given fields
+ public Student(String first, String last, String email, int section)
+ {
+ this.first = first;
+ this.last = last;
+ this.email = email;
+ this.section = section;
+ }
+
+ public void showStudentFullName()
+ {
+ System.out.println(first+last);
+ }
+
+ // return a string representation of the invoking object
+ public String toString()
+ {
+ return section + " " + first + " " + last + " " + email;
+ }
+}
diff --git a/BasicJava/ReflectionDemo_genericfieldType/Output.txt b/BasicJava/ReflectionDemo_genericfieldType/Output.txt
new file mode 100644
index 000000000..1286bb73a
--- /dev/null
+++ b/BasicJava/ReflectionDemo_genericfieldType/Output.txt
@@ -0,0 +1,3 @@
+genericFieldType = java.util.List
+fieldArgClass = class java.lang.String
+fieldArgClass Name = java.lang.String
diff --git a/BasicJava/ReflectionDemo_genericfieldType/ReflectionDemo/.classpath b/BasicJava/ReflectionDemo_genericfieldType/ReflectionDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/ReflectionDemo_genericfieldType/ReflectionDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/ReflectionDemo_genericfieldType/ReflectionDemo/.project b/BasicJava/ReflectionDemo_genericfieldType/ReflectionDemo/.project
new file mode 100644
index 000000000..7e4540c4f
--- /dev/null
+++ b/BasicJava/ReflectionDemo_genericfieldType/ReflectionDemo/.project
@@ -0,0 +1,17 @@
+
+
+ ReflectionDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/ReflectionDemo_genericfieldType/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/ReflectionDemo_genericfieldType/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/ReflectionDemo_genericfieldType/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/ReflectionDemo_genericfieldType/ReflectionDemo/bin/Display.class b/BasicJava/ReflectionDemo_genericfieldType/ReflectionDemo/bin/Display.class
new file mode 100644
index 000000000..8edca5d28
Binary files /dev/null and b/BasicJava/ReflectionDemo_genericfieldType/ReflectionDemo/bin/Display.class differ
diff --git a/BasicJava/ReflectionDemo_genericfieldType/ReflectionDemo/bin/ReflectionDemo.class b/BasicJava/ReflectionDemo_genericfieldType/ReflectionDemo/bin/ReflectionDemo.class
new file mode 100644
index 000000000..73f976c12
Binary files /dev/null and b/BasicJava/ReflectionDemo_genericfieldType/ReflectionDemo/bin/ReflectionDemo.class differ
diff --git a/BasicJava/ReflectionDemo_genericfieldType/ReflectionDemo/src/Display.java b/BasicJava/ReflectionDemo_genericfieldType/ReflectionDemo/src/Display.java
new file mode 100644
index 000000000..0a3933b84
--- /dev/null
+++ b/BasicJava/ReflectionDemo_genericfieldType/ReflectionDemo/src/Display.java
@@ -0,0 +1,7 @@
+import java.util.Arrays;
+import java.util.List;
+
+public class Display
+{
+ public List nameList = Arrays.asList("Peter", "Juli", "Dave");
+}
diff --git a/BasicJava/ReflectionDemo_genericfieldType/ReflectionDemo/src/ReflectionDemo.java b/BasicJava/ReflectionDemo_genericfieldType/ReflectionDemo/src/ReflectionDemo.java
new file mode 100644
index 000000000..f09ad6125
--- /dev/null
+++ b/BasicJava/ReflectionDemo_genericfieldType/ReflectionDemo/src/ReflectionDemo.java
@@ -0,0 +1,41 @@
+import java.lang.reflect.Field;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+
+/**
+ * Generic Field Types:It is possible to access the generic types of public
+ * fields.
+ *
+ */
+public class ReflectionDemo
+{
+ public static void main(String[] args)
+ {
+ try
+ {
+ Class classObj = Display.class;
+ Field field = classObj.getField("nameList");
+ Type genericFieldType = field.getGenericType();
+ System.out.println("genericFieldType = " + genericFieldType);
+
+ if (genericFieldType instanceof ParameterizedType)
+ {
+ ParameterizedType aType = (ParameterizedType) genericFieldType;
+ Type[] fieldArgTypes = aType.getActualTypeArguments();
+ for (Type fieldArgType : fieldArgTypes)
+ {
+ Class fieldArgClass = (Class) fieldArgType;
+ System.out.println("fieldArgClass = " + fieldArgClass);
+ System.out.println( "fieldArgClass Name = " + fieldArgClass.getName());
+ }
+ }
+
+ }
+ catch (NoSuchFieldException | SecurityException e)
+ {
+ e.printStackTrace();
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/ReflectionDemo_genericreturntype_method/Output.txt b/BasicJava/ReflectionDemo_genericreturntype_method/Output.txt
new file mode 100644
index 000000000..37338b6c5
--- /dev/null
+++ b/BasicJava/ReflectionDemo_genericreturntype_method/Output.txt
@@ -0,0 +1,3 @@
+type = java.util.List
+typeArgClass = class java.lang.String
+typeArgClass Name = java.lang.String
diff --git a/BasicJava/ReflectionDemo_genericreturntype_method/ReflectionDemo/.classpath b/BasicJava/ReflectionDemo_genericreturntype_method/ReflectionDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/ReflectionDemo_genericreturntype_method/ReflectionDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/ReflectionDemo_genericreturntype_method/ReflectionDemo/.project b/BasicJava/ReflectionDemo_genericreturntype_method/ReflectionDemo/.project
new file mode 100644
index 000000000..7e4540c4f
--- /dev/null
+++ b/BasicJava/ReflectionDemo_genericreturntype_method/ReflectionDemo/.project
@@ -0,0 +1,17 @@
+
+
+ ReflectionDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/ReflectionDemo_genericreturntype_method/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/ReflectionDemo_genericreturntype_method/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/ReflectionDemo_genericreturntype_method/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/ReflectionDemo_genericreturntype_method/ReflectionDemo/bin/Display.class b/BasicJava/ReflectionDemo_genericreturntype_method/ReflectionDemo/bin/Display.class
new file mode 100644
index 000000000..fb6c712e9
Binary files /dev/null and b/BasicJava/ReflectionDemo_genericreturntype_method/ReflectionDemo/bin/Display.class differ
diff --git a/BasicJava/ReflectionDemo_genericreturntype_method/ReflectionDemo/bin/ReflectionDemo.class b/BasicJava/ReflectionDemo_genericreturntype_method/ReflectionDemo/bin/ReflectionDemo.class
new file mode 100644
index 000000000..955ae1009
Binary files /dev/null and b/BasicJava/ReflectionDemo_genericreturntype_method/ReflectionDemo/bin/ReflectionDemo.class differ
diff --git a/BasicJava/ReflectionDemo_genericreturntype_method/ReflectionDemo/src/Display.java b/BasicJava/ReflectionDemo_genericreturntype_method/ReflectionDemo/src/Display.java
new file mode 100644
index 000000000..24fc7723d
--- /dev/null
+++ b/BasicJava/ReflectionDemo_genericreturntype_method/ReflectionDemo/src/Display.java
@@ -0,0 +1,13 @@
+import java.util.Arrays;
+import java.util.List;
+
+public class Display
+{
+
+ protected List nameList = Arrays.asList("Peter","Juli","Dave");
+
+ public List getNameList()
+ {
+ return this.nameList;
+ }
+}
diff --git a/BasicJava/ReflectionDemo_genericreturntype_method/ReflectionDemo/src/ReflectionDemo.java b/BasicJava/ReflectionDemo_genericreturntype_method/ReflectionDemo/src/ReflectionDemo.java
new file mode 100644
index 000000000..8e163e298
--- /dev/null
+++ b/BasicJava/ReflectionDemo_genericreturntype_method/ReflectionDemo/src/ReflectionDemo.java
@@ -0,0 +1,38 @@
+import java.lang.reflect.Method;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+
+/**
+ * How to get Generic return Type of the method
+ */
+public class ReflectionDemo
+{
+ public static void main(String[] args)
+ {
+ try
+ {
+ Class classObj = Display.class;
+ Method method = classObj.getMethod("getNameList", null);
+ Type type = method.getGenericReturnType();
+ System.out.println("type = "+type);
+
+ if (type instanceof ParameterizedType)
+ {
+ ParameterizedType parameterizedType = (ParameterizedType) type;
+ Type[] typeArguments = parameterizedType.getActualTypeArguments();
+ for (Type typeArgument : typeArguments)
+ {
+ Class typeArgClass = (Class) typeArgument;
+ System.out.println("typeArgClass = " + typeArgClass);
+ System.out.println("typeArgClass Name = " + typeArgClass.getName());
+ }
+ }
+ }
+ catch (NoSuchMethodException | SecurityException e)
+ {
+ e.printStackTrace();
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/ReflectionDemo_genericreturntype_param/Output.txt b/BasicJava/ReflectionDemo_genericreturntype_param/Output.txt
new file mode 100644
index 000000000..05cf7d8da
--- /dev/null
+++ b/BasicJava/ReflectionDemo_genericreturntype_param/Output.txt
@@ -0,0 +1,3 @@
+genericParameterType = java.util.List
+parameterArgClass = class java.lang.String
+parameterArgClass Name = java.lang.String
diff --git a/BasicJava/ReflectionDemo_genericreturntype_param/ReflectionDemo/.classpath b/BasicJava/ReflectionDemo_genericreturntype_param/ReflectionDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/ReflectionDemo_genericreturntype_param/ReflectionDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/ReflectionDemo_genericreturntype_param/ReflectionDemo/.project b/BasicJava/ReflectionDemo_genericreturntype_param/ReflectionDemo/.project
new file mode 100644
index 000000000..7e4540c4f
--- /dev/null
+++ b/BasicJava/ReflectionDemo_genericreturntype_param/ReflectionDemo/.project
@@ -0,0 +1,17 @@
+
+
+ ReflectionDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/ReflectionDemo_genericreturntype_param/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/ReflectionDemo_genericreturntype_param/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/ReflectionDemo_genericreturntype_param/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/ReflectionDemo_genericreturntype_param/ReflectionDemo/bin/Display.class b/BasicJava/ReflectionDemo_genericreturntype_param/ReflectionDemo/bin/Display.class
new file mode 100644
index 000000000..6312946e1
Binary files /dev/null and b/BasicJava/ReflectionDemo_genericreturntype_param/ReflectionDemo/bin/Display.class differ
diff --git a/BasicJava/ReflectionDemo_genericreturntype_param/ReflectionDemo/bin/ReflectionDemo.class b/BasicJava/ReflectionDemo_genericreturntype_param/ReflectionDemo/bin/ReflectionDemo.class
new file mode 100644
index 000000000..6a854d82e
Binary files /dev/null and b/BasicJava/ReflectionDemo_genericreturntype_param/ReflectionDemo/bin/ReflectionDemo.class differ
diff --git a/BasicJava/ReflectionDemo_genericreturntype_param/ReflectionDemo/src/Display.java b/BasicJava/ReflectionDemo_genericreturntype_param/ReflectionDemo/src/Display.java
new file mode 100644
index 000000000..038f23c14
--- /dev/null
+++ b/BasicJava/ReflectionDemo_genericreturntype_param/ReflectionDemo/src/Display.java
@@ -0,0 +1,13 @@
+import java.util.List;
+
+public class Display
+{
+
+ protected List nameList;
+
+ public void setNameList(List nameList)
+ {
+ this.nameList = nameList;
+ }
+
+}
diff --git a/BasicJava/ReflectionDemo_genericreturntype_param/ReflectionDemo/src/ReflectionDemo.java b/BasicJava/ReflectionDemo_genericreturntype_param/ReflectionDemo/src/ReflectionDemo.java
new file mode 100644
index 000000000..4ae06499a
--- /dev/null
+++ b/BasicJava/ReflectionDemo_genericreturntype_param/ReflectionDemo/src/ReflectionDemo.java
@@ -0,0 +1,42 @@
+import java.lang.reflect.Method;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+import java.util.List;
+
+/**
+ * We can access the generic parameter types of the method parameters
+ */
+public class ReflectionDemo
+{
+ public static void main(String[] args)
+ {
+ try
+ {
+ Class classObj = Display.class;
+ Method method = classObj.getMethod("setNameList", List.class);
+ Type[] genericParameterTypes = method.getGenericParameterTypes();
+
+ for (Type genericParameterType : genericParameterTypes)
+ {
+ System.out.println("genericParameterType = "+genericParameterType);
+ if (genericParameterType instanceof ParameterizedType)
+ {
+ ParameterizedType aType = (ParameterizedType) genericParameterType;
+ Type[] parameterArgTypes = aType.getActualTypeArguments();
+ for (Type parameterArgType : parameterArgTypes)
+ {
+ Class parameterArgClass = (Class) parameterArgType;
+ System.out.println("parameterArgClass = " + parameterArgClass);
+ System.out.println("parameterArgClass Name = " + parameterArgClass.getName());
+ }
+ }
+ }
+ }
+ catch (NoSuchMethodException | SecurityException e)
+ {
+ e.printStackTrace();
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/ReflectionDemo_get_objectOfClass/ReflectionDemo/.classpath b/BasicJava/ReflectionDemo_get_objectOfClass/ReflectionDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/ReflectionDemo_get_objectOfClass/ReflectionDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/ReflectionDemo_get_objectOfClass/ReflectionDemo/.project b/BasicJava/ReflectionDemo_get_objectOfClass/ReflectionDemo/.project
new file mode 100644
index 000000000..7e4540c4f
--- /dev/null
+++ b/BasicJava/ReflectionDemo_get_objectOfClass/ReflectionDemo/.project
@@ -0,0 +1,17 @@
+
+
+ ReflectionDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/ReflectionDemo_get_objectOfClass/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/ReflectionDemo_get_objectOfClass/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/ReflectionDemo_get_objectOfClass/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/ReflectionDemo_get_objectOfClass/ReflectionDemo/bin/ReflectionDemo1.class b/BasicJava/ReflectionDemo_get_objectOfClass/ReflectionDemo/bin/ReflectionDemo1.class
new file mode 100644
index 000000000..b0e36faea
Binary files /dev/null and b/BasicJava/ReflectionDemo_get_objectOfClass/ReflectionDemo/bin/ReflectionDemo1.class differ
diff --git a/BasicJava/ReflectionDemo_get_objectOfClass/ReflectionDemo/bin/ReflectionDemo2.class b/BasicJava/ReflectionDemo_get_objectOfClass/ReflectionDemo/bin/ReflectionDemo2.class
new file mode 100644
index 000000000..f05c63a87
Binary files /dev/null and b/BasicJava/ReflectionDemo_get_objectOfClass/ReflectionDemo/bin/ReflectionDemo2.class differ
diff --git a/BasicJava/ReflectionDemo_get_objectOfClass/ReflectionDemo/bin/ReflectionDemo3.class b/BasicJava/ReflectionDemo_get_objectOfClass/ReflectionDemo/bin/ReflectionDemo3.class
new file mode 100644
index 000000000..c2c73b880
Binary files /dev/null and b/BasicJava/ReflectionDemo_get_objectOfClass/ReflectionDemo/bin/ReflectionDemo3.class differ
diff --git a/BasicJava/ReflectionDemo_get_objectOfClass/ReflectionDemo/bin/com/Student.class b/BasicJava/ReflectionDemo_get_objectOfClass/ReflectionDemo/bin/com/Student.class
new file mode 100644
index 000000000..a95672064
Binary files /dev/null and b/BasicJava/ReflectionDemo_get_objectOfClass/ReflectionDemo/bin/com/Student.class differ
diff --git a/BasicJava/ReflectionDemo_get_objectOfClass/ReflectionDemo/src/ReflectionDemo1.java b/BasicJava/ReflectionDemo_get_objectOfClass/ReflectionDemo/src/ReflectionDemo1.java
new file mode 100644
index 000000000..0b9993c98
--- /dev/null
+++ b/BasicJava/ReflectionDemo_get_objectOfClass/ReflectionDemo/src/ReflectionDemo1.java
@@ -0,0 +1,26 @@
+public class ReflectionDemo1
+{
+ public static void main(String[] args)
+ {
+ try
+ {
+ /*
+ * forName() method is used to load the class dynamically
+ *
+ * Returns:the Class object for the class with the
+ * specified name.
+ *
+ * forName() method should be used if you know the fully
+ * qualified name of class.This cannot be used for
+ * primitive types. r
+ */
+ Class> classObj = Class.forName("com.Student");
+ System.out.println(classObj.getName());
+ System.out.println(classObj.getSimpleName());
+ }
+ catch (ClassNotFoundException e)
+ {
+ e.printStackTrace();
+ }
+ }
+}
\ No newline at end of file
diff --git a/BasicJava/ReflectionDemo_get_objectOfClass/ReflectionDemo/src/ReflectionDemo2.java b/BasicJava/ReflectionDemo_get_objectOfClass/ReflectionDemo/src/ReflectionDemo2.java
new file mode 100644
index 000000000..6885e8fe8
--- /dev/null
+++ b/BasicJava/ReflectionDemo_get_objectOfClass/ReflectionDemo/src/ReflectionDemo2.java
@@ -0,0 +1,18 @@
+import com.Student;
+
+public class ReflectionDemo2
+{
+ public static void main(String[] args)
+ {
+ Student student = new Student("Peter", 25);
+
+ /*
+ * Returns:The Class object that represents the runtime class of this
+ * object.
+ */
+ Class extends Student> classObj = student.getClass();
+ System.out.println(classObj.getName());
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/ReflectionDemo_get_objectOfClass/ReflectionDemo/src/ReflectionDemo3.java b/BasicJava/ReflectionDemo_get_objectOfClass/ReflectionDemo/src/ReflectionDemo3.java
new file mode 100644
index 000000000..a918778fb
--- /dev/null
+++ b/BasicJava/ReflectionDemo_get_objectOfClass/ReflectionDemo/src/ReflectionDemo3.java
@@ -0,0 +1,19 @@
+import com.Student;
+
+public class ReflectionDemo3
+{
+ public static void main(String[] args)
+ {
+ /*
+ * If a type is available but there is no instance then it is possible
+ * to obtain a Class by appending ".class" to the name of the type.It
+ * can be used for primitive data type also.
+ */
+ Class studentClassObj = Student.class;
+ System.out.println(studentClassObj.getName());
+
+ Class intClassObj = int.class;
+ System.out.println(intClassObj.getName());
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/ReflectionDemo_get_objectOfClass/ReflectionDemo/src/com/Student.java b/BasicJava/ReflectionDemo_get_objectOfClass/ReflectionDemo/src/com/Student.java
new file mode 100644
index 000000000..d3dbf439b
--- /dev/null
+++ b/BasicJava/ReflectionDemo_get_objectOfClass/ReflectionDemo/src/com/Student.java
@@ -0,0 +1,35 @@
+package com;
+
+public class Student
+{
+ private String name;
+ private int age;
+
+ public Student(String name, int age)
+ {
+ super();
+ this.name = name;
+ this.age = age;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public int getAge()
+ {
+ return age;
+ }
+
+ public void setAge(int age)
+ {
+ this.age = age;
+ }
+
+}
diff --git a/BasicJava/ReflectionDemo_get_objectOfClass/ReflectionDemo1_Output.txt b/BasicJava/ReflectionDemo_get_objectOfClass/ReflectionDemo1_Output.txt
new file mode 100644
index 000000000..f37264377
--- /dev/null
+++ b/BasicJava/ReflectionDemo_get_objectOfClass/ReflectionDemo1_Output.txt
@@ -0,0 +1,2 @@
+com.Student
+Student
diff --git a/BasicJava/ReflectionDemo_get_objectOfClass/ReflectionDemo2_Output.txt b/BasicJava/ReflectionDemo_get_objectOfClass/ReflectionDemo2_Output.txt
new file mode 100644
index 000000000..6723d4420
--- /dev/null
+++ b/BasicJava/ReflectionDemo_get_objectOfClass/ReflectionDemo2_Output.txt
@@ -0,0 +1 @@
+com.Student
diff --git a/BasicJava/ReflectionDemo_get_objectOfClass/ReflectionDemo3_Output.txt b/BasicJava/ReflectionDemo_get_objectOfClass/ReflectionDemo3_Output.txt
new file mode 100644
index 000000000..464e31a12
--- /dev/null
+++ b/BasicJava/ReflectionDemo_get_objectOfClass/ReflectionDemo3_Output.txt
@@ -0,0 +1,2 @@
+com.Student
+int
diff --git a/BasicJava/ReflectionDemo_get_set_field/Output.txt b/BasicJava/ReflectionDemo_get_set_field/Output.txt
new file mode 100644
index 000000000..55c52941d
--- /dev/null
+++ b/BasicJava/ReflectionDemo_get_set_field/Output.txt
@@ -0,0 +1,3 @@
+Field Name = age
+Field Type = int
+age = 23
diff --git a/BasicJava/ReflectionDemo_get_set_field/ReflectionDemo/.classpath b/BasicJava/ReflectionDemo_get_set_field/ReflectionDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/ReflectionDemo_get_set_field/ReflectionDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/ReflectionDemo_get_set_field/ReflectionDemo/.project b/BasicJava/ReflectionDemo_get_set_field/ReflectionDemo/.project
new file mode 100644
index 000000000..7e4540c4f
--- /dev/null
+++ b/BasicJava/ReflectionDemo_get_set_field/ReflectionDemo/.project
@@ -0,0 +1,17 @@
+
+
+ ReflectionDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/ReflectionDemo_get_set_field/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/ReflectionDemo_get_set_field/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/ReflectionDemo_get_set_field/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/ReflectionDemo_get_set_field/ReflectionDemo/bin/ReflectionDemo.class b/BasicJava/ReflectionDemo_get_set_field/ReflectionDemo/bin/ReflectionDemo.class
new file mode 100644
index 000000000..65bcd2370
Binary files /dev/null and b/BasicJava/ReflectionDemo_get_set_field/ReflectionDemo/bin/ReflectionDemo.class differ
diff --git a/BasicJava/ReflectionDemo_get_set_field/ReflectionDemo/bin/Student.class b/BasicJava/ReflectionDemo_get_set_field/ReflectionDemo/bin/Student.class
new file mode 100644
index 000000000..5e8dfb1a5
Binary files /dev/null and b/BasicJava/ReflectionDemo_get_set_field/ReflectionDemo/bin/Student.class differ
diff --git a/BasicJava/ReflectionDemo_get_set_field/ReflectionDemo/src/ReflectionDemo.java b/BasicJava/ReflectionDemo_get_set_field/ReflectionDemo/src/ReflectionDemo.java
new file mode 100644
index 000000000..42b020f80
--- /dev/null
+++ b/BasicJava/ReflectionDemo_get_set_field/ReflectionDemo/src/ReflectionDemo.java
@@ -0,0 +1,39 @@
+import java.lang.reflect.Field;
+
+/**
+ *
+ * Getting and Setting Field Values.
+ *
+ */
+public class ReflectionDemo
+{
+ public static void main(String[] args)
+ {
+ try
+ {
+ Class classObj = Student.class;
+ /*
+ * Returns:the Field object of this class specified by name
+ */
+ Field ageField = classObj.getField("age");
+ System.out.println("Field Name = " + ageField.getName());
+ System.out.println("Field Type = " + ageField.getType());
+
+ Student student = classObj.newInstance();
+ /*
+ * Sets the field represented by this Field object on the specified
+ * object argument to the specified new value.
+ */
+ ageField.set(student, 23);
+ Object ageValue = ageField.get(student);
+ System.out.println("age = "+ageValue);
+ }
+ catch (NoSuchFieldException | SecurityException
+ | IllegalArgumentException | IllegalAccessException
+ | InstantiationException e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/ReflectionDemo_get_set_field/ReflectionDemo/src/Student.java b/BasicJava/ReflectionDemo_get_set_field/ReflectionDemo/src/Student.java
new file mode 100644
index 000000000..f404ac264
--- /dev/null
+++ b/BasicJava/ReflectionDemo_get_set_field/ReflectionDemo/src/Student.java
@@ -0,0 +1,6 @@
+class Student
+{
+ public String name;
+ public int age;
+}
+
diff --git a/BasicJava/ReflectionDemo_getter_setter_find/Output.txt b/BasicJava/ReflectionDemo_getter_setter_find/Output.txt
new file mode 100644
index 000000000..f409355cd
--- /dev/null
+++ b/BasicJava/ReflectionDemo_getter_setter_find/Output.txt
@@ -0,0 +1,5 @@
+getter: public java.lang.String Student.getName()
+setter: public void Student.setName(java.lang.String)
+getter: public int Student.getAge()
+setter: public void Student.setAge(int)
+getter: public final native java.lang.Class java.lang.Object.getClass()
diff --git a/BasicJava/ReflectionDemo_getter_setter_find/ReflectionDemo/.classpath b/BasicJava/ReflectionDemo_getter_setter_find/ReflectionDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/ReflectionDemo_getter_setter_find/ReflectionDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/ReflectionDemo_getter_setter_find/ReflectionDemo/.project b/BasicJava/ReflectionDemo_getter_setter_find/ReflectionDemo/.project
new file mode 100644
index 000000000..7e4540c4f
--- /dev/null
+++ b/BasicJava/ReflectionDemo_getter_setter_find/ReflectionDemo/.project
@@ -0,0 +1,17 @@
+
+
+ ReflectionDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/ReflectionDemo_getter_setter_find/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/ReflectionDemo_getter_setter_find/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/ReflectionDemo_getter_setter_find/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/ReflectionDemo_getter_setter_find/ReflectionDemo/bin/ReflectionDemo.class b/BasicJava/ReflectionDemo_getter_setter_find/ReflectionDemo/bin/ReflectionDemo.class
new file mode 100644
index 000000000..3f408f7bd
Binary files /dev/null and b/BasicJava/ReflectionDemo_getter_setter_find/ReflectionDemo/bin/ReflectionDemo.class differ
diff --git a/BasicJava/ReflectionDemo_getter_setter_find/ReflectionDemo/bin/Student.class b/BasicJava/ReflectionDemo_getter_setter_find/ReflectionDemo/bin/Student.class
new file mode 100644
index 000000000..f7581b8c2
Binary files /dev/null and b/BasicJava/ReflectionDemo_getter_setter_find/ReflectionDemo/bin/Student.class differ
diff --git a/BasicJava/ReflectionDemo_getter_setter_find/ReflectionDemo/src/ReflectionDemo.java b/BasicJava/ReflectionDemo_getter_setter_find/ReflectionDemo/src/ReflectionDemo.java
new file mode 100644
index 000000000..66711b441
--- /dev/null
+++ b/BasicJava/ReflectionDemo_getter_setter_find/ReflectionDemo/src/ReflectionDemo.java
@@ -0,0 +1,61 @@
+import java.lang.reflect.Method;
+
+/**
+ *
+ * Java Reflection - Getters and Setters.
+ *
+ */
+public class ReflectionDemo
+{
+ public static void main(String[] args)
+ {
+ Class classObj = Student.class;
+ Method[] methodArray = classObj.getMethods();
+ for (Method method : methodArray)
+ {
+ if (isGetter(method))
+ System.out.println("getter: " + method);
+ if (isSetter(method))
+ System.out.println("setter: " + method);
+ }
+ }
+
+ /**
+ * Getter: A getter method have its name start with "get", take 0
+ * parameters, and returns a value.
+ */
+ public static boolean isGetter(Method method)
+ {
+ if (!method.getName().startsWith("get"))
+ {
+ return false;
+ }
+ if (method.getParameterTypes().length != 0)
+ {
+ return false;
+ }
+ if (void.class.equals(method.getReturnType()))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Setter: A setter method have its name start with "set", and
+ * takes 1 parameter.
+ */
+ public static boolean isSetter(Method method)
+ {
+ if (!method.getName().startsWith("set"))
+ {
+ return false;
+ }
+ if (method.getParameterTypes().length != 1)
+ {
+ return false;
+ }
+ return true;
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/ReflectionDemo_getter_setter_find/ReflectionDemo/src/Student.java b/BasicJava/ReflectionDemo_getter_setter_find/ReflectionDemo/src/Student.java
new file mode 100644
index 000000000..fc7f76271
--- /dev/null
+++ b/BasicJava/ReflectionDemo_getter_setter_find/ReflectionDemo/src/Student.java
@@ -0,0 +1,30 @@
+class Student
+{
+ private String name;
+ private int age;
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public int getAge()
+ {
+ return age;
+ }
+
+ public void setAge(int age)
+ {
+ this.age = age;
+ }
+
+ public void displayMessage(String message)
+ {
+ System.out.println(message);
+ }
+}
diff --git a/BasicJava/ReflectionDemo_method_paramcount/Output.txt b/BasicJava/ReflectionDemo_method_paramcount/Output.txt
new file mode 100644
index 000000000..66aeac409
--- /dev/null
+++ b/BasicJava/ReflectionDemo_method_paramcount/Output.txt
@@ -0,0 +1,30 @@
+public void DisplayMessage.displayMessage(java.lang.String)
+Parameter Count = 1
+---------------------------
+public final void java.lang.Object.wait() throws java.lang.InterruptedException
+Parameter Count = 0
+---------------------------
+public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException
+Parameter Count = 2
+---------------------------
+public final native void java.lang.Object.wait(long) throws java.lang.InterruptedException
+Parameter Count = 1
+---------------------------
+public boolean java.lang.Object.equals(java.lang.Object)
+Parameter Count = 1
+---------------------------
+public java.lang.String java.lang.Object.toString()
+Parameter Count = 0
+---------------------------
+public native int java.lang.Object.hashCode()
+Parameter Count = 0
+---------------------------
+public final native java.lang.Class java.lang.Object.getClass()
+Parameter Count = 0
+---------------------------
+public final native void java.lang.Object.notify()
+Parameter Count = 0
+---------------------------
+public final native void java.lang.Object.notifyAll()
+Parameter Count = 0
+---------------------------
diff --git a/BasicJava/ReflectionDemo_method_paramcount/ReflectionDemo/.classpath b/BasicJava/ReflectionDemo_method_paramcount/ReflectionDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/ReflectionDemo_method_paramcount/ReflectionDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/ReflectionDemo_method_paramcount/ReflectionDemo/.project b/BasicJava/ReflectionDemo_method_paramcount/ReflectionDemo/.project
new file mode 100644
index 000000000..7e4540c4f
--- /dev/null
+++ b/BasicJava/ReflectionDemo_method_paramcount/ReflectionDemo/.project
@@ -0,0 +1,17 @@
+
+
+ ReflectionDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/ReflectionDemo_method_paramcount/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/ReflectionDemo_method_paramcount/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/ReflectionDemo_method_paramcount/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/ReflectionDemo_method_paramcount/ReflectionDemo/bin/DisplayMessage.class b/BasicJava/ReflectionDemo_method_paramcount/ReflectionDemo/bin/DisplayMessage.class
new file mode 100644
index 000000000..085495cee
Binary files /dev/null and b/BasicJava/ReflectionDemo_method_paramcount/ReflectionDemo/bin/DisplayMessage.class differ
diff --git a/BasicJava/ReflectionDemo_method_paramcount/ReflectionDemo/bin/ReflectionDemo.class b/BasicJava/ReflectionDemo_method_paramcount/ReflectionDemo/bin/ReflectionDemo.class
new file mode 100644
index 000000000..5c10fcbb3
Binary files /dev/null and b/BasicJava/ReflectionDemo_method_paramcount/ReflectionDemo/bin/ReflectionDemo.class differ
diff --git a/BasicJava/ReflectionDemo_method_paramcount/ReflectionDemo/src/DisplayMessage.java b/BasicJava/ReflectionDemo_method_paramcount/ReflectionDemo/src/DisplayMessage.java
new file mode 100644
index 000000000..c90a4a2e3
--- /dev/null
+++ b/BasicJava/ReflectionDemo_method_paramcount/ReflectionDemo/src/DisplayMessage.java
@@ -0,0 +1,9 @@
+class DisplayMessage
+{
+
+ public void displayMessage(String message)
+ {
+ System.out.println(message);
+ }
+}
+
diff --git a/BasicJava/ReflectionDemo_method_paramcount/ReflectionDemo/src/ReflectionDemo.java b/BasicJava/ReflectionDemo_method_paramcount/ReflectionDemo/src/ReflectionDemo.java
new file mode 100644
index 000000000..15e7f6098
--- /dev/null
+++ b/BasicJava/ReflectionDemo_method_paramcount/ReflectionDemo/src/ReflectionDemo.java
@@ -0,0 +1,22 @@
+import java.lang.reflect.Method;
+
+/**
+ *
+ * How to get method parameter count.
+ *
+ */
+public class ReflectionDemo
+{
+ public static void main(String[] args)
+ {
+ Class classObj = DisplayMessage.class;
+ Method[] methodArray = classObj.getMethods();
+ for (Method method : methodArray)
+ {
+ System.out.println(method);
+ System.out.println("Parameter Count = "+method.getParameterCount());
+ System.out.println("---------------------------");
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/ReflectionDemo_newInstance/Output.txt b/BasicJava/ReflectionDemo_newInstance/Output.txt
new file mode 100644
index 000000000..4216f14b6
--- /dev/null
+++ b/BasicJava/ReflectionDemo_newInstance/Output.txt
@@ -0,0 +1 @@
+Hello.......
diff --git a/BasicJava/ReflectionDemo_newInstance/ReflectionDemo/.classpath b/BasicJava/ReflectionDemo_newInstance/ReflectionDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/ReflectionDemo_newInstance/ReflectionDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/ReflectionDemo_newInstance/ReflectionDemo/.project b/BasicJava/ReflectionDemo_newInstance/ReflectionDemo/.project
new file mode 100644
index 000000000..7e4540c4f
--- /dev/null
+++ b/BasicJava/ReflectionDemo_newInstance/ReflectionDemo/.project
@@ -0,0 +1,17 @@
+
+
+ ReflectionDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/ReflectionDemo_newInstance/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/ReflectionDemo_newInstance/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/ReflectionDemo_newInstance/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/ReflectionDemo_newInstance/ReflectionDemo/bin/DisplayMessage.class b/BasicJava/ReflectionDemo_newInstance/ReflectionDemo/bin/DisplayMessage.class
new file mode 100644
index 000000000..e4a48c4da
Binary files /dev/null and b/BasicJava/ReflectionDemo_newInstance/ReflectionDemo/bin/DisplayMessage.class differ
diff --git a/BasicJava/ReflectionDemo_newInstance/ReflectionDemo/bin/ReflectionDemo.class b/BasicJava/ReflectionDemo_newInstance/ReflectionDemo/bin/ReflectionDemo.class
new file mode 100644
index 000000000..4286f3406
Binary files /dev/null and b/BasicJava/ReflectionDemo_newInstance/ReflectionDemo/bin/ReflectionDemo.class differ
diff --git a/BasicJava/ReflectionDemo_newInstance/ReflectionDemo/src/DisplayMessage.java b/BasicJava/ReflectionDemo_newInstance/ReflectionDemo/src/DisplayMessage.java
new file mode 100644
index 000000000..8c1ad9e09
--- /dev/null
+++ b/BasicJava/ReflectionDemo_newInstance/ReflectionDemo/src/DisplayMessage.java
@@ -0,0 +1,8 @@
+
+public class DisplayMessage
+{
+ public void sayHello()
+ {
+ System.out.println("Hello.......");
+ }
+}
diff --git a/BasicJava/ReflectionDemo_newInstance/ReflectionDemo/src/ReflectionDemo.java b/BasicJava/ReflectionDemo_newInstance/ReflectionDemo/src/ReflectionDemo.java
new file mode 100644
index 000000000..6d89ddaca
--- /dev/null
+++ b/BasicJava/ReflectionDemo_newInstance/ReflectionDemo/src/ReflectionDemo.java
@@ -0,0 +1,24 @@
+public class ReflectionDemo
+{
+ public static void main(String[] args)
+ {
+
+ try
+ {
+ Class> classObj = Class.forName("DisplayMessage");
+ /*
+ * Returns:a newly allocated instance of the class represented by
+ * this object.
+ */
+ DisplayMessage displayMessage = (DisplayMessage) classObj.newInstance();
+ displayMessage.sayHello();
+ }
+ catch (InstantiationException | IllegalAccessException
+ | ClassNotFoundException e)
+ {
+ e.printStackTrace();
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/ReflectionDemo_package_info/Output.txt b/BasicJava/ReflectionDemo_package_info/Output.txt
new file mode 100644
index 000000000..bd83d5178
--- /dev/null
+++ b/BasicJava/ReflectionDemo_package_info/Output.txt
@@ -0,0 +1,5 @@
+Package Name = java.util
+ImplementationTitle = Java Runtime Environment
+ImplementationVersion = 1.8.0_144
+SpecificationVendor = Oracle Corporation
+SpecificationTitle = Java Platform API Specification
diff --git a/BasicJava/ReflectionDemo_package_info/ReflectionDemo/.classpath b/BasicJava/ReflectionDemo_package_info/ReflectionDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/ReflectionDemo_package_info/ReflectionDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/ReflectionDemo_package_info/ReflectionDemo/.project b/BasicJava/ReflectionDemo_package_info/ReflectionDemo/.project
new file mode 100644
index 000000000..7e4540c4f
--- /dev/null
+++ b/BasicJava/ReflectionDemo_package_info/ReflectionDemo/.project
@@ -0,0 +1,17 @@
+
+
+ ReflectionDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/ReflectionDemo_package_info/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/ReflectionDemo_package_info/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/ReflectionDemo_package_info/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/ReflectionDemo_package_info/ReflectionDemo/bin/ReflectionDemo.class b/BasicJava/ReflectionDemo_package_info/ReflectionDemo/bin/ReflectionDemo.class
new file mode 100644
index 000000000..1ff6913b5
Binary files /dev/null and b/BasicJava/ReflectionDemo_package_info/ReflectionDemo/bin/ReflectionDemo.class differ
diff --git a/BasicJava/ReflectionDemo_package_info/ReflectionDemo/src/ReflectionDemo.java b/BasicJava/ReflectionDemo_package_info/ReflectionDemo/src/ReflectionDemo.java
new file mode 100644
index 000000000..7ca9c2770
--- /dev/null
+++ b/BasicJava/ReflectionDemo_package_info/ReflectionDemo/src/ReflectionDemo.java
@@ -0,0 +1,37 @@
+import java.util.ArrayList;
+
+public class ReflectionDemo
+{
+ public static void main(String[] args)
+ {
+
+ Class classObj = ArrayList.class;
+ /*
+ * Gets the package for this class. The class loader of this class is
+ * used to find the package.
+ */
+ Package packageObj = classObj.getPackage();
+ /*
+ * Returns:The fully-qualified name of this package
+ */
+ System.out.println("Package Name = " + packageObj.getName());
+ /*
+ * Returns:the title of the implementation, null is returned if it is not known.
+ */
+ System.out.println("ImplementationTitle = "+packageObj.getImplementationTitle());
+ /*
+ * Returns:the version of the implementation, null is returned if it is not known.
+ */
+ System.out.println("ImplementationVersion = "+packageObj.getImplementationVersion());
+ /*
+ * Returns:the specification vendor, null is returned if it is not known.
+ */
+ System.out.println("SpecificationVendor = "+packageObj.getSpecificationVendor());
+
+ /*
+ * Returns:the specification title, null is returned if it is not known.
+ */
+ System.out.println("SpecificationTitle = "+packageObj.getSpecificationTitle());
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/ReflectionDemo_param_private_method/Output.txt b/BasicJava/ReflectionDemo_param_private_method/Output.txt
new file mode 100644
index 000000000..83b33d238
--- /dev/null
+++ b/BasicJava/ReflectionDemo_param_private_method/Output.txt
@@ -0,0 +1 @@
+1000
diff --git a/BasicJava/ReflectionDemo_param_private_method/ReflectionDemo/.classpath b/BasicJava/ReflectionDemo_param_private_method/ReflectionDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/ReflectionDemo_param_private_method/ReflectionDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/ReflectionDemo_param_private_method/ReflectionDemo/.project b/BasicJava/ReflectionDemo_param_private_method/ReflectionDemo/.project
new file mode 100644
index 000000000..7e4540c4f
--- /dev/null
+++ b/BasicJava/ReflectionDemo_param_private_method/ReflectionDemo/.project
@@ -0,0 +1,17 @@
+
+
+ ReflectionDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/ReflectionDemo_param_private_method/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/ReflectionDemo_param_private_method/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/ReflectionDemo_param_private_method/ReflectionDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/ReflectionDemo_param_private_method/ReflectionDemo/bin/Display.class b/BasicJava/ReflectionDemo_param_private_method/ReflectionDemo/bin/Display.class
new file mode 100644
index 000000000..a78ed16cc
Binary files /dev/null and b/BasicJava/ReflectionDemo_param_private_method/ReflectionDemo/bin/Display.class differ
diff --git a/BasicJava/ReflectionDemo_param_private_method/ReflectionDemo/bin/ReflectionDemo.class b/BasicJava/ReflectionDemo_param_private_method/ReflectionDemo/bin/ReflectionDemo.class
new file mode 100644
index 000000000..e52f7bc60
Binary files /dev/null and b/BasicJava/ReflectionDemo_param_private_method/ReflectionDemo/bin/ReflectionDemo.class differ
diff --git a/BasicJava/ReflectionDemo_param_private_method/ReflectionDemo/src/Display.java b/BasicJava/ReflectionDemo_param_private_method/ReflectionDemo/src/Display.java
new file mode 100644
index 000000000..ce3ff5f9d
--- /dev/null
+++ b/BasicJava/ReflectionDemo_param_private_method/ReflectionDemo/src/Display.java
@@ -0,0 +1,8 @@
+
+public class Display
+{
+ private void DisplayNumber(int i)
+ {
+ System.out.println(i);
+ }
+}
diff --git a/BasicJava/ReflectionDemo_param_private_method/ReflectionDemo/src/ReflectionDemo.java b/BasicJava/ReflectionDemo_param_private_method/ReflectionDemo/src/ReflectionDemo.java
new file mode 100644
index 000000000..98fd9feee
--- /dev/null
+++ b/BasicJava/ReflectionDemo_param_private_method/ReflectionDemo/src/ReflectionDemo.java
@@ -0,0 +1,33 @@
+import java.lang.reflect.Method;
+
+/**
+ * How to call parameterized private method from another class?
+ *
+ * We can call the private method from outside the class by changing the runtime
+ * behaviour of the class.
+ *
+ * By the help of "java.lang.Class" class and "java.lang.reflect.Method" class,
+ * we can call private method from any other class.
+ *
+ */
+public class ReflectionDemo
+{
+ public static void main(String[] args)
+ {
+ try
+ {
+ Class classObj = Display.class;
+ Object displayObject = classObj.newInstance();
+
+ Method method = classObj.getDeclaredMethod("DisplayNumber", new Class[] { int.class });
+ method.setAccessible(true);
+ method.invoke(displayObject, 1000);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo-multiple_group_john/Output.txt b/BasicJava/RegexDemo-multiple_group_john/Output.txt
new file mode 100644
index 000000000..54e402501
--- /dev/null
+++ b/BasicJava/RegexDemo-multiple_group_john/Output.txt
@@ -0,0 +1,3 @@
+found: John writes
+found: John Doe
+found: John Wayne
diff --git a/BasicJava/RegexDemo-multiple_group_john/RegexDemo/.classpath b/BasicJava/RegexDemo-multiple_group_john/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo-multiple_group_john/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo-multiple_group_john/RegexDemo/.project b/BasicJava/RegexDemo-multiple_group_john/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo-multiple_group_john/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo-multiple_group_john/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo-multiple_group_john/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo-multiple_group_john/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo-multiple_group_john/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo-multiple_group_john/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..5ff98c5dd
Binary files /dev/null and b/BasicJava/RegexDemo-multiple_group_john/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo-multiple_group_john/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo-multiple_group_john/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..a61d239fc
--- /dev/null
+++ b/BasicJava/RegexDemo-multiple_group_john/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,40 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * Multiple Groups:
+ * A regular expression can have multiple groups.
+ *
+ */
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+ String text = "John writes about this, and John Doe writes about that,"
+ + " and John Wayne writes about everything.";
+
+ /*
+ * This expression matches the text "John" followed by a
+ * space, and then one or more characters.
+ *
+ * This expression contains a few characters with special
+ * meanings in a regular expression. The . means
+ * "any character". The + means "one or more times", and
+ * relates to the . (any character, one or more times). The ?
+ * means "match as small a number of characters as possible".
+ */
+ String regex = "(John) (.+?) ";
+
+ Pattern pattern = Pattern.compile(regex);
+ Matcher matcher = pattern.matcher(text);
+
+ while (matcher.find())
+ {
+ System.out.println("found: " + matcher.group(1) + " "
+ + matcher.group(2));
+ }
+
+ }
+
+}
diff --git a/BasicJava/RegexDemo_24hrs/Output.txt b/BasicJava/RegexDemo_24hrs/Output.txt
new file mode 100644
index 000000000..e9f4ad31c
--- /dev/null
+++ b/BasicJava/RegexDemo_24hrs/Output.txt
@@ -0,0 +1,8 @@
+2:00 is Valid? = true
+23:00 is Valid? = true
+14:50 is Valid? = true
+--------------------------------------
+24:00 is Valid? = false
+13:1 is Valid? = false
+1:9 is Valid? = false
+110:20 is Valid? = false
diff --git a/BasicJava/RegexDemo_24hrs/RegexDemo/.classpath b/BasicJava/RegexDemo_24hrs/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_24hrs/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_24hrs/RegexDemo/.project b/BasicJava/RegexDemo_24hrs/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_24hrs/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_24hrs/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_24hrs/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_24hrs/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_24hrs/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_24hrs/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..ca964d514
Binary files /dev/null and b/BasicJava/RegexDemo_24hrs/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_24hrs/RegexDemo/bin/Time24HoursValidator.class b/BasicJava/RegexDemo_24hrs/RegexDemo/bin/Time24HoursValidator.class
new file mode 100644
index 000000000..40924e048
Binary files /dev/null and b/BasicJava/RegexDemo_24hrs/RegexDemo/bin/Time24HoursValidator.class differ
diff --git a/BasicJava/RegexDemo_24hrs/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_24hrs/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..92656927c
--- /dev/null
+++ b/BasicJava/RegexDemo_24hrs/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,37 @@
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ *
+ * How to validate Time in 24 Hours format with regular expression
+ *
+ */
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+ List validTimeList = Arrays.asList("2:00", "23:00", "14:50");
+
+ Time24HoursValidator time24HoursValidator = new Time24HoursValidator();
+
+ for (String time : validTimeList)
+ {
+ System.out.println(time + " is Valid? = "
+ + time24HoursValidator.validate(time));
+ }
+
+ System.out.println("--------------------------------------");
+
+ List inValidTimeList = Arrays.asList("24:00", "13:1", "1:9", "110:20");
+
+ for (String time : inValidTimeList)
+ {
+ System.out.println(time + " is Valid? = "
+ + time24HoursValidator.validate(time));
+ }
+
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_24hrs/RegexDemo/src/Time24HoursValidator.java b/BasicJava/RegexDemo_24hrs/RegexDemo/src/Time24HoursValidator.java
new file mode 100644
index 000000000..5083a65ca
--- /dev/null
+++ b/BasicJava/RegexDemo_24hrs/RegexDemo/src/Time24HoursValidator.java
@@ -0,0 +1,27 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ *
+ * How to validate Time in 24 Hours format with regular expression
+ *
+ */
+public class Time24HoursValidator
+{
+
+ private Pattern pattern;
+ private Matcher matcher;
+
+ private static final String TIME24HOURS_REGEX = "([01]?[0-9]|2[0-3]):[0-5][0-9]";
+
+ public Time24HoursValidator()
+ {
+ pattern = Pattern.compile(TIME24HOURS_REGEX);
+ }
+
+ public boolean validate(final String time)
+ {
+ matcher = pattern.matcher(time);
+ return matcher.matches();
+ }
+}
diff --git a/BasicJava/RegexDemo_Quantifier_number_of_times/RegexDemo/.classpath b/BasicJava/RegexDemo_Quantifier_number_of_times/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_Quantifier_number_of_times/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_Quantifier_number_of_times/RegexDemo/.project b/BasicJava/RegexDemo_Quantifier_number_of_times/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_Quantifier_number_of_times/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_Quantifier_number_of_times/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_Quantifier_number_of_times/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_Quantifier_number_of_times/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_Quantifier_number_of_times/RegexDemo/bin/RegexDemo1.class b/BasicJava/RegexDemo_Quantifier_number_of_times/RegexDemo/bin/RegexDemo1.class
new file mode 100644
index 000000000..05baafcea
Binary files /dev/null and b/BasicJava/RegexDemo_Quantifier_number_of_times/RegexDemo/bin/RegexDemo1.class differ
diff --git a/BasicJava/RegexDemo_Quantifier_number_of_times/RegexDemo/bin/RegexDemo2.class b/BasicJava/RegexDemo_Quantifier_number_of_times/RegexDemo/bin/RegexDemo2.class
new file mode 100644
index 000000000..69c3a35f2
Binary files /dev/null and b/BasicJava/RegexDemo_Quantifier_number_of_times/RegexDemo/bin/RegexDemo2.class differ
diff --git a/BasicJava/RegexDemo_Quantifier_number_of_times/RegexDemo/bin/RegexDemo3.class b/BasicJava/RegexDemo_Quantifier_number_of_times/RegexDemo/bin/RegexDemo3.class
new file mode 100644
index 000000000..d7ed503f0
Binary files /dev/null and b/BasicJava/RegexDemo_Quantifier_number_of_times/RegexDemo/bin/RegexDemo3.class differ
diff --git a/BasicJava/RegexDemo_Quantifier_number_of_times/RegexDemo/src/RegexDemo1.java b/BasicJava/RegexDemo_Quantifier_number_of_times/RegexDemo/src/RegexDemo1.java
new file mode 100644
index 000000000..7bee5104d
--- /dev/null
+++ b/BasicJava/RegexDemo_Quantifier_number_of_times/RegexDemo/src/RegexDemo1.java
@@ -0,0 +1,28 @@
+import java.util.regex.Pattern;
+
+
+public class RegexDemo1
+{
+ public static void main(String[] args)
+ {
+ System.out.println("X{n} = X occurs n times only");
+ /*
+ * Parameters:
+ *
+ * regex - The expression to be compiled
+ *
+ * input - The character sequence to be matched
+ *
+ * Returns:
+ *
+ * whether or not the regular expression matches on the input
+ *
+ */
+ System.out.println(Pattern.matches("a{3}", "aaa"));//true (a should come 3 times)
+ System.out.println(Pattern.matches("a{3}", "aaaaaa"));//false (a should come 3 times)
+ System.out.println(Pattern.matches("a{3}", "aa"));//false (a should come 3 times)
+ System.out.println(Pattern.matches("a{3}", "a"));//false (a should come 3 times)
+ System.out.println(Pattern.matches("a{3}", "bbb"));//false (a should come 3 times)
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_Quantifier_number_of_times/RegexDemo/src/RegexDemo2.java b/BasicJava/RegexDemo_Quantifier_number_of_times/RegexDemo/src/RegexDemo2.java
new file mode 100644
index 000000000..f997b33ab
--- /dev/null
+++ b/BasicJava/RegexDemo_Quantifier_number_of_times/RegexDemo/src/RegexDemo2.java
@@ -0,0 +1,27 @@
+import java.util.regex.Pattern;
+
+public class RegexDemo2
+{
+ public static void main(String[] args)
+ {
+ System.out.println("X{n,} = X occurs n or more times");
+ /*
+ * Parameters:
+ *
+ * regex - The expression to be compiled
+ *
+ * input - The character sequence to be matched
+ *
+ * Returns:
+ *
+ * whether or not the regular expression matches on the input
+ *
+ */
+ System.out.println(Pattern.matches("a{3,}", "aaa"));//true (a can come 3 times or more)
+ System.out.println(Pattern.matches("a{3,}", "aaaaaa"));//true (a can come 3 times or more)
+ System.out.println(Pattern.matches("a{3,}", "aa"));//false (a can come 3 times or more)
+ System.out.println(Pattern.matches("a{3,}", "a"));//false (a can come 3 times or more)
+ System.out.println(Pattern.matches("a{3,}", "bbb"));//false (a can come 3 times or more)
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_Quantifier_number_of_times/RegexDemo/src/RegexDemo3.java b/BasicJava/RegexDemo_Quantifier_number_of_times/RegexDemo/src/RegexDemo3.java
new file mode 100644
index 000000000..96760d1bf
--- /dev/null
+++ b/BasicJava/RegexDemo_Quantifier_number_of_times/RegexDemo/src/RegexDemo3.java
@@ -0,0 +1,28 @@
+import java.util.regex.Pattern;
+
+public class RegexDemo3
+{
+ public static void main(String[] args)
+ {
+ System.out.println("X{y,z} = X occurs at least y times but less than or equal to z times");
+ /*
+ * Parameters:
+ *
+ * regex - The expression to be compiled
+ *
+ * input - The character sequence to be matched
+ *
+ * Returns:
+ *
+ * whether or not the regular expression matches on the input
+ *
+ */
+ System.out.println(Pattern.matches("a{3,6}", "aaa"));//true (a can come 3 times or <= 6 times)
+ System.out.println(Pattern.matches("a{3,6}", "aaaaaa"));//true (a can come 3 times or <= 6 times)
+ System.out.println(Pattern.matches("a{3,6}", "aaaaaaaaaaa"));//false (a can come 3 times or <= 6 times)
+ System.out.println(Pattern.matches("a{3,6}", "aa"));//false (a can come 3 times or <= 6 times)
+ System.out.println(Pattern.matches("a{3,6}", "a"));//false (a can come 3 times or <= 6 times)
+ System.out.println(Pattern.matches("a{3,6}", "bbb"));//false (a can come 3 times or <= 6 times)
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_Quantifier_number_of_times/RegexDemo1_Output.txt b/BasicJava/RegexDemo_Quantifier_number_of_times/RegexDemo1_Output.txt
new file mode 100644
index 000000000..50ec45429
--- /dev/null
+++ b/BasicJava/RegexDemo_Quantifier_number_of_times/RegexDemo1_Output.txt
@@ -0,0 +1,6 @@
+X{n} = X occurs n times only
+true
+false
+false
+false
+false
diff --git a/BasicJava/RegexDemo_Quantifier_number_of_times/RegexDemo2_Output.txt b/BasicJava/RegexDemo_Quantifier_number_of_times/RegexDemo2_Output.txt
new file mode 100644
index 000000000..c08137e8b
--- /dev/null
+++ b/BasicJava/RegexDemo_Quantifier_number_of_times/RegexDemo2_Output.txt
@@ -0,0 +1,6 @@
+X{n,} = X occurs n or more times
+true
+true
+false
+false
+false
diff --git a/BasicJava/RegexDemo_Quantifier_number_of_times/RegexDemo3_Output.txt b/BasicJava/RegexDemo_Quantifier_number_of_times/RegexDemo3_Output.txt
new file mode 100644
index 000000000..b9daa2e5f
--- /dev/null
+++ b/BasicJava/RegexDemo_Quantifier_number_of_times/RegexDemo3_Output.txt
@@ -0,0 +1,7 @@
+X{y,z} = X occurs at least y times but less than or equal to z times
+true
+true
+false
+false
+false
+false
diff --git a/BasicJava/RegexDemo_Quantifier_x_question/RegexDemo/.classpath b/BasicJava/RegexDemo_Quantifier_x_question/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_Quantifier_x_question/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_Quantifier_x_question/RegexDemo/.project b/BasicJava/RegexDemo_Quantifier_x_question/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_Quantifier_x_question/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_Quantifier_x_question/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_Quantifier_x_question/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_Quantifier_x_question/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_Quantifier_x_question/RegexDemo/bin/RegexDemo1.class b/BasicJava/RegexDemo_Quantifier_x_question/RegexDemo/bin/RegexDemo1.class
new file mode 100644
index 000000000..a9525ea3a
Binary files /dev/null and b/BasicJava/RegexDemo_Quantifier_x_question/RegexDemo/bin/RegexDemo1.class differ
diff --git a/BasicJava/RegexDemo_Quantifier_x_question/RegexDemo/bin/RegexDemo2.class b/BasicJava/RegexDemo_Quantifier_x_question/RegexDemo/bin/RegexDemo2.class
new file mode 100644
index 000000000..fb45ffdad
Binary files /dev/null and b/BasicJava/RegexDemo_Quantifier_x_question/RegexDemo/bin/RegexDemo2.class differ
diff --git a/BasicJava/RegexDemo_Quantifier_x_question/RegexDemo/bin/RegexDemo3.class b/BasicJava/RegexDemo_Quantifier_x_question/RegexDemo/bin/RegexDemo3.class
new file mode 100644
index 000000000..f4ed30290
Binary files /dev/null and b/BasicJava/RegexDemo_Quantifier_x_question/RegexDemo/bin/RegexDemo3.class differ
diff --git a/BasicJava/RegexDemo_Quantifier_x_question/RegexDemo/src/RegexDemo1.java b/BasicJava/RegexDemo_Quantifier_x_question/RegexDemo/src/RegexDemo1.java
new file mode 100644
index 000000000..0683a302a
--- /dev/null
+++ b/BasicJava/RegexDemo_Quantifier_x_question/RegexDemo/src/RegexDemo1.java
@@ -0,0 +1,29 @@
+import java.util.regex.Pattern;
+
+
+public class RegexDemo1
+{
+ public static void main(String[] args)
+ {
+ System.out.println("? quantifier = occurs once or not at all");
+ /*
+ * Parameters:
+ *
+ * regex - The expression to be compiled
+ *
+ * input - The character sequence to be matched
+ *
+ * Returns:
+ *
+ * whether or not the regular expression matches on the input
+ *
+ */
+ System.out.println(Pattern.matches("[ab]?", "a"));//true (a or b comes one time)
+ System.out.println(Pattern.matches("[ab]?", "b"));//true (a or b comes one time)
+ System.out.println(Pattern.matches("[ab]?", ""));//true (occurs once or not at all)
+ System.out.println(Pattern.matches("[ab]?", "ab"));//false (a and b comes one time)
+ System.out.println(Pattern.matches("[ab]?", "aaa"));//false (a comes more than one time)
+ System.out.println(Pattern.matches("[ab]?", "aabbb"));//false (a and b comes more than one time)
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_Quantifier_x_question/RegexDemo/src/RegexDemo2.java b/BasicJava/RegexDemo_Quantifier_x_question/RegexDemo/src/RegexDemo2.java
new file mode 100644
index 000000000..5ac6a9736
--- /dev/null
+++ b/BasicJava/RegexDemo_Quantifier_x_question/RegexDemo/src/RegexDemo2.java
@@ -0,0 +1,27 @@
+import java.util.regex.Pattern;
+
+public class RegexDemo2
+{
+ public static void main(String[] args)
+ {
+ System.out.println("+ quantifier = occurs once or more times");
+
+ /*
+ * Parameters:
+ *
+ * regex - The expression to be compiled
+ *
+ * input - The character sequence to be matched
+ *
+ * Returns:
+ *
+ * whether or not the regular expression matches on the input
+ *
+ */
+ System.out.println(Pattern.matches("[ab]+", "a"));//true (a or b once or more times)
+ System.out.println(Pattern.matches("[ab]+", "aaa"));//true (a comes more than one time)
+ System.out.println(Pattern.matches("[ab]+", "aabb"));//true (a and b comes more than once)
+ System.out.println(Pattern.matches("[ab]+", "aazzb"));//false (z is not matching pattern)
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_Quantifier_x_question/RegexDemo/src/RegexDemo3.java b/BasicJava/RegexDemo_Quantifier_x_question/RegexDemo/src/RegexDemo3.java
new file mode 100644
index 000000000..ac8dec6c4
--- /dev/null
+++ b/BasicJava/RegexDemo_Quantifier_x_question/RegexDemo/src/RegexDemo3.java
@@ -0,0 +1,27 @@
+import java.util.regex.Pattern;
+
+public class RegexDemo3
+{
+ public static void main(String[] args)
+ {
+ System.out.println("* quantifier = occurs zero or more times");
+ /*
+ * Parameters:
+ *
+ * regex - The expression to be compiled
+ *
+ * input - The character sequence to be matched
+ *
+ * Returns:
+ *
+ * whether or not the regular expression matches on the input
+ *
+ */
+ System.out.println(Pattern.matches("[ab]*", ""));//true (a or b may come zero or more times)
+ System.out.println(Pattern.matches("[ab]*", "a"));//true (a or b may come zero or more times)
+ System.out.println(Pattern.matches("[ab]*", "aaa"));//true (a or b may come zero or more times)
+ System.out.println(Pattern.matches("[ab]*", "aaabbb"));//true (a or b may come zero or more times)
+ System.out.println(Pattern.matches("[ab]*", "aaabbbx"));//true (x is not matching pattern)
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_Quantifier_x_question/RegexDemo1_Output.txt b/BasicJava/RegexDemo_Quantifier_x_question/RegexDemo1_Output.txt
new file mode 100644
index 000000000..fdfb1ee8f
--- /dev/null
+++ b/BasicJava/RegexDemo_Quantifier_x_question/RegexDemo1_Output.txt
@@ -0,0 +1,7 @@
+? quantifier = occurs once or not at all
+true
+true
+true
+false
+false
+false
diff --git a/BasicJava/RegexDemo_Quantifier_x_question/RegexDemo2_Output.txt b/BasicJava/RegexDemo_Quantifier_x_question/RegexDemo2_Output.txt
new file mode 100644
index 000000000..d90935827
--- /dev/null
+++ b/BasicJava/RegexDemo_Quantifier_x_question/RegexDemo2_Output.txt
@@ -0,0 +1,5 @@
++ quantifier = occurs once or more times
+true
+true
+true
+false
diff --git a/BasicJava/RegexDemo_Quantifier_x_question/RegexDemo3_Output.txt b/BasicJava/RegexDemo_Quantifier_x_question/RegexDemo3_Output.txt
new file mode 100644
index 000000000..4e3a17647
--- /dev/null
+++ b/BasicJava/RegexDemo_Quantifier_x_question/RegexDemo3_Output.txt
@@ -0,0 +1,6 @@
+* quantifier = occurs zero or more times
+true
+true
+true
+true
+false
diff --git a/BasicJava/RegexDemo_SSN/Output.txt b/BasicJava/RegexDemo_SSN/Output.txt
new file mode 100644
index 000000000..7ee5a4b42
--- /dev/null
+++ b/BasicJava/RegexDemo_SSN/Output.txt
@@ -0,0 +1,3 @@
+Found good SSN: 123-45-6789
+Found good SSN: 987-65-4321
+Found good SSN: 192-83-7465
diff --git a/BasicJava/RegexDemo_SSN/RegexDemo/.classpath b/BasicJava/RegexDemo_SSN/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_SSN/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_SSN/RegexDemo/.project b/BasicJava/RegexDemo_SSN/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_SSN/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_SSN/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_SSN/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_SSN/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_SSN/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_SSN/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..9ed1d53fd
Binary files /dev/null and b/BasicJava/RegexDemo_SSN/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_SSN/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_SSN/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..3283953cc
--- /dev/null
+++ b/BasicJava/RegexDemo_SSN/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,37 @@
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ *
+ * A Social Security Number (SSN) consists of nine digits, commonly written as
+ * three fields separated by hyphens: AAA-GG-SSSS.
+ *
+ * The first three-digit field is called the "area number".
+ * The central, two-digit field is called the group number".
+ * The final, four-digit field is called the "serial number"
+ *
+ */
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+ List ssnList = new ArrayList();
+ ssnList.add("123-45-6789");
+ ssnList.add("9876-5-4321");
+ ssnList.add("987-65-4321 (G)");
+ ssnList.add("987-65-4321");
+ ssnList.add("192-83-7465");
+
+ String ssnRegex = "^(\\d{3}-\\d{2}-\\d{4})";
+
+ for (String ssn : ssnList)
+ {
+ if (ssn.matches(ssnRegex))
+ {
+ System.out.println("Found good SSN: " + ssn);
+ }
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_StringMatcher_threeLetters/Output.txt b/BasicJava/RegexDemo_StringMatcher_threeLetters/Output.txt
new file mode 100644
index 000000000..327f46e5c
--- /dev/null
+++ b/BasicJava/RegexDemo_StringMatcher_threeLetters/Output.txt
@@ -0,0 +1,5 @@
+true
+false
+-----------------------------
+true
+false
diff --git a/BasicJava/RegexDemo_StringMatcher_threeLetters/RegexDemo/.classpath b/BasicJava/RegexDemo_StringMatcher_threeLetters/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_StringMatcher_threeLetters/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_StringMatcher_threeLetters/RegexDemo/.project b/BasicJava/RegexDemo_StringMatcher_threeLetters/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_StringMatcher_threeLetters/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_StringMatcher_threeLetters/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_StringMatcher_threeLetters/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_StringMatcher_threeLetters/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_StringMatcher_threeLetters/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_StringMatcher_threeLetters/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..a8c65b7fb
Binary files /dev/null and b/BasicJava/RegexDemo_StringMatcher_threeLetters/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_StringMatcher_threeLetters/RegexDemo/bin/StringMatcher.class b/BasicJava/RegexDemo_StringMatcher_threeLetters/RegexDemo/bin/StringMatcher.class
new file mode 100644
index 000000000..8adc2ae6e
Binary files /dev/null and b/BasicJava/RegexDemo_StringMatcher_threeLetters/RegexDemo/bin/StringMatcher.class differ
diff --git a/BasicJava/RegexDemo_StringMatcher_threeLetters/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_StringMatcher_threeLetters/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..7e52a29c9
--- /dev/null
+++ b/BasicJava/RegexDemo_StringMatcher_threeLetters/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,17 @@
+public class RegexDemo
+{
+ public static void main(String[] args)
+ {
+ StringMatcher stringMatcher = new StringMatcher();
+
+ System.out.println(stringMatcher.isThreeLetters("cat")); // true
+ System.out.println(stringMatcher.isThreeLetters("tiger")); // false
+
+ System.out.println("-----------------------------");
+
+ System.out.println(stringMatcher.isNoNumberAtBeginning("Hello")); // true
+ System.out.println(stringMatcher.isNoNumberAtBeginning("9Hello")); // false
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_StringMatcher_threeLetters/RegexDemo/src/StringMatcher.java b/BasicJava/RegexDemo_StringMatcher_threeLetters/RegexDemo/src/StringMatcher.java
new file mode 100644
index 000000000..a41d836d0
--- /dev/null
+++ b/BasicJava/RegexDemo_StringMatcher_threeLetters/RegexDemo/src/StringMatcher.java
@@ -0,0 +1,20 @@
+
+public class StringMatcher
+{
+ /*
+ * returns true if the string contains of three letters
+ */
+ public boolean isThreeLetters(String s)
+ {
+ return s.matches("[a-zA-Z]{3}");
+ }
+
+ /*
+ * returns true if the string does not have a number at the beginning
+ */
+ public boolean isNoNumberAtBeginning(String s)
+ {
+ return s.matches("^[^\\d].*");
+ }
+
+}
diff --git a/BasicJava/RegexDemo_alphanumeric_length_4/Output.txt b/BasicJava/RegexDemo_alphanumeric_length_4/Output.txt
new file mode 100644
index 000000000..5f8cc1d19
--- /dev/null
+++ b/BasicJava/RegexDemo_alphanumeric_length_4/Output.txt
@@ -0,0 +1,4 @@
+true
+true
+false
+false
diff --git a/BasicJava/RegexDemo_alphanumeric_length_4/RegexDemo/.classpath b/BasicJava/RegexDemo_alphanumeric_length_4/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_alphanumeric_length_4/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_alphanumeric_length_4/RegexDemo/.project b/BasicJava/RegexDemo_alphanumeric_length_4/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_alphanumeric_length_4/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_alphanumeric_length_4/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_alphanumeric_length_4/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_alphanumeric_length_4/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_alphanumeric_length_4/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_alphanumeric_length_4/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..52474e17b
Binary files /dev/null and b/BasicJava/RegexDemo_alphanumeric_length_4/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_alphanumeric_length_4/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_alphanumeric_length_4/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..ece734083
--- /dev/null
+++ b/BasicJava/RegexDemo_alphanumeric_length_4/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,32 @@
+import java.util.regex.Pattern;
+
+/**
+ *
+ * Create a regular expression that accepts alpha numeric characters only. Its
+ * length must be 4 characters long only.
+ *
+ */
+
+public class RegexDemo
+{
+ public static void main(String[] args)
+ {
+ /*
+ * Parameters:
+ *
+ * regex - The expression to be compiled
+ *
+ * input - The character sequence to be matched
+ *
+ * Returns:
+ *
+ * whether or not the regular expression matches on the input
+ *
+ */
+ System.out.println(Pattern.matches("[a-zA-Z0-9]{4}", "Juli"));//true
+ System.out.println(Pattern.matches("[a-zA-Z0-9]{4}", "Ju22"));//true
+ System.out.println(Pattern.matches("[a-zA-Z0-9]{4}", "Peter"));//false (more than 4 char)
+ System.out.println(Pattern.matches("[a-zA-Z0-9]{4}", "J$22"));//false ($ is not matched)
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_append/Output.txt b/BasicJava/RegexDemo_append/Output.txt
new file mode 100644
index 000000000..ab4f2e134
--- /dev/null
+++ b/BasicJava/RegexDemo_append/Output.txt
@@ -0,0 +1 @@
+-foo-foo-foo-
diff --git a/BasicJava/RegexDemo_append/RegexDemo/.classpath b/BasicJava/RegexDemo_append/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_append/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_append/RegexDemo/.project b/BasicJava/RegexDemo_append/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_append/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_append/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_append/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_append/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_append/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_append/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..9708df931
Binary files /dev/null and b/BasicJava/RegexDemo_append/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_append/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_append/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..f7e71b096
--- /dev/null
+++ b/BasicJava/RegexDemo_append/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,39 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ *
+ * The Matcher class provides appendReplacement and appendTail methods for text
+ * replacement.
+ *
+ */
+public class RegexDemo
+{
+ private static String REGEX = "aa";
+ private static String INPUT = "aafooaafooaafooaa";
+ private static String REPLACE = "-";
+
+ public static void main(String[] args)
+ {
+ Pattern pattern = Pattern.compile(REGEX);
+ Matcher matcher = pattern.matcher(INPUT);
+
+ StringBuffer sb = new StringBuffer();
+ while (matcher.find())
+ {
+ /*
+ * Parameters:
+ *
+ * sb - The target string buffer
+ * replacement - The replacement string
+ *
+ * Returns: This matcher
+ *
+ */
+ matcher.appendReplacement(sb, REPLACE);
+ }
+ matcher.appendTail(sb);
+ System.out.println(sb.toString());
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_asPredicate/RegexDemo/.classpath b/BasicJava/RegexDemo_asPredicate/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_asPredicate/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_asPredicate/RegexDemo/.project b/BasicJava/RegexDemo_asPredicate/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_asPredicate/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_asPredicate/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_asPredicate/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_asPredicate/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_asPredicate/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_asPredicate/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..51f9d9fa1
Binary files /dev/null and b/BasicJava/RegexDemo_asPredicate/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_asPredicate/RegexDemo/bin/RegexPredicateDemo.class b/BasicJava/RegexDemo_asPredicate/RegexDemo/bin/RegexPredicateDemo.class
new file mode 100644
index 000000000..2781f8787
Binary files /dev/null and b/BasicJava/RegexDemo_asPredicate/RegexDemo/bin/RegexPredicateDemo.class differ
diff --git a/BasicJava/RegexDemo_asPredicate/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_asPredicate/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..469f64f62
--- /dev/null
+++ b/BasicJava/RegexDemo_asPredicate/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,30 @@
+import java.util.Arrays;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+
+ String regex = "^(.+)@gmail.com$";
+ Pattern pattern = Pattern.compile(regex);
+
+ List emailList = Arrays.asList("peter@yahoo.com",
+ "bob@gmail.com", "juli@gmail.com",
+ "david@rediff.com");
+
+ for (String email : emailList)
+ {
+ Matcher matcher = pattern.matcher(email);
+
+ if (matcher.matches())
+ {
+ System.out.println(email);
+ }
+ }
+ }
+
+}
diff --git a/BasicJava/RegexDemo_asPredicate/RegexDemo/src/RegexPredicateDemo.java b/BasicJava/RegexDemo_asPredicate/RegexDemo/src/RegexPredicateDemo.java
new file mode 100644
index 000000000..c6e3f30fe
--- /dev/null
+++ b/BasicJava/RegexDemo_asPredicate/RegexDemo/src/RegexPredicateDemo.java
@@ -0,0 +1,35 @@
+import java.util.Arrays;
+import java.util.List;
+import java.util.function.Predicate;
+import java.util.regex.Pattern;
+import java.util.stream.Collectors;
+
+public class RegexPredicateDemo
+{
+
+ public static void main(String[] args)
+ {
+ String regex = "^(.+)@gmail.com$";
+ Pattern pattern = Pattern.compile(regex);
+
+ /*
+ * Returns:The predicate which can be used for matching on a
+ * string
+ */
+ Predicate emailFilterPredicate = pattern.asPredicate();
+
+ List emailList = Arrays.asList("peter@yahoo.com",
+ "bob@gmail.com", "juli@gmail.com",
+ "david@rediff.com");
+
+ /*
+ * Apply predicate filter
+ */
+ List desiredEmailList = emailList.stream()
+ .filter(emailFilterPredicate)
+ .collect(Collectors.toList());
+
+ desiredEmailList.forEach(System.out::println);
+ }
+
+}
diff --git a/BasicJava/RegexDemo_asPredicate/RegexDemo_Output.txt b/BasicJava/RegexDemo_asPredicate/RegexDemo_Output.txt
new file mode 100644
index 000000000..b137a2680
--- /dev/null
+++ b/BasicJava/RegexDemo_asPredicate/RegexDemo_Output.txt
@@ -0,0 +1,2 @@
+bob@gmail.com
+juli@gmail.com
diff --git a/BasicJava/RegexDemo_asPredicate/RegexPredicateDemo_Output.txt b/BasicJava/RegexDemo_asPredicate/RegexPredicateDemo_Output.txt
new file mode 100644
index 000000000..b137a2680
--- /dev/null
+++ b/BasicJava/RegexDemo_asPredicate/RegexPredicateDemo_Output.txt
@@ -0,0 +1,2 @@
+bob@gmail.com
+juli@gmail.com
diff --git a/BasicJava/RegexDemo_backslash/Output.txt b/BasicJava/RegexDemo_backslash/Output.txt
new file mode 100644
index 000000000..27ba77dda
--- /dev/null
+++ b/BasicJava/RegexDemo_backslash/Output.txt
@@ -0,0 +1 @@
+true
diff --git a/BasicJava/RegexDemo_backslash/RegexDemo/.classpath b/BasicJava/RegexDemo_backslash/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_backslash/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_backslash/RegexDemo/.project b/BasicJava/RegexDemo_backslash/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_backslash/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_backslash/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_backslash/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_backslash/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_backslash/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_backslash/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..275d8705b
Binary files /dev/null and b/BasicJava/RegexDemo_backslash/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_backslash/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_backslash/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..d0715eec9
--- /dev/null
+++ b/BasicJava/RegexDemo_backslash/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,14 @@
+import java.util.regex.Pattern;
+
+public class RegexDemo
+{
+ public static void main(String[] args)
+ {
+ /*
+ * If you want to define \d, then you must be using \\d in
+ * your regex.
+ */
+ System.out.println(Pattern.matches("\\d*", "245")); // true
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_boundary_dog/Output.txt b/BasicJava/RegexDemo_boundary_dog/Output.txt
new file mode 100644
index 000000000..4d8169ab3
--- /dev/null
+++ b/BasicJava/RegexDemo_boundary_dog/Output.txt
@@ -0,0 +1,2 @@
+Number of Matches = 1
+Number of Matches = 0
diff --git a/BasicJava/RegexDemo_boundary_dog/RegexDemo/.classpath b/BasicJava/RegexDemo_boundary_dog/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_boundary_dog/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_boundary_dog/RegexDemo/.project b/BasicJava/RegexDemo_boundary_dog/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_boundary_dog/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_boundary_dog/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_boundary_dog/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_boundary_dog/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_boundary_dog/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_boundary_dog/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..7714b8c77
Binary files /dev/null and b/BasicJava/RegexDemo_boundary_dog/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_boundary_dog/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_boundary_dog/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..87d7bf444
--- /dev/null
+++ b/BasicJava/RegexDemo_boundary_dog/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,41 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ *
+ * Boundary Matchers
+ *
+ */
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+
+ /*
+ * To match only when the required regex is true at the
+ * beginning of the text, we use the caret ^.
+ */
+ calculateMatches("^dog", "dogs are friendly");
+ calculateMatches("^dog", "are dogs are friendly?");
+ }
+
+ private static void calculateMatches(String regex, String inputText)
+ {
+ Pattern pattern = Pattern.compile(regex);
+ Matcher matcher = pattern.matcher(inputText);
+ int matches = 0;
+
+ /*
+ * The find method keeps advancing through the input text and
+ * returns true for every match, so we can use it to find the
+ * match count as well:
+ */
+ while (matcher.find())
+ {
+ ++matches;
+ }
+ System.out.println("Number of Matches = " + matches);
+ }
+
+}
diff --git a/BasicJava/RegexDemo_boundary_dog_end/Output.txt b/BasicJava/RegexDemo_boundary_dog_end/Output.txt
new file mode 100644
index 000000000..4d8169ab3
--- /dev/null
+++ b/BasicJava/RegexDemo_boundary_dog_end/Output.txt
@@ -0,0 +1,2 @@
+Number of Matches = 1
+Number of Matches = 0
diff --git a/BasicJava/RegexDemo_boundary_dog_end/RegexDemo/.classpath b/BasicJava/RegexDemo_boundary_dog_end/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_boundary_dog_end/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_boundary_dog_end/RegexDemo/.project b/BasicJava/RegexDemo_boundary_dog_end/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_boundary_dog_end/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_boundary_dog_end/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_boundary_dog_end/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_boundary_dog_end/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_boundary_dog_end/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_boundary_dog_end/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..e86cb654d
Binary files /dev/null and b/BasicJava/RegexDemo_boundary_dog_end/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_boundary_dog_end/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_boundary_dog_end/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..f02569bb4
--- /dev/null
+++ b/BasicJava/RegexDemo_boundary_dog_end/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,41 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ *
+ * Boundary Matchers
+ *
+ */
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+
+ /*
+ * To match only when the required regex is true at the end of
+ * the text, we use the dollar character $.
+ */
+ calculateMatches("dog$", "Man's best friend is a dog");
+ calculateMatches("dog$", "is a dog man's best friend?");
+ }
+
+ private static void calculateMatches(String regex, String inputText)
+ {
+ Pattern pattern = Pattern.compile(regex);
+ Matcher matcher = pattern.matcher(inputText);
+ int matches = 0;
+
+ /*
+ * The find method keeps advancing through the input text and
+ * returns true for every match, so we can use it to find the
+ * match count as well:
+ */
+ while (matcher.find())
+ {
+ ++matches;
+ }
+ System.out.println("Number of Matches = " + matches);
+ }
+
+}
diff --git a/BasicJava/RegexDemo_boundary_middle/Output.txt b/BasicJava/RegexDemo_boundary_middle/Output.txt
new file mode 100644
index 000000000..b18cc5e44
--- /dev/null
+++ b/BasicJava/RegexDemo_boundary_middle/Output.txt
@@ -0,0 +1,4 @@
+Number of Matches = 1
+Number of Matches = 2
+Number of Matches = 0
+Number of Matches = 1
diff --git a/BasicJava/RegexDemo_boundary_middle/RegexDemo/.classpath b/BasicJava/RegexDemo_boundary_middle/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_boundary_middle/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_boundary_middle/RegexDemo/.project b/BasicJava/RegexDemo_boundary_middle/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_boundary_middle/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_boundary_middle/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_boundary_middle/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_boundary_middle/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_boundary_middle/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_boundary_middle/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..e7a8178a5
Binary files /dev/null and b/BasicJava/RegexDemo_boundary_middle/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_boundary_middle/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_boundary_middle/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..790ac51a2
--- /dev/null
+++ b/BasicJava/RegexDemo_boundary_middle/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,50 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ *
+ * Boundary Matchers
+ *
+ */
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+
+ /*
+ * If we want a match only when the required text is found at
+ * a word boundary, we use \\b regex at the beginning and end
+ * of the regex:
+ */
+ calculateMatches("\\bdog\\b", "a dog is friendly");
+ calculateMatches("\\bdog\\b", "dog is man's best friend,dog is good");
+ calculateMatches("\\bdog\\b", "snoop dogg is a rapper");
+
+ /*
+ * Two-word characters appearing in a row does not mark a word
+ * boundary, but we can make it pass by changing the end of
+ * the regex to look for a non-word boundary:
+ */
+ calculateMatches("\\bdog\\B", "snoop dogg is a rapper");
+ }
+
+ private static void calculateMatches(String regex, String inputText)
+ {
+ Pattern pattern = Pattern.compile(regex);
+ Matcher matcher = pattern.matcher(inputText);
+ int matches = 0;
+
+ /*
+ * The find method keeps advancing through the input text and
+ * returns true for every match, so we can use it to find the
+ * match count as well:
+ */
+ while (matcher.find())
+ {
+ ++matches;
+ }
+ System.out.println("Number of Matches = " + matches);
+ }
+
+}
diff --git a/BasicJava/RegexDemo_boundary_nondigit/Output.txt b/BasicJava/RegexDemo_boundary_nondigit/Output.txt
new file mode 100644
index 000000000..7fd883523
--- /dev/null
+++ b/BasicJava/RegexDemo_boundary_nondigit/Output.txt
@@ -0,0 +1,6 @@
+true
+false
+----------------------------------
+false
+true
+false
diff --git a/BasicJava/RegexDemo_boundary_nondigit/RegexDemo/.classpath b/BasicJava/RegexDemo_boundary_nondigit/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_boundary_nondigit/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_boundary_nondigit/RegexDemo/.project b/BasicJava/RegexDemo_boundary_nondigit/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_boundary_nondigit/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_boundary_nondigit/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_boundary_nondigit/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_boundary_nondigit/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_boundary_nondigit/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_boundary_nondigit/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..28e02d585
Binary files /dev/null and b/BasicJava/RegexDemo_boundary_nondigit/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_boundary_nondigit/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_boundary_nondigit/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..ff6d194a7
--- /dev/null
+++ b/BasicJava/RegexDemo_boundary_nondigit/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,26 @@
+import java.util.regex.Pattern;
+
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+ /*
+ * returns true if the string contains 0 or more non-digits
+ */
+ System.out.println(Pattern.matches("\\D*", "abcde")); // True
+ System.out.println(Pattern.matches("\\D*", "abcde123")); // False
+
+ System.out.println("----------------------------------");
+
+ /*
+ * Boundary Matchers example ^ denotes start of the line $ denotes end
+ * of the line
+ */
+ System.out.println(Pattern.matches("^This$", "This is Chaitanya")); // False
+ System.out.println(Pattern.matches("^This$", "This")); // True
+ System.out.println(Pattern.matches("^This$", "Is This Chaitanya")); // False
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_calculate_matches/Output.txt b/BasicJava/RegexDemo_calculate_matches/Output.txt
new file mode 100644
index 000000000..1ed6fc900
--- /dev/null
+++ b/BasicJava/RegexDemo_calculate_matches/Output.txt
@@ -0,0 +1 @@
+Number of Matches = 2
diff --git a/BasicJava/RegexDemo_calculate_matches/RegexDemo/.classpath b/BasicJava/RegexDemo_calculate_matches/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_calculate_matches/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_calculate_matches/RegexDemo/.project b/BasicJava/RegexDemo_calculate_matches/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_calculate_matches/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_calculate_matches/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_calculate_matches/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_calculate_matches/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_calculate_matches/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_calculate_matches/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..6eda914ad
Binary files /dev/null and b/BasicJava/RegexDemo_calculate_matches/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_calculate_matches/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_calculate_matches/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..7e83307cd
--- /dev/null
+++ b/BasicJava/RegexDemo_calculate_matches/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,30 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+ calculateMatches("foo", "foo come foo");
+ }
+
+ private static void calculateMatches(String regex, String inputText)
+ {
+ Pattern pattern = Pattern.compile(regex);
+ Matcher matcher = pattern.matcher(inputText);
+ int matches = 0;
+
+ /*
+ * The find method keeps advancing through the input text and
+ * returns true for every match, so we can use it to find the
+ * match count as well:
+ */
+ while (matcher.find())
+ {
+ ++matches;
+ }
+ System.out.println("Number of Matches = "+matches);
+ }
+
+}
diff --git a/BasicJava/RegexDemo_capture_group/Output.txt b/BasicJava/RegexDemo_capture_group/Output.txt
new file mode 100644
index 000000000..44736a2e2
--- /dev/null
+++ b/BasicJava/RegexDemo_capture_group/Output.txt
@@ -0,0 +1,3 @@
+Regex = (\d\d) , InputText = 12 is matching? = true
+Regex = (\d\d) , InputText = 123 is matching? = false
+Regex = (\d\d) , InputText = a2 is matching? = false
diff --git a/BasicJava/RegexDemo_capture_group/RegexDemo/.classpath b/BasicJava/RegexDemo_capture_group/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_capture_group/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_capture_group/RegexDemo/.project b/BasicJava/RegexDemo_capture_group/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_capture_group/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_capture_group/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_capture_group/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_capture_group/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_capture_group/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_capture_group/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..f9df64f6f
Binary files /dev/null and b/BasicJava/RegexDemo_capture_group/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_capture_group/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_capture_group/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..ed9b98cf0
--- /dev/null
+++ b/BasicJava/RegexDemo_capture_group/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,34 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ *
+ * Capturing Groups
+ *
+ */
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+
+ /*
+ * The API also allows us to treat multiple digits as a
+ * single unit through capturing groups.
+ */
+ isMatch("(\\d\\d)", "12");
+ isMatch("(\\d\\d)", "123");
+ isMatch("(\\d\\d)", "a2");
+
+ }
+
+ private static void isMatch(String regex, String inputText)
+ {
+ Pattern pattern = Pattern.compile(regex);
+ Matcher matcher = pattern.matcher(inputText);
+
+ System.out.println("Regex = " + regex + " , " + "InputText = "
+ + inputText + " is matching? = " + matcher.matches());
+ }
+
+}
diff --git a/BasicJava/RegexDemo_capture_group_backref/Output.txt b/BasicJava/RegexDemo_capture_group_backref/Output.txt
new file mode 100644
index 000000000..c7bdddff6
--- /dev/null
+++ b/BasicJava/RegexDemo_capture_group_backref/Output.txt
@@ -0,0 +1,4 @@
+Regex = (\d\d)\1 , InputText = 3434 is matching? = true
+Regex = (\d\d)\1 , InputText = 3499 is matching? = false
+Regex = (\d\d)\1\1 , InputText = 343434 is matching? = true
+Regex = (\d\d)\1\1 , InputText = 343439 is matching? = false
diff --git a/BasicJava/RegexDemo_capture_group_backref/RegexDemo/.classpath b/BasicJava/RegexDemo_capture_group_backref/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_capture_group_backref/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_capture_group_backref/RegexDemo/.project b/BasicJava/RegexDemo_capture_group_backref/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_capture_group_backref/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_capture_group_backref/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_capture_group_backref/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_capture_group_backref/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_capture_group_backref/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_capture_group_backref/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..7e105bbf2
Binary files /dev/null and b/BasicJava/RegexDemo_capture_group_backref/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_capture_group_backref/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_capture_group_backref/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..80c304233
--- /dev/null
+++ b/BasicJava/RegexDemo_capture_group_backref/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,37 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ *
+ * Capturing Groups
+ *
+ */
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+
+ /*
+ * Where there are two separate matches for the input, we can
+ * have one match but propagating the same regex match to span
+ * the entire length of the input using back referencing:
+ */
+ isMatch("(\\d\\d)\\1", "3434");
+ isMatch("(\\d\\d)\\1", "3499");
+
+ isMatch("(\\d\\d)\\1\\1", "343434");
+ isMatch("(\\d\\d)\\1\\1", "343439");
+
+ }
+
+ private static void isMatch(String regex, String inputText)
+ {
+ Pattern pattern = Pattern.compile(regex);
+ Matcher matcher = pattern.matcher(inputText);
+
+ System.out.println("Regex = " + regex + " , " + "InputText = "
+ + inputText + " is matching? = " + matcher.matches());
+ }
+
+}
diff --git a/BasicJava/RegexDemo_case_insensitive/Output.txt b/BasicJava/RegexDemo_case_insensitive/Output.txt
new file mode 100644
index 000000000..c1280a216
--- /dev/null
+++ b/BasicJava/RegexDemo_case_insensitive/Output.txt
@@ -0,0 +1,2 @@
+CASE_INSENSITIVE matches = true
+CASE_SENSITIVE matches = false
diff --git a/BasicJava/RegexDemo_case_insensitive/RegexDemo/.classpath b/BasicJava/RegexDemo_case_insensitive/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_case_insensitive/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_case_insensitive/RegexDemo/.project b/BasicJava/RegexDemo_case_insensitive/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_case_insensitive/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_case_insensitive/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_case_insensitive/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_case_insensitive/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_case_insensitive/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_case_insensitive/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..4c8562082
Binary files /dev/null and b/BasicJava/RegexDemo_case_insensitive/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_case_insensitive/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_case_insensitive/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..87375c6fe
--- /dev/null
+++ b/BasicJava/RegexDemo_case_insensitive/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,39 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+ String inputCharSeq = "Hello peter";
+ String regex = "HELLO PETER";
+
+ /*
+ * Parameters:
+ *
+ * regex - The expression to be compiled
+ *
+ * flags - Match flags, a bit mask that may include
+ * CASE_INSENSITIVE, MULTILINE, DOTALL, UNICODE_CASE,
+ * CANON_EQ, UNIX_LINES, LITERAL, UNICODE_CHARACTER_CLASS and
+ * COMMENTS
+ *
+ * Returns:
+ *
+ * the given regular expression compiled into a pattern with
+ * the given flags
+ *
+ */
+ Pattern pattern = Pattern.compile(regex, Pattern.CASE_INSENSITIVE);
+ Matcher matcher = pattern.matcher(inputCharSeq);
+
+ System.out.println("CASE_INSENSITIVE matches = " + matcher.matches());
+
+ pattern = Pattern.compile(regex);
+ matcher = pattern.matcher(inputCharSeq);
+
+ System.out.println("CASE_SENSITIVE matches = " + matcher.matches());
+ }
+
+}
diff --git a/BasicJava/RegexDemo_caseinsensitive_dog/Output.txt b/BasicJava/RegexDemo_caseinsensitive_dog/Output.txt
new file mode 100644
index 000000000..5a892ca6f
--- /dev/null
+++ b/BasicJava/RegexDemo_caseinsensitive_dog/Output.txt
@@ -0,0 +1 @@
+Number of Matches = 1
diff --git a/BasicJava/RegexDemo_caseinsensitive_dog/RegexDemo/.classpath b/BasicJava/RegexDemo_caseinsensitive_dog/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_caseinsensitive_dog/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_caseinsensitive_dog/RegexDemo/.project b/BasicJava/RegexDemo_caseinsensitive_dog/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_caseinsensitive_dog/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_caseinsensitive_dog/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_caseinsensitive_dog/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_caseinsensitive_dog/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_caseinsensitive_dog/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_caseinsensitive_dog/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..c9bf9ed79
Binary files /dev/null and b/BasicJava/RegexDemo_caseinsensitive_dog/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_caseinsensitive_dog/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_caseinsensitive_dog/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..bb1f27d22
--- /dev/null
+++ b/BasicJava/RegexDemo_caseinsensitive_dog/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,44 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ *
+ * Flags
+ *
+ */
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+ /*
+ * Pattern.CASE_INSENSITIVE
+ *
+ * This flag enables matching regardless of case. By default
+ * matching takes case into account
+ *
+ * So using this flag, we can change the default behavior:
+ */
+ calculateMatches("dog", "This is a DOG", Pattern.CASE_INSENSITIVE);
+ }
+
+ private static void calculateMatches(String regex, String inputText,
+ int flag)
+ {
+ Pattern pattern = Pattern.compile(regex, flag);
+ Matcher matcher = pattern.matcher(inputText);
+ int matches = 0;
+
+ /*
+ * The find method keeps advancing through the input text and
+ * returns true for every match, so we can use it to find the
+ * match count as well:
+ */
+ while (matcher.find())
+ {
+ ++matches;
+ }
+ System.out.println("Number of Matches = " + matches);
+ }
+
+}
diff --git a/BasicJava/RegexDemo_char_class_abc/RegexDemo/.classpath b/BasicJava/RegexDemo_char_class_abc/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_char_class_abc/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_char_class_abc/RegexDemo/.project b/BasicJava/RegexDemo_char_class_abc/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_char_class_abc/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_char_class_abc/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_char_class_abc/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_char_class_abc/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_char_class_abc/RegexDemo/bin/RegexDemo1.class b/BasicJava/RegexDemo_char_class_abc/RegexDemo/bin/RegexDemo1.class
new file mode 100644
index 000000000..d2360c0cd
Binary files /dev/null and b/BasicJava/RegexDemo_char_class_abc/RegexDemo/bin/RegexDemo1.class differ
diff --git a/BasicJava/RegexDemo_char_class_abc/RegexDemo/bin/RegexDemo2.class b/BasicJava/RegexDemo_char_class_abc/RegexDemo/bin/RegexDemo2.class
new file mode 100644
index 000000000..aad2ee4df
Binary files /dev/null and b/BasicJava/RegexDemo_char_class_abc/RegexDemo/bin/RegexDemo2.class differ
diff --git a/BasicJava/RegexDemo_char_class_abc/RegexDemo/src/RegexDemo1.java b/BasicJava/RegexDemo_char_class_abc/RegexDemo/src/RegexDemo1.java
new file mode 100644
index 000000000..b653e2045
--- /dev/null
+++ b/BasicJava/RegexDemo_char_class_abc/RegexDemo/src/RegexDemo1.java
@@ -0,0 +1,33 @@
+import java.util.regex.Pattern;
+
+/**
+ *
+ * [abc] = if a or b or c returns true else false.
+ *
+ */
+public class RegexDemo1
+{
+ public static void main(String[] args)
+ {
+ /*
+ * Parameters:
+ *
+ * regex - The expression to be compiled
+ *
+ * input - The character sequence to be matched
+ *
+ * Returns:
+ *
+ * whether or not the regular expression matches on the input
+ *
+ */
+
+ System.out.println("[abc] matches a = " + Pattern.matches("[abc]", "a"));
+ System.out.println("[abc] matches b = " + Pattern.matches("[abc]", "b"));
+ System.out.println("[abc] matches c = " + Pattern.matches("[abc]", "c"));
+ System.out.println("[abc] matches z = " + Pattern.matches("[abc]", "z"));
+ System.out.println("[abc] matches aa = " + Pattern.matches("[abc]", "aa"));
+ System.out.println("[abc] matches abc = " + Pattern.matches("[abc]", "abc"));
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_char_class_abc/RegexDemo/src/RegexDemo2.java b/BasicJava/RegexDemo_char_class_abc/RegexDemo/src/RegexDemo2.java
new file mode 100644
index 000000000..9238cc4af
--- /dev/null
+++ b/BasicJava/RegexDemo_char_class_abc/RegexDemo/src/RegexDemo2.java
@@ -0,0 +1,33 @@
+import java.util.regex.Pattern;
+
+/**
+ *
+ * [^abc] = if any character except a or b or c returns true else false.
+ *
+ */
+public class RegexDemo2
+{
+ public static void main(String[] args)
+ {
+ /*
+ * Parameters:
+ *
+ * regex - The expression to be compiled
+ *
+ * input - The character sequence to be matched
+ *
+ * Returns:
+ *
+ * whether or not the regular expression matches on the input
+ *
+ */
+
+ System.out.println("[^abc] matches a = " + Pattern.matches("[^abc]", "a"));
+ System.out.println("[^abc] matches b = " + Pattern.matches("[^abc]", "b"));
+ System.out.println("[^abc] matches c = " + Pattern.matches("[^abc]", "c"));
+ System.out.println("[^abc] matches z = " + Pattern.matches("[^abc]", "z"));
+ System.out.println("[^abc] matches zz = " + Pattern.matches("[^abc]", "zz"));
+ System.out.println("[^abc] matches zzz = " + Pattern.matches("[^abc]", "zzz"));
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_char_class_abc/RegexDemo1_Output.txt b/BasicJava/RegexDemo_char_class_abc/RegexDemo1_Output.txt
new file mode 100644
index 000000000..8d3651682
--- /dev/null
+++ b/BasicJava/RegexDemo_char_class_abc/RegexDemo1_Output.txt
@@ -0,0 +1,6 @@
+[abc] matches a = true
+[abc] matches b = true
+[abc] matches c = true
+[abc] matches z = false
+[abc] matches aa = false
+[abc] matches abc = false
diff --git a/BasicJava/RegexDemo_char_class_abc/RegexDemo2_Output.txt b/BasicJava/RegexDemo_char_class_abc/RegexDemo2_Output.txt
new file mode 100644
index 000000000..27f36d77b
--- /dev/null
+++ b/BasicJava/RegexDemo_char_class_abc/RegexDemo2_Output.txt
@@ -0,0 +1,6 @@
+[^abc] matches a = false
+[^abc] matches b = false
+[^abc] matches c = false
+[^abc] matches z = true
+[^abc] matches zz = false
+[^abc] matches zzz = false
diff --git a/BasicJava/RegexDemo_char_class_azAZ/RegexDemo/.classpath b/BasicJava/RegexDemo_char_class_azAZ/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_char_class_azAZ/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_char_class_azAZ/RegexDemo/.project b/BasicJava/RegexDemo_char_class_azAZ/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_char_class_azAZ/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_char_class_azAZ/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_char_class_azAZ/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_char_class_azAZ/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_char_class_azAZ/RegexDemo/bin/RegexDemo1.class b/BasicJava/RegexDemo_char_class_azAZ/RegexDemo/bin/RegexDemo1.class
new file mode 100644
index 000000000..b22207b5e
Binary files /dev/null and b/BasicJava/RegexDemo_char_class_azAZ/RegexDemo/bin/RegexDemo1.class differ
diff --git a/BasicJava/RegexDemo_char_class_azAZ/RegexDemo/bin/RegexDemo2.class b/BasicJava/RegexDemo_char_class_azAZ/RegexDemo/bin/RegexDemo2.class
new file mode 100644
index 000000000..39acc648c
Binary files /dev/null and b/BasicJava/RegexDemo_char_class_azAZ/RegexDemo/bin/RegexDemo2.class differ
diff --git a/BasicJava/RegexDemo_char_class_azAZ/RegexDemo/src/RegexDemo1.java b/BasicJava/RegexDemo_char_class_azAZ/RegexDemo/src/RegexDemo1.java
new file mode 100644
index 000000000..737e23315
--- /dev/null
+++ b/BasicJava/RegexDemo_char_class_azAZ/RegexDemo/src/RegexDemo1.java
@@ -0,0 +1,30 @@
+import java.util.regex.Pattern;
+
+/**
+ *
+ * [a-zA-Z] : Means any character that IS a-z OR A-Z
+ *
+ */
+public class RegexDemo1
+{
+ public static void main(String[] args)
+ {
+ /*
+ * Parameters:
+ *
+ * regex - The expression to be compiled
+ *
+ * input - The character sequence to be matched
+ *
+ * Returns:
+ *
+ * whether or not the regular expression matches on the input
+ *
+ */
+ System.out.println("[a-zA-Z] matches A = " + Pattern.matches("[a-zA-Z]", "A"));
+ System.out.println("[a-zA-Z] matches d = " + Pattern.matches("[a-zA-Z]", "d"));
+ System.out.println("[a-zA-Z] matches ddZY = " + Pattern.matches("[a-zA-Z]", "ddZY"));
+ System.out.println("[a-zA-Z] matches 1 = " + Pattern.matches("[a-zA-Z]", "1"));
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_char_class_azAZ/RegexDemo/src/RegexDemo2.java b/BasicJava/RegexDemo_char_class_azAZ/RegexDemo/src/RegexDemo2.java
new file mode 100644
index 000000000..4a58e5117
--- /dev/null
+++ b/BasicJava/RegexDemo_char_class_azAZ/RegexDemo/src/RegexDemo2.java
@@ -0,0 +1,31 @@
+import java.util.regex.Pattern;
+
+/**
+ *
+ * [a-zA-Z] = Means any character that IS a-d OR m-p.
+ *
+ */
+public class RegexDemo2
+{
+ public static void main(String[] args)
+ {
+ /*
+ * Parameters:
+ *
+ * regex - The expression to be compiled
+ *
+ * input - The character sequence to be matched
+ *
+ * Returns:
+ *
+ * whether or not the regular expression matches on the input
+ *
+ */
+ System.out.println("[a-d[m-p]] matches a = " + Pattern.matches("[a-d[m-p]]", "a"));
+ System.out.println("[a-d[m-p]] matches n = " + Pattern.matches("[a-d[m-p]]", "n"));
+ System.out.println("[a-d[m-p]] matches e = " + Pattern.matches("[a-d[m-p]]", "e"));
+ System.out.println("[a-d[m-p]] matches A = " + Pattern.matches("[a-d[m-p]]", "A"));
+ System.out.println("[a-d[m-p]] matches am = " + Pattern.matches("[a-d[m-p]]", "am"));
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_char_class_azAZ/RegexDemo1_Output.txt b/BasicJava/RegexDemo_char_class_azAZ/RegexDemo1_Output.txt
new file mode 100644
index 000000000..5ee924c12
--- /dev/null
+++ b/BasicJava/RegexDemo_char_class_azAZ/RegexDemo1_Output.txt
@@ -0,0 +1,4 @@
+[a-zA-Z] matches A = true
+[a-zA-Z] matches d = true
+[a-zA-Z] matches ddZY = false
+[a-zA-Z] matches 1 = false
diff --git a/BasicJava/RegexDemo_char_class_azAZ/RegexDemo2_Output.txt b/BasicJava/RegexDemo_char_class_azAZ/RegexDemo2_Output.txt
new file mode 100644
index 000000000..924fbef2c
--- /dev/null
+++ b/BasicJava/RegexDemo_char_class_azAZ/RegexDemo2_Output.txt
@@ -0,0 +1,5 @@
+[a-d[m-p]] matches a = true
+[a-d[m-p]] matches n = true
+[a-d[m-p]] matches e = false
+[a-d[m-p]] matches A = false
+[a-d[m-p]] matches am = false
diff --git a/BasicJava/RegexDemo_char_class_intersection/RegexDemo/.classpath b/BasicJava/RegexDemo_char_class_intersection/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_char_class_intersection/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_char_class_intersection/RegexDemo/.project b/BasicJava/RegexDemo_char_class_intersection/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_char_class_intersection/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_char_class_intersection/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_char_class_intersection/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_char_class_intersection/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_char_class_intersection/RegexDemo/bin/RegexDemo1.class b/BasicJava/RegexDemo_char_class_intersection/RegexDemo/bin/RegexDemo1.class
new file mode 100644
index 000000000..c5f216796
Binary files /dev/null and b/BasicJava/RegexDemo_char_class_intersection/RegexDemo/bin/RegexDemo1.class differ
diff --git a/BasicJava/RegexDemo_char_class_intersection/RegexDemo/bin/RegexDemo2.class b/BasicJava/RegexDemo_char_class_intersection/RegexDemo/bin/RegexDemo2.class
new file mode 100644
index 000000000..04547444d
Binary files /dev/null and b/BasicJava/RegexDemo_char_class_intersection/RegexDemo/bin/RegexDemo2.class differ
diff --git a/BasicJava/RegexDemo_char_class_intersection/RegexDemo/bin/RegexDemo3.class b/BasicJava/RegexDemo_char_class_intersection/RegexDemo/bin/RegexDemo3.class
new file mode 100644
index 000000000..5615a6c0b
Binary files /dev/null and b/BasicJava/RegexDemo_char_class_intersection/RegexDemo/bin/RegexDemo3.class differ
diff --git a/BasicJava/RegexDemo_char_class_intersection/RegexDemo/src/RegexDemo1.java b/BasicJava/RegexDemo_char_class_intersection/RegexDemo/src/RegexDemo1.java
new file mode 100644
index 000000000..14aded0cc
--- /dev/null
+++ b/BasicJava/RegexDemo_char_class_intersection/RegexDemo/src/RegexDemo1.java
@@ -0,0 +1,31 @@
+import java.util.regex.Pattern;
+
+/**
+ *
+ * [a-z&&[def]] = d, e, or f (intersection)
+ *
+ */
+public class RegexDemo1
+{
+ public static void main(String[] args)
+ {
+ /*
+ * Parameters:
+ *
+ * regex - The expression to be compiled
+ *
+ * input - The character sequence to be matched
+ *
+ * Returns:
+ *
+ * whether or not the regular expression matches on the input
+ *
+ */
+ System.out.println("[a-z&&[def]] matches d = " + Pattern.matches("[a-z&&[def]]", "d"));
+ System.out.println("[a-z&&[def]] matches e = " + Pattern.matches("[a-z&&[def]]", "e"));
+ System.out.println("[a-z&&[def]] matches f = " + Pattern.matches("[a-z&&[def]]", "f"));
+ System.out.println("[a-z&&[def]] matches z = " + Pattern.matches("[a-z&&[def]]", "z"));
+ System.out.println("[a-z&&[def]] matches def = " + Pattern.matches("[a-z&&[def]]", "def"));
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_char_class_intersection/RegexDemo/src/RegexDemo2.java b/BasicJava/RegexDemo_char_class_intersection/RegexDemo/src/RegexDemo2.java
new file mode 100644
index 000000000..f89bceb2b
--- /dev/null
+++ b/BasicJava/RegexDemo_char_class_intersection/RegexDemo/src/RegexDemo2.java
@@ -0,0 +1,29 @@
+import java.util.regex.Pattern;
+
+/**
+ *
+ * [a-z&&[^bc]] = a through z, except for b and c
+ *
+ */
+public class RegexDemo2
+{
+ public static void main(String[] args)
+ {
+ /*
+ * Parameters:
+ *
+ * regex - The expression to be compiled
+ *
+ * input - The character sequence to be matched
+ *
+ * Returns:
+ *
+ * whether or not the regular expression matches on the input
+ *
+ */
+ System.out.println("[a-z&&[^bc]] matches h = " + Pattern.matches("[a-z&&[^bc]]", "h"));
+ System.out.println("[a-z&&[^bc]] matches c = " + Pattern.matches("[a-z&&[^bc]]", "c"));
+ System.out.println("[a-z&&[^bc]] matches hh = " + Pattern.matches("[a-z&&[^bc]]", "hh"));
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_char_class_intersection/RegexDemo/src/RegexDemo3.java b/BasicJava/RegexDemo_char_class_intersection/RegexDemo/src/RegexDemo3.java
new file mode 100644
index 000000000..df3dbb8a7
--- /dev/null
+++ b/BasicJava/RegexDemo_char_class_intersection/RegexDemo/src/RegexDemo3.java
@@ -0,0 +1,29 @@
+import java.util.regex.Pattern;
+
+/**
+ *
+ * [a-z&&[^m-p]] = a through z, and not m through p
+ *
+ */
+public class RegexDemo3
+{
+ public static void main(String[] args)
+ {
+ /*
+ * Parameters:
+ *
+ * regex - The expression to be compiled
+ *
+ * input - The character sequence to be matched
+ *
+ * Returns:
+ *
+ * whether or not the regular expression matches on the input
+ *
+ */
+ System.out.println("[a-z&&[^m-p]] matches b = " + Pattern.matches("[a-z&&[^m-p]]", "b"));
+ System.out.println("[a-z&&[^m-p]] matches o = " + Pattern.matches("[a-z&&[^m-p]]", "o"));
+ System.out.println("[a-z&&[^m-p]] matches bb = " + Pattern.matches("[a-z&&[^m-p]]", "bb"));
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_char_class_intersection/RegexDemo1_Output.txt b/BasicJava/RegexDemo_char_class_intersection/RegexDemo1_Output.txt
new file mode 100644
index 000000000..62bc0aca5
--- /dev/null
+++ b/BasicJava/RegexDemo_char_class_intersection/RegexDemo1_Output.txt
@@ -0,0 +1,5 @@
+[a-z&&[def]] matches d = true
+[a-z&&[def]] matches e = true
+[a-z&&[def]] matches f = true
+[a-z&&[def]] matches z = false
+[a-z&&[def]] matches def = false
diff --git a/BasicJava/RegexDemo_char_class_intersection/RegexDemo2_Output.txt b/BasicJava/RegexDemo_char_class_intersection/RegexDemo2_Output.txt
new file mode 100644
index 000000000..f7816068f
--- /dev/null
+++ b/BasicJava/RegexDemo_char_class_intersection/RegexDemo2_Output.txt
@@ -0,0 +1,3 @@
+[a-z&&[^bc]] matches h = true
+[a-z&&[^bc]] matches c = false
+[a-z&&[^bc]] matches hh = false
diff --git a/BasicJava/RegexDemo_char_class_intersection/RegexDemo3_Output.txt b/BasicJava/RegexDemo_char_class_intersection/RegexDemo3_Output.txt
new file mode 100644
index 000000000..16889ce80
--- /dev/null
+++ b/BasicJava/RegexDemo_char_class_intersection/RegexDemo3_Output.txt
@@ -0,0 +1,3 @@
+[a-z&&[^m-p]] matches b = true
+[a-z&&[^m-p]] matches o = false
+[a-z&&[^m-p]] matches bb = false
diff --git a/BasicJava/RegexDemo_comments_flag/Output.txt b/BasicJava/RegexDemo_comments_flag/Output.txt
new file mode 100644
index 000000000..5a892ca6f
--- /dev/null
+++ b/BasicJava/RegexDemo_comments_flag/Output.txt
@@ -0,0 +1 @@
+Number of Matches = 1
diff --git a/BasicJava/RegexDemo_comments_flag/RegexDemo/.classpath b/BasicJava/RegexDemo_comments_flag/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_comments_flag/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_comments_flag/RegexDemo/.project b/BasicJava/RegexDemo_comments_flag/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_comments_flag/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_comments_flag/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_comments_flag/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_comments_flag/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_comments_flag/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_comments_flag/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..4e77a9141
Binary files /dev/null and b/BasicJava/RegexDemo_comments_flag/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_comments_flag/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_comments_flag/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..69a021113
--- /dev/null
+++ b/BasicJava/RegexDemo_comments_flag/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,44 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ *
+ * Flags
+ *
+ */
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+ /*
+ * Pattern.COMMENTS
+ *
+ * when we use the flag, it will ignore the extra spaces and
+ * the every text starting with # will be seen as a comment to
+ * be ignored for each line:
+ */
+ calculateMatches("dog$ #check end of text", "This is a dog",
+ Pattern.COMMENTS);
+ }
+
+ private static void calculateMatches(String regex, String inputText,
+ int flag)
+ {
+ Pattern pattern = Pattern.compile(regex, flag);
+ Matcher matcher = pattern.matcher(inputText);
+ int matches = 0;
+
+ /*
+ * The find method keeps advancing through the input text and
+ * returns true for every match, so we can use it to find the
+ * match count as well:
+ */
+ while (matcher.find())
+ {
+ ++matches;
+ }
+ System.out.println("Number of Matches = " + matches);
+ }
+
+}
diff --git a/BasicJava/RegexDemo_contains_http/Output.txt b/BasicJava/RegexDemo_contains_http/Output.txt
new file mode 100644
index 000000000..74c06beb7
--- /dev/null
+++ b/BasicJava/RegexDemo_contains_http/Output.txt
@@ -0,0 +1 @@
+matches = true
diff --git a/BasicJava/RegexDemo_contains_http/RegexDemo/.classpath b/BasicJava/RegexDemo_contains_http/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_contains_http/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_contains_http/RegexDemo/.project b/BasicJava/RegexDemo_contains_http/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_contains_http/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_contains_http/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_contains_http/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_contains_http/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_contains_http/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_contains_http/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..1a108d69b
Binary files /dev/null and b/BasicJava/RegexDemo_contains_http/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_contains_http/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_contains_http/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..b5d426561
--- /dev/null
+++ b/BasicJava/RegexDemo_contains_http/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,35 @@
+import java.util.regex.Pattern;
+
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+ /*
+ * The inputText variable contains the text to be checked with
+ * the regular expression.
+ */
+ String inputText = "This is the text to be searched "
+ + "for occurrences of the http:// pattern.";
+
+ /*
+ * The regular expression matches all texts which contains one
+ * or more characters (.*) followed by the text http://
+ * followed by one or more characters (.*).
+ */
+ String regex = ".*http://.*";
+
+ /*
+ * the Pattern.matches() static method to check if the regular
+ * expression (pattern) matches the text. If the regular
+ * expression matches the text, then Pattern.matches() returns
+ * true. If the regular expression does not match the text
+ * Pattern.matches() returns false.
+ */
+ boolean matches = Pattern.matches(regex, inputText);
+
+ System.out.println("matches = " + matches);
+
+ }
+
+}
diff --git a/BasicJava/RegexDemo_count_word_dog/Output.txt b/BasicJava/RegexDemo_count_word_dog/Output.txt
new file mode 100644
index 000000000..c92e85ce2
--- /dev/null
+++ b/BasicJava/RegexDemo_count_word_dog/Output.txt
@@ -0,0 +1,16 @@
+Match number 1
+start(): 0
+end(): 3
+---------------------
+Match number 2
+start(): 4
+end(): 7
+---------------------
+Match number 3
+start(): 8
+end(): 11
+---------------------
+Match number 4
+start(): 19
+end(): 22
+---------------------
diff --git a/BasicJava/RegexDemo_count_word_dog/RegexDemo/.classpath b/BasicJava/RegexDemo_count_word_dog/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_count_word_dog/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_count_word_dog/RegexDemo/.project b/BasicJava/RegexDemo_count_word_dog/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_count_word_dog/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_count_word_dog/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_count_word_dog/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_count_word_dog/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_count_word_dog/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_count_word_dog/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..afee03556
Binary files /dev/null and b/BasicJava/RegexDemo_count_word_dog/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_count_word_dog/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_count_word_dog/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..4aff17548
--- /dev/null
+++ b/BasicJava/RegexDemo_count_word_dog/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,41 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ *
+ * This example that counts the number of times the word "dog" appears in the
+ * input string
+ *
+ */
+public class RegexDemo
+{
+ private static final String REGEX = "\\bdog\\b";
+ private static final String INPUT = "dog dog dog dogiee dog";
+
+ public static void main(String[] args)
+ {
+ Pattern p = Pattern.compile(REGEX);
+ Matcher m = p.matcher(INPUT); // get a matcher object
+ int count = 0;
+
+ /*
+ * Returns:true if, and only if, a subsequence of the input sequence
+ * matches this matcher's pattern
+ */
+ while (m.find())
+ {
+ count++;
+ System.out.println("Match number " + count);
+ /*
+ * Returns the start index of the previous match.
+ */
+ System.out.println("start(): " + m.start());
+ /*
+ * Returns the offset after the last character matched.
+ */
+ System.out.println("end(): " + m.end());
+ System.out.println("---------------------");
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_date_format/Output.txt b/BasicJava/RegexDemo_date_format/Output.txt
new file mode 100644
index 000000000..efbd451ee
--- /dev/null
+++ b/BasicJava/RegexDemo_date_format/Output.txt
@@ -0,0 +1,9 @@
+01/01/2020 is Valid? = true
+31/01/2020 is Valid? = true
+31/8/2010 is Valid? = true
+1/1/2010 is Valid? = true
+--------------------------------------
+32/1/2010 is Valid? = false
+31/9/2010 is Valid? = false
+333/2/200f is Valid? = false
+110:20 is Valid? = false
diff --git a/BasicJava/RegexDemo_date_format/RegexDemo/.classpath b/BasicJava/RegexDemo_date_format/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_date_format/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_date_format/RegexDemo/.project b/BasicJava/RegexDemo_date_format/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_date_format/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_date_format/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_date_format/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_date_format/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_date_format/RegexDemo/bin/DateValidator.class b/BasicJava/RegexDemo_date_format/RegexDemo/bin/DateValidator.class
new file mode 100644
index 000000000..0aabc29c4
Binary files /dev/null and b/BasicJava/RegexDemo_date_format/RegexDemo/bin/DateValidator.class differ
diff --git a/BasicJava/RegexDemo_date_format/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_date_format/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..7c337dd93
Binary files /dev/null and b/BasicJava/RegexDemo_date_format/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_date_format/RegexDemo/src/DateValidator.java b/BasicJava/RegexDemo_date_format/RegexDemo/src/DateValidator.java
new file mode 100644
index 000000000..eb261b4f1
--- /dev/null
+++ b/BasicJava/RegexDemo_date_format/RegexDemo/src/DateValidator.java
@@ -0,0 +1,90 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * How to validate date with regular expression
+ */
+public class DateValidator
+{
+
+ private Pattern pattern;
+ private Matcher matcher;
+
+ private static final String DATE_REGEX = "(0?[1-9]|[12][0-9]|3[01])/(0?[1-9]|1[012])/((19|20)\\d\\d)";
+
+ public DateValidator()
+ {
+ pattern = Pattern.compile(DATE_REGEX);
+ }
+
+ /*
+ * 1.Date is valid against Regex.
+ * 2.Days of the month is valid.
+ */
+ public boolean validate(final String date)
+ {
+
+ matcher = pattern.matcher(date);
+
+ if (matcher.matches())
+ {
+
+ matcher.reset();
+
+ if (matcher.find())
+ {
+
+ String day = matcher.group(1);
+ String month = matcher.group(2);
+ int year = Integer.parseInt(matcher.group(3));
+
+ if (day.equals("31") && (month.equals("4") || month.equals("6")
+ || month.equals("9") || month.equals("11")
+ || month.equals("04") || month.equals("06")
+ || month.equals("09")))
+ {
+ return false; // only 1,3,5,7,8,10,12 has 31 days
+ }
+ else if (month.equals("2") || month.equals("02"))
+ {
+ // leap year
+ if (year % 4 == 0)
+ {
+ if (day.equals("30") || day.equals("31"))
+ {
+ return false;
+ }
+ else
+ {
+ return true;
+ }
+ }
+ else
+ {
+ if (day.equals("29") || day.equals("30")
+ || day.equals("31"))
+ {
+ return false;
+ }
+ else
+ {
+ return true;
+ }
+ }
+ }
+ else
+ {
+ return true;
+ }
+ }
+ else
+ {
+ return false;
+ }
+ }
+ else
+ {
+ return false;
+ }
+ }
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_date_format/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_date_format/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..657f7422f
--- /dev/null
+++ b/BasicJava/RegexDemo_date_format/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,39 @@
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ *
+ * How to validate date with regular expression
+ *
+ */
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+ List validDateList = Arrays.asList("01/01/2020", "31/01/2020",
+ "31/8/2010", "1/1/2010");
+
+ DateValidator dateValidator = new DateValidator();
+
+ for (String date : validDateList)
+ {
+ System.out.println(
+ date + " is Valid? = " + dateValidator.validate(date));
+ }
+
+ System.out.println("--------------------------------------");
+
+ List inValidDateList = Arrays.asList("32/1/2010", "31/9/2010",
+ "333/2/200f", "110:20");
+
+ for (String date : inValidDateList)
+ {
+ System.out.println(
+ date + " is Valid? = " + dateValidator.validate(date));
+ }
+
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_diff_lookingAt_matches/Output.txt b/BasicJava/RegexDemo_diff_lookingAt_matches/Output.txt
new file mode 100644
index 000000000..cab461279
--- /dev/null
+++ b/BasicJava/RegexDemo_diff_lookingAt_matches/Output.txt
@@ -0,0 +1,2 @@
+lookingAt = true
+matches = false
diff --git a/BasicJava/RegexDemo_diff_lookingAt_matches/RegexDemo/.classpath b/BasicJava/RegexDemo_diff_lookingAt_matches/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_diff_lookingAt_matches/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_diff_lookingAt_matches/RegexDemo/.project b/BasicJava/RegexDemo_diff_lookingAt_matches/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_diff_lookingAt_matches/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_diff_lookingAt_matches/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_diff_lookingAt_matches/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_diff_lookingAt_matches/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_diff_lookingAt_matches/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_diff_lookingAt_matches/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..07562abc2
Binary files /dev/null and b/BasicJava/RegexDemo_diff_lookingAt_matches/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_diff_lookingAt_matches/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_diff_lookingAt_matches/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..2d156a3c4
--- /dev/null
+++ b/BasicJava/RegexDemo_diff_lookingAt_matches/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,32 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+ String inputCharSeq = "Hello peter how are you?";
+
+ String regex = "Hello peter";
+
+ Pattern pattern = Pattern.compile(regex);
+ Matcher matcher = pattern.matcher(inputCharSeq);
+
+ /*
+ * The Matcher lookingAt() method works like the matches()
+ * method with one major difference.
+ *
+ * The lookingAt() method only matches the regular expression
+ * against the beginning of the text, whereas matches()
+ * matches the regular expression against the whole text.
+ *
+ * In other words, if the regular expression matches the
+ * beginning of a text but not the whole text, lookingAt()
+ * will return true, whereas matches() will return false.
+ */
+ System.out.println("lookingAt = " + matcher.lookingAt());
+ System.out.println("matches = " + matcher.matches());
+ }
+
+}
diff --git a/BasicJava/RegexDemo_dot_r/Output.txt b/BasicJava/RegexDemo_dot_r/Output.txt
new file mode 100644
index 000000000..21b8aebfe
--- /dev/null
+++ b/BasicJava/RegexDemo_dot_r/Output.txt
@@ -0,0 +1,5 @@
+true
+false
+false
+false
+true
diff --git a/BasicJava/RegexDemo_dot_r/RegexDemo/.classpath b/BasicJava/RegexDemo_dot_r/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_dot_r/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_dot_r/RegexDemo/.project b/BasicJava/RegexDemo_dot_r/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_dot_r/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_dot_r/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_dot_r/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_dot_r/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_dot_r/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_dot_r/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..c180d672e
Binary files /dev/null and b/BasicJava/RegexDemo_dot_r/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_dot_r/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_dot_r/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..572af6fdc
--- /dev/null
+++ b/BasicJava/RegexDemo_dot_r/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,27 @@
+import java.util.regex.Pattern;
+
+public class RegexDemo
+{
+ public static void main(String[] args)
+ {
+ /*
+ * Parameters:
+ *
+ * regex - The expression to be compiled
+ *
+ * input - The character sequence to be matched
+ *
+ * Returns:
+ *
+ * whether or not the regular expression matches on the input
+ *
+ */
+
+ System.out.println(Pattern.matches(".r", "ar"));//true (2nd char is r)
+ System.out.println(Pattern.matches(".r", "ak"));//false (2nd char is not r)
+ System.out.println(Pattern.matches(".r", "arr"));//false (has more than 2 char)
+ System.out.println(Pattern.matches(".r", "arrr"));//false (has more than 2 char)
+ System.out.println(Pattern.matches("..r", "par"));//true (3rd char is r)
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_email/Output.txt b/BasicJava/RegexDemo_email/Output.txt
new file mode 100644
index 000000000..ee9bd6e70
--- /dev/null
+++ b/BasicJava/RegexDemo_email/Output.txt
@@ -0,0 +1,12 @@
+peter@yahoo.com is Valid = true
+peter@yahoo.net is Valid = true
+peter.50@yahoo.com is Valid = true
+peter-100@yahoo.com is Valid = true
+peter@gmail.com is Valid = true
+peter+900@oracle.com is Valid = true
+--------------------------------------
+peteryahoo.com is Valid = false
+peter.50@.yahoo.com is Valid = false
+peter.@yahoo.com is Valid = false
+peter@gmail@com is Valid = false
+peter..900@oracle.com is Valid = false
diff --git a/BasicJava/RegexDemo_email/RegexDemo/.classpath b/BasicJava/RegexDemo_email/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_email/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_email/RegexDemo/.project b/BasicJava/RegexDemo_email/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_email/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_email/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_email/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_email/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_email/RegexDemo/bin/EmailValidator.class b/BasicJava/RegexDemo_email/RegexDemo/bin/EmailValidator.class
new file mode 100644
index 000000000..ac7a284f0
Binary files /dev/null and b/BasicJava/RegexDemo_email/RegexDemo/bin/EmailValidator.class differ
diff --git a/BasicJava/RegexDemo_email/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_email/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..39aba8536
Binary files /dev/null and b/BasicJava/RegexDemo_email/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_email/RegexDemo/src/EmailValidator.java b/BasicJava/RegexDemo_email/RegexDemo/src/EmailValidator.java
new file mode 100644
index 000000000..0ae4adc8a
--- /dev/null
+++ b/BasicJava/RegexDemo_email/RegexDemo/src/EmailValidator.java
@@ -0,0 +1,34 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ *
+ * How to validate email address with regular expression
+ *
+ */
+public class EmailValidator
+{
+
+ private Pattern pattern;
+ private Matcher matcher;
+
+ private static final String EMAIL_REGEX = "^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@"
+ + "[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$";
+
+ public EmailValidator()
+ {
+ pattern = Pattern.compile(EMAIL_REGEX);
+ }
+
+ /**
+ * Validate hex with regular expression
+ *
+ * @param email email for validation
+ * @return true valid email, false invalid email
+ */
+ public boolean validate(final String email)
+ {
+ matcher = pattern.matcher(email);
+ return matcher.matches();
+ }
+}
diff --git a/BasicJava/RegexDemo_email/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_email/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..f55db6b5a
--- /dev/null
+++ b/BasicJava/RegexDemo_email/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,45 @@
+import java.util.ArrayList;
+
+/**
+ *
+ * How to validate email address with regular expression
+ *
+ */
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+ ArrayList validEmailList = new ArrayList<>();
+ validEmailList.add("peter@yahoo.com");
+ validEmailList.add("peter@yahoo.net");
+ validEmailList.add("peter.50@yahoo.com");
+ validEmailList.add("peter-100@yahoo.com");
+ validEmailList.add("peter@gmail.com");
+ validEmailList.add("peter+900@oracle.com");
+
+ EmailValidator emailValidator = new EmailValidator();
+
+ for (String email : validEmailList)
+ {
+ System.out.println(email + " is Valid = " + emailValidator.validate(email));
+ }
+
+
+ System.out.println("--------------------------------------");
+
+ ArrayList inValidEmailList = new ArrayList<>();
+ inValidEmailList.add("peteryahoo.com"); // @ Symbol missing
+ inValidEmailList.add("peter.50@.yahoo.com"); //. after @ symbol is not allowed
+ inValidEmailList.add("peter.@yahoo.com");//. before @ symbol is not allowed
+ inValidEmailList.add("peter@gmail@com");// two @ symbols are not allowed
+ inValidEmailList.add("peter..900@oracle.com");// two dots are not allowed
+
+ for (String email : inValidEmailList)
+ {
+ System.out.println(email + " is Valid = " + emailValidator.validate(email));
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_extract_animal/Output.txt b/BasicJava/RegexDemo_extract_animal/Output.txt
new file mode 100644
index 000000000..29ef190ab
--- /dev/null
+++ b/BasicJava/RegexDemo_extract_animal/Output.txt
@@ -0,0 +1,3 @@
+Found a cat.
+Found a dog.
+animalList = [cat, dog]
diff --git a/BasicJava/RegexDemo_extract_animal/RegexDemo/.classpath b/BasicJava/RegexDemo_extract_animal/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_extract_animal/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_extract_animal/RegexDemo/.project b/BasicJava/RegexDemo_extract_animal/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_extract_animal/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_extract_animal/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_extract_animal/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_extract_animal/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_extract_animal/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_extract_animal/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..89a9628a3
Binary files /dev/null and b/BasicJava/RegexDemo_extract_animal/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_extract_animal/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_extract_animal/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..4f0ea42c6
--- /dev/null
+++ b/BasicJava/RegexDemo_extract_animal/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,44 @@
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ *
+ * Extracting/Capturing:
+ *
+ * Specific values can be selected out of a large complex body of text. These
+ * values can be used in the application.
+ *
+ */
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+ String inputCharSeq = "I have a cat, but I like my dog better.";
+
+ /*
+ * () - group everything within the parenthesis as group 1
+ *
+ * mouse - match the text ‘mouse’
+ *
+ * | - alternation: match any one of the sections of this group
+ *
+ * cat - match the text ‘cat’
+ */
+
+ Pattern pattern = Pattern.compile("(mouse|cat|dog|wolf)");
+ Matcher matcher = pattern.matcher(inputCharSeq);
+
+ List animalList = new ArrayList();
+ while (matcher.find())
+ {
+ System.out.println("Found a " + matcher.group() + ".");
+ animalList.add(matcher.group());
+ }
+
+ System.out.println("animalList = " + animalList);
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_find_multiocc/Output.txt b/BasicJava/RegexDemo_find_multiocc/Output.txt
new file mode 100644
index 000000000..6ee152cf4
--- /dev/null
+++ b/BasicJava/RegexDemo_find_multiocc/Output.txt
@@ -0,0 +1,4 @@
+Found at: 0 - 3
+Found at: 7 - 10
+Found at: 14 - 17
+Found at: 22 - 25
diff --git a/BasicJava/RegexDemo_find_multiocc/RegexDemo/.classpath b/BasicJava/RegexDemo_find_multiocc/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_find_multiocc/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_find_multiocc/RegexDemo/.project b/BasicJava/RegexDemo_find_multiocc/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_find_multiocc/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_find_multiocc/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_find_multiocc/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_find_multiocc/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_find_multiocc/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_find_multiocc/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..2fcde14ce
Binary files /dev/null and b/BasicJava/RegexDemo_find_multiocc/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_find_multiocc/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_find_multiocc/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..f5ab6a663
--- /dev/null
+++ b/BasicJava/RegexDemo_find_multiocc/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,30 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ *
+ * Example to find out the multiple occurrences using Matcher methods.
+ *
+ */
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+ String inputCharSeq = "Cat AA Cat AA Cat AAA Cat";
+ String regex = "Cat";
+
+ Pattern pattern = Pattern.compile(regex);
+ Matcher matcher = pattern.matcher(inputCharSeq);
+
+ /*
+ * Returns: true if, and only if, a subsequence of the input sequence
+ * matches this matcher's pattern
+ */
+ while (matcher.find())
+ {
+ System.out.println("Found at: " + matcher.start() + " - " + matcher.end());
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_finder/Output.txt b/BasicJava/RegexDemo_finder/Output.txt
new file mode 100644
index 000000000..e2ea04e92
--- /dev/null
+++ b/BasicJava/RegexDemo_finder/Output.txt
@@ -0,0 +1,6 @@
+Enter regex pattern:
+india
+I found the text india starting at index 11 and ending at index 16
+Enter regex pattern:
+peter
+I found the text peter starting at index 17 and ending at index 22
diff --git a/BasicJava/RegexDemo_finder/RegexDemo/.classpath b/BasicJava/RegexDemo_finder/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_finder/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_finder/RegexDemo/.project b/BasicJava/RegexDemo_finder/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_finder/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_finder/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_finder/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_finder/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_finder/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_finder/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..07e90a016
Binary files /dev/null and b/BasicJava/RegexDemo_finder/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_finder/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_finder/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..1f74a15f5
--- /dev/null
+++ b/BasicJava/RegexDemo_finder/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,42 @@
+import java.util.Scanner;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ *
+ * Java Regex Finder Example
+ *
+ */
+
+public class RegexDemo
+{
+ public static void main(String[] args)
+ {
+ try (Scanner sc = new Scanner(System.in))
+ {
+ while (true)
+ {
+ System.out.println("Enter regex pattern:");
+ String regexPattern = sc.nextLine();
+ Pattern pattern = Pattern.compile(regexPattern);
+ Matcher matcher = pattern.matcher("Welcome to india peter");
+ boolean found = false;
+ while (matcher.find())
+ {
+ System.out.println("I found the text "
+ + matcher.group() + " starting at index "
+ + matcher.start()
+ + " and ending at index "
+ + matcher.end());
+ found = true;
+ }
+ if (!found)
+ {
+ System.out.println("No match found.");
+ }
+ }
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_group_append/Output.txt b/BasicJava/RegexDemo_group_append/Output.txt
new file mode 100644
index 000000000..d9a516aad
--- /dev/null
+++ b/BasicJava/RegexDemo_group_append/Output.txt
@@ -0,0 +1,4 @@
+Peter
+Peter writes about this, and Peter
+Peter writes about this, and Peter Doe writes about that, and Peter
+Peter writes about this, and Peter Doe writes about that, and Peter Wayne writes about everything.
diff --git a/BasicJava/RegexDemo_group_append/RegexDemo/.classpath b/BasicJava/RegexDemo_group_append/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_group_append/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_group_append/RegexDemo/.project b/BasicJava/RegexDemo_group_append/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_group_append/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_group_append/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_group_append/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_group_append/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_group_append/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_group_append/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..bb035bc93
Binary files /dev/null and b/BasicJava/RegexDemo_group_append/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_group_append/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_group_append/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..36a7b237e
--- /dev/null
+++ b/BasicJava/RegexDemo_group_append/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,55 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ *
+ * appendReplacement() and appendTail():
+ *
+ * The Matcher appendReplacement() and appendTail() methods are used
+ * to replace string tokens in an input text, and append the resulting
+ * string to a StringBuffer.
+ *
+ * When you have found a match using the find() method, you can call
+ * the appendReplacement(). Doing so results in the characters from
+ * the input text being appended to the StringBuffer, and the matched
+ * text being replaced. Only the characters starting from then end of
+ * the last match, and until just before the matched characters are
+ * copied.
+ *
+ * The appendReplacement() method keeps track of what has been copied
+ * into the StringBuffer, so you can continue searching for matches
+ * using find() until no more matches are found in the input text.
+ *
+ * Once the last match has been found, a part of the input text will
+ * still not have been copied into the StringBuffer. This is the
+ * characters from the end of the last match and until the end of the
+ * input text. By calling appendTail() you can append these last
+ * characters to the StringBuffer too.
+ *
+ *
+ */
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+ String text = "John writes about this, and John Doe writes about that,"
+ + " and John Wayne writes about everything.";
+
+ String regex = "(John) ";
+
+ Pattern pattern = Pattern.compile(regex);
+ Matcher matcher = pattern.matcher(text);
+ StringBuffer stringBuffer = new StringBuffer();
+
+ while (matcher.find())
+ {
+ matcher.appendReplacement(stringBuffer, "Peter ");
+ System.out.println(stringBuffer.toString());
+ }
+ matcher.appendTail(stringBuffer);
+
+ System.out.println(stringBuffer.toString());
+ }
+
+}
diff --git a/BasicJava/RegexDemo_group_john/Output.txt b/BasicJava/RegexDemo_group_john/Output.txt
new file mode 100644
index 000000000..840f399d3
--- /dev/null
+++ b/BasicJava/RegexDemo_group_john/Output.txt
@@ -0,0 +1,3 @@
+found: John , start: 0, end: 4
+found: John , start: 28, end: 32
+found: John , start: 56, end: 60
diff --git a/BasicJava/RegexDemo_group_john/RegexDemo/.classpath b/BasicJava/RegexDemo_group_john/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_group_john/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_group_john/RegexDemo/.project b/BasicJava/RegexDemo_group_john/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_group_john/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_group_john/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_group_john/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_group_john/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_group_john/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_group_john/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..90be00c52
Binary files /dev/null and b/BasicJava/RegexDemo_group_john/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_group_john/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_group_john/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..8795de712
--- /dev/null
+++ b/BasicJava/RegexDemo_group_john/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,53 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ *
+ * This example searches the text for occurrences of the word John.
+ * For each match found, group number 1 is extracted, which is what
+ * matched the group marked with parentheses.
+ *
+ */
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+ String text = "John writes about this, and John writes about that,"
+ + " and John writes about everything. ";
+
+ /*
+ * Groups are marked with parentheses in the regular
+ * expression.
+ *
+ * This regular expression matches the text John. The
+ * parentheses are not part of the text that is matched. The
+ * parentheses mark a group. When a match is found in a text,
+ * you can get access to the part of the regular expression
+ * inside the group.
+ */
+ String regex = "(John)";
+
+ Pattern pattern = Pattern.compile(regex);
+ Matcher matcher = pattern.matcher(text);
+
+ while (matcher.find())
+ {
+ /*
+ * We access a group using the group(int groupNo) method.
+ * A regular expression can have more than one group. Each
+ * group is thus marked with a separate set of
+ * parentheses. To get access to the text that matched the
+ * subpart of the expression in a specific group, pass the
+ * number of the group to the group(int groupNo) method.
+ *
+ * The group with number 0 is always the whole regular
+ * expression. To get access to a group marked by
+ * parentheses you should start with group numbers 1.
+ */
+ System.out.println("found: " + matcher.group(1) + " , start: "
+ + matcher.start() + ", end: " + matcher.end());
+ }
+ }
+
+}
diff --git a/BasicJava/RegexDemo_image_name/Output.txt b/BasicJava/RegexDemo_image_name/Output.txt
new file mode 100644
index 000000000..8b5aed540
--- /dev/null
+++ b/BasicJava/RegexDemo_image_name/Output.txt
@@ -0,0 +1,17 @@
+cat.jpg is Valid? = true
+cat.gif is Valid? = true
+cat.png is Valid? = true
+cat.bmp is Valid? = true
+dog.JPG is Valid? = true
+dog.GIF is Valid? = true
+dog.PNG is Valid? = true
+dog.BMP is Valid? = true
+rose.JpG is Valid? = true
+rose.gIF is Valid? = true
+rose.PNg is Valid? = true
+rose.BMp is Valid? = true
+--------------------------------------
+.jpg is Valid? = false
+ .gif is Valid? = false
+dog.txt is Valid? = false
+jpg is Valid? = false
diff --git a/BasicJava/RegexDemo_image_name/RegexDemo/.classpath b/BasicJava/RegexDemo_image_name/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_image_name/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_image_name/RegexDemo/.project b/BasicJava/RegexDemo_image_name/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_image_name/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_image_name/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_image_name/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_image_name/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_image_name/RegexDemo/bin/ImageValidator.class b/BasicJava/RegexDemo_image_name/RegexDemo/bin/ImageValidator.class
new file mode 100644
index 000000000..c96e700cb
Binary files /dev/null and b/BasicJava/RegexDemo_image_name/RegexDemo/bin/ImageValidator.class differ
diff --git a/BasicJava/RegexDemo_image_name/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_image_name/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..62acc0dbc
Binary files /dev/null and b/BasicJava/RegexDemo_image_name/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_image_name/RegexDemo/src/ImageValidator.java b/BasicJava/RegexDemo_image_name/RegexDemo/src/ImageValidator.java
new file mode 100644
index 000000000..1d622bda1
--- /dev/null
+++ b/BasicJava/RegexDemo_image_name/RegexDemo/src/ImageValidator.java
@@ -0,0 +1,33 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ *
+ * How to validate image file extension with regular expression
+ *
+ */
+public class ImageValidator
+{
+
+ private Pattern pattern;
+ private Matcher matcher;
+
+ private static final String IMAGE_NAME_REGEX = "([^\\s]+(\\.(?i)(jpg|png|gif|bmp))$)";
+
+ public ImageValidator()
+ {
+ pattern = Pattern.compile(IMAGE_NAME_REGEX);
+ }
+
+ /**
+ * Validate image with regular expression
+ *
+ * @param imageName imageName for validation
+ * @return true valid imageName, false invalid imageName
+ */
+ public boolean validate(final String imageName)
+ {
+ matcher = pattern.matcher(imageName);
+ return matcher.matches();
+ }
+}
diff --git a/BasicJava/RegexDemo_image_name/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_image_name/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..55f7d8e91
--- /dev/null
+++ b/BasicJava/RegexDemo_image_name/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,37 @@
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ *
+ * How to validate image file extension with regular expression
+ *
+ */
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+ List validImageNameList = Arrays.asList("cat.jpg", "cat.gif",
+ "cat.png", "cat.bmp", "dog.JPG", "dog.GIF", "dog.PNG",
+ "dog.BMP","rose.JpG", "rose.gIF", "rose.PNg",
+ "rose.BMp");
+
+ ImageValidator imageValidator = new ImageValidator();
+
+ for (String imageName : validImageNameList)
+ {
+ System.out.println(imageName + " is Valid? = " + imageValidator.validate(imageName));
+ }
+
+ System.out.println("--------------------------------------");
+
+ List inValidImageNameList = Arrays.asList(".jpg", " .gif","dog.txt","jpg");
+
+ for (String imageName : inValidImageNameList)
+ {
+ System.out.println(imageName + " is Valid? = " + imageValidator.validate(imageName));
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_index_methods/Output.txt b/BasicJava/RegexDemo_index_methods/Output.txt
new file mode 100644
index 000000000..4a809467a
--- /dev/null
+++ b/BasicJava/RegexDemo_index_methods/Output.txt
@@ -0,0 +1,2 @@
+Starting position = 5
+Ending position = 8
diff --git a/BasicJava/RegexDemo_index_methods/RegexDemo/.classpath b/BasicJava/RegexDemo_index_methods/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_index_methods/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_index_methods/RegexDemo/.project b/BasicJava/RegexDemo_index_methods/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_index_methods/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_index_methods/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_index_methods/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_index_methods/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_index_methods/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_index_methods/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..608b57c20
Binary files /dev/null and b/BasicJava/RegexDemo_index_methods/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_index_methods/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_index_methods/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..12473e204
--- /dev/null
+++ b/BasicJava/RegexDemo_index_methods/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,31 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ *
+ * Index Methods
+ *
+ */
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+ Pattern pattern = Pattern.compile("dog");
+ Matcher matcher = pattern.matcher("This dog is mine");
+
+ while (matcher.find())
+ {
+
+ /*
+ * Index methods provide useful index values that show
+ * precisely where the match was found in the input String
+ * . In the following test, we will confirm the start and
+ * end indices of the match for dog in the input String.
+ */
+ System.out.println("Starting position = " + matcher.start());
+ System.out.println("Ending position = " + matcher.end());
+ }
+ }
+
+}
diff --git a/BasicJava/RegexDemo_intersection_class/Output.txt b/BasicJava/RegexDemo_intersection_class/Output.txt
new file mode 100644
index 000000000..29a7a1fc9
--- /dev/null
+++ b/BasicJava/RegexDemo_intersection_class/Output.txt
@@ -0,0 +1,2 @@
+Number of Matches = 4
+Number of Matches = 4
diff --git a/BasicJava/RegexDemo_intersection_class/RegexDemo/.classpath b/BasicJava/RegexDemo_intersection_class/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_intersection_class/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_intersection_class/RegexDemo/.project b/BasicJava/RegexDemo_intersection_class/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_intersection_class/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_intersection_class/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_intersection_class/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_intersection_class/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_intersection_class/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_intersection_class/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..6cd0881a0
Binary files /dev/null and b/BasicJava/RegexDemo_intersection_class/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_intersection_class/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_intersection_class/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..0c6623e82
--- /dev/null
+++ b/BasicJava/RegexDemo_intersection_class/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,40 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ *
+ * Intersection Class
+ *
+ */
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+ /*
+ * We will get 4 matches because the intersection of the two
+ * sets has only 4 elements[3456].
+ */
+ calculateMatches("[1-6&&[3-9]]", "3456");
+ calculateMatches("[1-6&&[3-9]]", "123456789");
+ }
+
+ private static void calculateMatches(String regex, String inputText)
+ {
+ Pattern pattern = Pattern.compile(regex);
+ Matcher matcher = pattern.matcher(inputText);
+ int matches = 0;
+
+ /*
+ * The find method keeps advancing through the input text and
+ * returns true for every match, so we can use it to find the
+ * match count as well:
+ */
+ while (matcher.find())
+ {
+ ++matches;
+ }
+ System.out.println("Number of Matches = " + matches);
+ }
+
+}
diff --git a/BasicJava/RegexDemo_ipaddress/Output.txt b/BasicJava/RegexDemo_ipaddress/Output.txt
new file mode 100644
index 000000000..f883f426c
--- /dev/null
+++ b/BasicJava/RegexDemo_ipaddress/Output.txt
@@ -0,0 +1,11 @@
+1.1.1.1 is Valid? = true
+255.255.255.255 is Valid? = true
+192.168.1.2 is Valid? = true
+10.10.1.1 is Valid? = true
+132.253.111.10 is Valid? = true
+26.10.2.10 is Valid? = true
+127.0.0.1 is Valid? = true
+--------------------------------------
+10.10.10 is Valid? = false
+222.222.2.999 is Valid? = false
+10.0.0.a is Valid? = false
diff --git a/BasicJava/RegexDemo_ipaddress/RegexDemo/.classpath b/BasicJava/RegexDemo_ipaddress/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_ipaddress/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_ipaddress/RegexDemo/.project b/BasicJava/RegexDemo_ipaddress/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_ipaddress/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_ipaddress/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_ipaddress/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_ipaddress/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_ipaddress/RegexDemo/bin/IPAddressValidator.class b/BasicJava/RegexDemo_ipaddress/RegexDemo/bin/IPAddressValidator.class
new file mode 100644
index 000000000..85a963ae8
Binary files /dev/null and b/BasicJava/RegexDemo_ipaddress/RegexDemo/bin/IPAddressValidator.class differ
diff --git a/BasicJava/RegexDemo_ipaddress/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_ipaddress/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..9a6094656
Binary files /dev/null and b/BasicJava/RegexDemo_ipaddress/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_ipaddress/RegexDemo/src/IPAddressValidator.java b/BasicJava/RegexDemo_ipaddress/RegexDemo/src/IPAddressValidator.java
new file mode 100644
index 000000000..f47872c1d
--- /dev/null
+++ b/BasicJava/RegexDemo_ipaddress/RegexDemo/src/IPAddressValidator.java
@@ -0,0 +1,36 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ *
+ * How to validate IP address with regular expression
+ *
+ */
+public class IPAddressValidator
+{
+
+ private Pattern pattern;
+ private Matcher matcher;
+
+ private static final String IP_ADDRESS_REGEX = "^([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\."
+ + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\."
+ + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\."
+ + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])$";
+
+ public IPAddressValidator()
+ {
+ pattern = Pattern.compile(IP_ADDRESS_REGEX);
+ }
+
+ /**
+ * Validate ipAddress with regular expression
+ *
+ * @param ipAddress ip address for validation
+ * @return true valid ip address, false invalid ip address
+ */
+ public boolean validate(final String ipAddress)
+ {
+ matcher = pattern.matcher(ipAddress);
+ return matcher.matches();
+ }
+}
diff --git a/BasicJava/RegexDemo_ipaddress/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_ipaddress/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..9ec16e197
--- /dev/null
+++ b/BasicJava/RegexDemo_ipaddress/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,39 @@
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ *
+ * How to validate IP address with regular expression
+ *
+ */
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+ List validIPList = Arrays.asList("1.1.1.1", "255.255.255.255",
+ "192.168.1.2", "10.10.1.1", "132.253.111.10", "26.10.2.10",
+ "127.0.0.1");
+
+ IPAddressValidator ipAddressValidator = new IPAddressValidator();
+
+
+ for (String ipAddress : validIPList)
+ {
+ System.out.println(ipAddress + " is Valid? = "
+ + ipAddressValidator.validate(ipAddress));
+ }
+
+ System.out.println("--------------------------------------");
+
+ List inValidIPList = Arrays.asList("10.10.10", "222.222.2.999",
+ "10.0.0.a");
+
+ for (String ipAddress : inValidIPList)
+ {
+ System.out.println(ipAddress + " is Valid? = "
+ + ipAddressValidator.validate(ipAddress));
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_logical_operatior_to/RegexDemo/.classpath b/BasicJava/RegexDemo_logical_operatior_to/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_logical_operatior_to/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_logical_operatior_to/RegexDemo/.project b/BasicJava/RegexDemo_logical_operatior_to/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_logical_operatior_to/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_logical_operatior_to/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_logical_operatior_to/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_logical_operatior_to/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_logical_operatior_to/RegexDemo/bin/RegexDemo1.class b/BasicJava/RegexDemo_logical_operatior_to/RegexDemo/bin/RegexDemo1.class
new file mode 100644
index 000000000..7b6d873f4
Binary files /dev/null and b/BasicJava/RegexDemo_logical_operatior_to/RegexDemo/bin/RegexDemo1.class differ
diff --git a/BasicJava/RegexDemo_logical_operatior_to/RegexDemo/bin/RegexDemo2.class b/BasicJava/RegexDemo_logical_operatior_to/RegexDemo/bin/RegexDemo2.class
new file mode 100644
index 000000000..91d4a6eb0
Binary files /dev/null and b/BasicJava/RegexDemo_logical_operatior_to/RegexDemo/bin/RegexDemo2.class differ
diff --git a/BasicJava/RegexDemo_logical_operatior_to/RegexDemo/src/RegexDemo1.java b/BasicJava/RegexDemo_logical_operatior_to/RegexDemo/src/RegexDemo1.java
new file mode 100644
index 000000000..33bbe8659
--- /dev/null
+++ b/BasicJava/RegexDemo_logical_operatior_to/RegexDemo/src/RegexDemo1.java
@@ -0,0 +1,27 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ *
+ * Logical Operators
+ *
+ */
+public class RegexDemo1
+{
+
+ public static void main(String[] args)
+ {
+ /*
+ * The Logical Operator XY matches the X followed by Y.
+ */
+ Pattern pattern = Pattern.compile("to");
+ Matcher matcher = pattern.matcher("Welcome to India");
+
+ while (matcher.find())
+ {
+ System.out.println(matcher.group() + ", Match String start(): "
+ + matcher.start());
+ }
+ }
+
+}
diff --git a/BasicJava/RegexDemo_logical_operatior_to/RegexDemo/src/RegexDemo2.java b/BasicJava/RegexDemo_logical_operatior_to/RegexDemo/src/RegexDemo2.java
new file mode 100644
index 000000000..37897ca0f
--- /dev/null
+++ b/BasicJava/RegexDemo_logical_operatior_to/RegexDemo/src/RegexDemo2.java
@@ -0,0 +1,27 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ *
+ * Logical Operators
+ *
+ */
+public class RegexDemo2
+{
+
+ public static void main(String[] args)
+ {
+ /*
+ * The Logical Operator X|Y matches the X or Y.
+ */
+ Pattern pattern = Pattern.compile("t|o");
+ Matcher matcher = pattern.matcher("Welcome to India");
+
+ while (matcher.find())
+ {
+ System.out.println(matcher.group() + ", Match String start(): "
+ + matcher.start());
+ }
+ }
+
+}
diff --git a/BasicJava/RegexDemo_logical_operatior_to/RegexDemo1_Output.txt b/BasicJava/RegexDemo_logical_operatior_to/RegexDemo1_Output.txt
new file mode 100644
index 000000000..0c4d36275
--- /dev/null
+++ b/BasicJava/RegexDemo_logical_operatior_to/RegexDemo1_Output.txt
@@ -0,0 +1 @@
+to, Match String start(): 8
diff --git a/BasicJava/RegexDemo_logical_operatior_to/RegexDemo2_Output.txt b/BasicJava/RegexDemo_logical_operatior_to/RegexDemo2_Output.txt
new file mode 100644
index 000000000..6b46e1105
--- /dev/null
+++ b/BasicJava/RegexDemo_logical_operatior_to/RegexDemo2_Output.txt
@@ -0,0 +1,3 @@
+o, Match String start(): 4
+t, Match String start(): 8
+o, Match String start(): 9
diff --git a/BasicJava/RegexDemo_lookingAt/Output.txt b/BasicJava/RegexDemo_lookingAt/Output.txt
new file mode 100644
index 000000000..3545dade7
--- /dev/null
+++ b/BasicJava/RegexDemo_lookingAt/Output.txt
@@ -0,0 +1,4 @@
+REGEX is: bar
+INPUT is: barooooooooooooooo
+lookingAt(): true
+matches(): false
diff --git a/BasicJava/RegexDemo_lookingAt/RegexDemo/.classpath b/BasicJava/RegexDemo_lookingAt/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_lookingAt/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_lookingAt/RegexDemo/.project b/BasicJava/RegexDemo_lookingAt/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_lookingAt/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_lookingAt/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_lookingAt/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_lookingAt/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_lookingAt/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_lookingAt/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..4f120c567
Binary files /dev/null and b/BasicJava/RegexDemo_lookingAt/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_lookingAt/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_lookingAt/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..b85d0a6ce
--- /dev/null
+++ b/BasicJava/RegexDemo_lookingAt/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,30 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class RegexDemo
+{
+ private static final String REGEX = "bar";
+ private static final String INPUT = "barooooooooooooooo";
+
+ public static void main(String[] args)
+ {
+ Pattern pattern = Pattern.compile(REGEX);
+ Matcher matcher = pattern.matcher(INPUT);
+
+ System.out.println("REGEX is: " + REGEX);
+ System.out.println("INPUT is: " + INPUT);
+
+ /*
+ * Returns:true if, and only if, a prefix of the input sequence matches
+ * this matcher's pattern.
+ */
+ System.out.println("lookingAt(): " + matcher.lookingAt());
+
+ /*
+ * Returns:true if, and only if, the entire region sequence matches this
+ * matcher's pattern
+ */
+ System.out.println("matches(): " + matcher.matches());
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_matcher_find/Output.txt b/BasicJava/RegexDemo_matcher_find/Output.txt
new file mode 100644
index 000000000..27ba77dda
--- /dev/null
+++ b/BasicJava/RegexDemo_matcher_find/Output.txt
@@ -0,0 +1 @@
+true
diff --git a/BasicJava/RegexDemo_matcher_find/RegexDemo/.classpath b/BasicJava/RegexDemo_matcher_find/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_matcher_find/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_matcher_find/RegexDemo/.project b/BasicJava/RegexDemo_matcher_find/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_matcher_find/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_matcher_find/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_matcher_find/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_matcher_find/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_matcher_find/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_matcher_find/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..c27103380
Binary files /dev/null and b/BasicJava/RegexDemo_matcher_find/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_matcher_find/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_matcher_find/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..300ca1e5b
--- /dev/null
+++ b/BasicJava/RegexDemo_matcher_find/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,42 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class RegexDemo
+{
+ public static void main(String[] args)
+ {
+ String input = "TV Price is 500 Rs";
+ String regex = "(.*)(\\d+)(.*)";
+
+ /*
+ * Parameters:
+ *
+ * regex - The expression to be compiled
+ *
+ * Returns:
+ *
+ * the given regular expression compiled into a pattern
+ *
+ */
+ Pattern patternObj = Pattern.compile(regex);
+
+ /*
+ * Parameters:
+ *
+ * input - The character sequence to be matched
+ *
+ * Returns:
+ *
+ * A new matcher for this pattern
+ */
+ Matcher matcher = patternObj.matcher(input);
+ /*
+ * Returns:
+ *
+ * true if, and only if, a subsequence of the input sequence
+ * matches this matcher's pattern
+ */
+ System.out.println(matcher.find());
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_matches_contains_notstart/Output.txt b/BasicJava/RegexDemo_matches_contains_notstart/Output.txt
new file mode 100644
index 000000000..b893e13da
--- /dev/null
+++ b/BasicJava/RegexDemo_matches_contains_notstart/Output.txt
@@ -0,0 +1,8 @@
+true
+------------------------------------
+false
+true
+------------------------------------
+true
+true
+false
diff --git a/BasicJava/RegexDemo_matches_contains_notstart/RegexDemo/.classpath b/BasicJava/RegexDemo_matches_contains_notstart/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_matches_contains_notstart/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_matches_contains_notstart/RegexDemo/.project b/BasicJava/RegexDemo_matches_contains_notstart/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_matches_contains_notstart/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_matches_contains_notstart/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_matches_contains_notstart/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_matches_contains_notstart/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_matches_contains_notstart/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_matches_contains_notstart/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..556355a63
Binary files /dev/null and b/BasicJava/RegexDemo_matches_contains_notstart/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_matches_contains_notstart/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_matches_contains_notstart/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..e108c4bdd
--- /dev/null
+++ b/BasicJava/RegexDemo_matches_contains_notstart/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,30 @@
+import java.util.regex.Pattern;
+
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+ /*
+ * returns true if the string contains "abc" at any place
+ */
+ System.out.println(Pattern.matches(".*abc.*", "deabcpq"));// True
+
+ System.out.println("------------------------------------");
+
+ /*
+ * returns true if the string does not have a number at the beginning
+ */
+ System.out.println(Pattern.matches("^[^\\d].*", "123abc")); // False
+ System.out.println(Pattern.matches("^[^\\d].*", "abc123")); // True
+
+ System.out.println("------------------------------------");
+
+ // returns true if the string contains of three letters
+ System.out.println(Pattern.matches("[a-zA-Z][a-zA-Z][a-zA-Z]", "aPz"));// True
+ System.out.println(Pattern.matches("[a-zA-Z][a-zA-Z][a-zA-Z]", "aAA"));// True
+ System.out.println(Pattern.matches("[a-zA-Z][a-zA-Z][a-zA-Z]", "apZx"));// False
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_metachar_d/RegexDemo/.classpath b/BasicJava/RegexDemo_metachar_d/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_metachar_d/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_metachar_d/RegexDemo/.project b/BasicJava/RegexDemo_metachar_d/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_metachar_d/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_metachar_d/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_metachar_d/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_metachar_d/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_metachar_d/RegexDemo/bin/RegexDemo1.class b/BasicJava/RegexDemo_metachar_d/RegexDemo/bin/RegexDemo1.class
new file mode 100644
index 000000000..70af276ef
Binary files /dev/null and b/BasicJava/RegexDemo_metachar_d/RegexDemo/bin/RegexDemo1.class differ
diff --git a/BasicJava/RegexDemo_metachar_d/RegexDemo/bin/RegexDemo2.class b/BasicJava/RegexDemo_metachar_d/RegexDemo/bin/RegexDemo2.class
new file mode 100644
index 000000000..498f87251
Binary files /dev/null and b/BasicJava/RegexDemo_metachar_d/RegexDemo/bin/RegexDemo2.class differ
diff --git a/BasicJava/RegexDemo_metachar_d/RegexDemo/bin/RegexDemo3.class b/BasicJava/RegexDemo_metachar_d/RegexDemo/bin/RegexDemo3.class
new file mode 100644
index 000000000..9842a3392
Binary files /dev/null and b/BasicJava/RegexDemo_metachar_d/RegexDemo/bin/RegexDemo3.class differ
diff --git a/BasicJava/RegexDemo_metachar_d/RegexDemo/src/RegexDemo1.java b/BasicJava/RegexDemo_metachar_d/RegexDemo/src/RegexDemo1.java
new file mode 100644
index 000000000..27f6d2fe8
--- /dev/null
+++ b/BasicJava/RegexDemo_metachar_d/RegexDemo/src/RegexDemo1.java
@@ -0,0 +1,39 @@
+import java.util.regex.Pattern;
+
+/**
+ *
+ * \d = Any digits, short of [0-9]
+ *
+ */
+
+public class RegexDemo1
+{
+ public static void main(String[] args)
+ {
+ System.out.println("metacharacters d");
+
+ /*
+ * Parameters:
+ *
+ * regex - The expression to be compiled
+ *
+ * input - The character sequence to be matched
+ *
+ * Returns:
+ *
+ * whether or not the regular expression matches on the input
+ *
+ */
+
+ System.out.println(Pattern.matches("\\d", "9"));//true (digit and comes once)
+ System.out.println(Pattern.matches("\\d", "dfg"));//false (non-digit)
+ System.out.println(Pattern.matches("\\d", "8888"));//false (digit but comes more than once)
+ System.out.println(Pattern.matches("\\d", "555abc"));//false (digit and char)
+
+ System.out.println("----------------------------------");
+
+ System.out.println("metacharacters d with quantifier....");
+ System.out.println(Pattern.matches("\\d*", "56565"));//true (digit may come 0 or more times)
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_metachar_d/RegexDemo/src/RegexDemo2.java b/BasicJava/RegexDemo_metachar_d/RegexDemo/src/RegexDemo2.java
new file mode 100644
index 000000000..707b5ddfe
--- /dev/null
+++ b/BasicJava/RegexDemo_metachar_d/RegexDemo/src/RegexDemo2.java
@@ -0,0 +1,38 @@
+import java.util.regex.Pattern;
+
+/**
+ *
+ * \D = Any non-digit, short for [^0-9]
+ *
+ */
+public class RegexDemo2
+{
+ public static void main(String[] args)
+ {
+ System.out.println("metacharacters D..");
+ /*
+ * Parameters:
+ *
+ * regex - The expression to be compiled
+ *
+ * input - The character sequence to be matched
+ *
+ * Returns:
+ *
+ * whether or not the regular expression matches on the input
+ *
+ */
+ System.out.println(Pattern.matches("\\D", "m"));//true (non-digit and comes once)
+ System.out.println(Pattern.matches("\\D", "xds"));//false (non-digit but comes more than once)
+ System.out.println(Pattern.matches("\\D", "1"));//false (digit)
+ System.out.println(Pattern.matches("\\D", "8989"));//false (digit)
+ System.out.println(Pattern.matches("\\D", "121abc"));//false (digit and char)
+
+ System.out.println("----------------------------------");
+
+ System.out.println("metacharacters D with quantifier....");
+ System.out.println(Pattern.matches("\\D*", "peter"));//true (non-digit and may come 0 or more times)
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_metachar_d/RegexDemo/src/RegexDemo3.java b/BasicJava/RegexDemo_metachar_d/RegexDemo/src/RegexDemo3.java
new file mode 100644
index 000000000..f703fccf9
--- /dev/null
+++ b/BasicJava/RegexDemo_metachar_d/RegexDemo/src/RegexDemo3.java
@@ -0,0 +1,31 @@
+import java.util.regex.Pattern;
+
+/**
+ *
+ * . = Any character (may or may not match terminator)
+ *
+ */
+public class RegexDemo3
+{
+ public static void main(String[] args)
+ {
+ /*
+ * Parameters:
+ *
+ * regex - The expression to be compiled
+ *
+ * input - The character sequence to be matched
+ *
+ * Returns:
+ *
+ * whether or not the regular expression matches on the input
+ *
+ */
+ System.out.println(Pattern.matches(".", "m"));//true [char and comes once]
+ System.out.println(Pattern.matches(".", "8"));//true [char and comes once]
+ System.out.println(Pattern.matches(".", "99"));//false [char but comes more than once]
+ System.out.println(Pattern.matches(".", "uiui"));//false [char but comes more than once]
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_metachar_d/RegexDemo1_Output.txt b/BasicJava/RegexDemo_metachar_d/RegexDemo1_Output.txt
new file mode 100644
index 000000000..7a988deee
--- /dev/null
+++ b/BasicJava/RegexDemo_metachar_d/RegexDemo1_Output.txt
@@ -0,0 +1,8 @@
+metacharacters d
+true
+false
+false
+false
+----------------------------------
+metacharacters d with quantifier....
+true
diff --git a/BasicJava/RegexDemo_metachar_d/RegexDemo2_Output.txt b/BasicJava/RegexDemo_metachar_d/RegexDemo2_Output.txt
new file mode 100644
index 000000000..e239b2b12
--- /dev/null
+++ b/BasicJava/RegexDemo_metachar_d/RegexDemo2_Output.txt
@@ -0,0 +1,9 @@
+metacharacters D..
+true
+false
+false
+false
+false
+----------------------------------
+metacharacters D with quantifier....
+true
diff --git a/BasicJava/RegexDemo_metachar_d/RegexDemo3_Output.txt b/BasicJava/RegexDemo_metachar_d/RegexDemo3_Output.txt
new file mode 100644
index 000000000..5f8cc1d19
--- /dev/null
+++ b/BasicJava/RegexDemo_metachar_d/RegexDemo3_Output.txt
@@ -0,0 +1,4 @@
+true
+true
+false
+false
diff --git a/BasicJava/RegexDemo_metachar_dot_cal/Output.txt b/BasicJava/RegexDemo_metachar_dot_cal/Output.txt
new file mode 100644
index 000000000..b3aa690e6
--- /dev/null
+++ b/BasicJava/RegexDemo_metachar_dot_cal/Output.txt
@@ -0,0 +1,2 @@
+Number of Matches = 6
+Number of Matches = 1
diff --git a/BasicJava/RegexDemo_metachar_dot_cal/RegexDemo/.classpath b/BasicJava/RegexDemo_metachar_dot_cal/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_metachar_dot_cal/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_metachar_dot_cal/RegexDemo/.project b/BasicJava/RegexDemo_metachar_dot_cal/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_metachar_dot_cal/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_metachar_dot_cal/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_metachar_dot_cal/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_metachar_dot_cal/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_metachar_dot_cal/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_metachar_dot_cal/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..616192332
Binary files /dev/null and b/BasicJava/RegexDemo_metachar_dot_cal/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_metachar_dot_cal/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_metachar_dot_cal/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..3b46165dd
--- /dev/null
+++ b/BasicJava/RegexDemo_metachar_dot_cal/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,47 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * Meta Characters example
+ */
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+ /*
+ * Meta characters affect the way a pattern is matched, in a
+ * way adding logic to the search pattern. The Java API
+ * supports several metacharacters, the most straightforward
+ * being the dot “.” which matches any character:
+ */
+ calculateMatches(".", "foofoo");
+ /*
+ * Notice the dot after the foo in the regex. The matcher
+ * matches every text that is preceded by foo since the last
+ * dot part means any character after. So after finding the
+ * first foo, the rest is seen as any character. That is why
+ * there is only a single match.
+ */
+ calculateMatches("foo.", "foofoo");
+ }
+
+ private static void calculateMatches(String regex, String inputText)
+ {
+ Pattern pattern = Pattern.compile(regex);
+ Matcher matcher = pattern.matcher(inputText);
+ int matches = 0;
+
+ /*
+ * The find method keeps advancing through the input text and
+ * returns true for every match, so we can use it to find the
+ * match count as well:
+ */
+ while (matcher.find())
+ {
+ ++matches;
+ }
+ System.out.println("Number of Matches = " + matches);
+ }
+
+}
diff --git a/BasicJava/RegexDemo_metachar_nor_class/Output.txt b/BasicJava/RegexDemo_metachar_nor_class/Output.txt
new file mode 100644
index 000000000..5652e460e
--- /dev/null
+++ b/BasicJava/RegexDemo_metachar_nor_class/Output.txt
@@ -0,0 +1,3 @@
+Number of Matches = 1
+Number of Matches = 2
+Number of Matches = 3
diff --git a/BasicJava/RegexDemo_metachar_nor_class/RegexDemo/.classpath b/BasicJava/RegexDemo_metachar_nor_class/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_metachar_nor_class/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_metachar_nor_class/RegexDemo/.project b/BasicJava/RegexDemo_metachar_nor_class/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_metachar_nor_class/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_metachar_nor_class/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_metachar_nor_class/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_metachar_nor_class/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_metachar_nor_class/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_metachar_nor_class/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..7424e2ab5
Binary files /dev/null and b/BasicJava/RegexDemo_metachar_nor_class/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_metachar_nor_class/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_metachar_nor_class/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..c9841d247
--- /dev/null
+++ b/BasicJava/RegexDemo_metachar_nor_class/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,36 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+/**
+ *
+ * NOR Class Example
+ *
+ */
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+ calculateMatches("[^abc]", "z");
+ calculateMatches("[^bcr]at", "sat mat");
+ calculateMatches("[^bcr]at", "sat mat eat bat cat");
+ }
+
+ private static void calculateMatches(String regex, String inputText)
+ {
+ Pattern pattern = Pattern.compile(regex);
+ Matcher matcher = pattern.matcher(inputText);
+ int matches = 0;
+
+ /*
+ * The find method keeps advancing through the input text and
+ * returns true for every match, so we can use it to find the
+ * match count as well:
+ */
+ while (matcher.find())
+ {
+ ++matches;
+ }
+ System.out.println("Number of Matches = " + matches);
+ }
+
+}
diff --git a/BasicJava/RegexDemo_metachar_or_class/Output.txt b/BasicJava/RegexDemo_metachar_or_class/Output.txt
new file mode 100644
index 000000000..9e940a47f
--- /dev/null
+++ b/BasicJava/RegexDemo_metachar_or_class/Output.txt
@@ -0,0 +1,4 @@
+Number of Matches = 1
+Number of Matches = 3
+Number of Matches = 2
+Number of Matches = 3
diff --git a/BasicJava/RegexDemo_metachar_or_class/RegexDemo/.classpath b/BasicJava/RegexDemo_metachar_or_class/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_metachar_or_class/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_metachar_or_class/RegexDemo/.project b/BasicJava/RegexDemo_metachar_or_class/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_metachar_or_class/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_metachar_or_class/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_metachar_or_class/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_metachar_or_class/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_metachar_or_class/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_metachar_or_class/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..31c561689
Binary files /dev/null and b/BasicJava/RegexDemo_metachar_or_class/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_metachar_or_class/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_metachar_or_class/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..f6392b8f1
--- /dev/null
+++ b/BasicJava/RegexDemo_metachar_or_class/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,47 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * OR Class Example
+ */
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+ /*
+ * [abc] - Any of the elements in the set is matched
+ */
+ calculateMatches("[abc]", "b");
+ calculateMatches("[abc]", "cab");
+ calculateMatches("[abc]", "caABZ9");
+
+ /*
+ * They can also be alternated as part of a String. In the
+ * following example, when we create different words by
+ * alternating the first letter with each element of the set,
+ * they are all matched:
+ */
+ calculateMatches("[bcr]at", "bat cat rat zat");
+
+ }
+
+ private static void calculateMatches(String regex, String inputText)
+ {
+ Pattern pattern = Pattern.compile(regex);
+ Matcher matcher = pattern.matcher(inputText);
+ int matches = 0;
+
+ /*
+ * The find method keeps advancing through the input text and
+ * returns true for every match, so we can use it to find the
+ * match count as well:
+ */
+ while (matcher.find())
+ {
+ ++matches;
+ }
+ System.out.println("Number of Matches = " + matches);
+ }
+
+}
diff --git a/BasicJava/RegexDemo_metachar_range_class/Output.txt b/BasicJava/RegexDemo_metachar_range_class/Output.txt
new file mode 100644
index 000000000..8a0b3fd2a
--- /dev/null
+++ b/BasicJava/RegexDemo_metachar_range_class/Output.txt
@@ -0,0 +1,4 @@
+Number of Matches = 3
+Number of Matches = 2
+Number of Matches = 3
+Number of Matches = 1
diff --git a/BasicJava/RegexDemo_metachar_range_class/RegexDemo/.classpath b/BasicJava/RegexDemo_metachar_range_class/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_metachar_range_class/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_metachar_range_class/RegexDemo/.project b/BasicJava/RegexDemo_metachar_range_class/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_metachar_range_class/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_metachar_range_class/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_metachar_range_class/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_metachar_range_class/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_metachar_range_class/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_metachar_range_class/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..17503f6ca
Binary files /dev/null and b/BasicJava/RegexDemo_metachar_range_class/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_metachar_range_class/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_metachar_range_class/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..8ea8699e6
--- /dev/null
+++ b/BasicJava/RegexDemo_metachar_range_class/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,50 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+/**
+ *
+ * Range Class Example
+ *
+ */
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+ /*
+ * Matching uppercase letters:
+ */
+ calculateMatches( "[A-Z]", "Welcome To India");
+ /*
+ * Matching lowercase letters:
+ */
+ calculateMatches( "[a-z]", "Two");
+ /*
+ * Matching both upper case and lower case letters:
+ */
+ calculateMatches("[a-zA-Z]", "Two");
+ /*
+ * Matching a given range of numbers:
+ */
+ calculateMatches( "[1-5]", "hi 65");
+
+ }
+
+ private static void calculateMatches(String regex, String inputText)
+ {
+ Pattern pattern = Pattern.compile(regex);
+ Matcher matcher = pattern.matcher(inputText);
+ int matches = 0;
+
+ /*
+ * The find method keeps advancing through the input text and
+ * returns true for every match, so we can use it to find the
+ * match count as well:
+ */
+ while (matcher.find())
+ {
+ ++matches;
+ }
+ System.out.println("Number of Matches = " + matches);
+ }
+
+}
diff --git a/BasicJava/RegexDemo_metachars_slash_s/RegexDemo/.classpath b/BasicJava/RegexDemo_metachars_slash_s/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_metachars_slash_s/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_metachars_slash_s/RegexDemo/.project b/BasicJava/RegexDemo_metachars_slash_s/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_metachars_slash_s/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_metachars_slash_s/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_metachars_slash_s/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_metachars_slash_s/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_metachars_slash_s/RegexDemo/bin/RegexDemo1.class b/BasicJava/RegexDemo_metachars_slash_s/RegexDemo/bin/RegexDemo1.class
new file mode 100644
index 000000000..5ef79948b
Binary files /dev/null and b/BasicJava/RegexDemo_metachars_slash_s/RegexDemo/bin/RegexDemo1.class differ
diff --git a/BasicJava/RegexDemo_metachars_slash_s/RegexDemo/bin/RegexDemo2.class b/BasicJava/RegexDemo_metachars_slash_s/RegexDemo/bin/RegexDemo2.class
new file mode 100644
index 000000000..7ed1696ff
Binary files /dev/null and b/BasicJava/RegexDemo_metachars_slash_s/RegexDemo/bin/RegexDemo2.class differ
diff --git a/BasicJava/RegexDemo_metachars_slash_s/RegexDemo/src/RegexDemo1.java b/BasicJava/RegexDemo_metachars_slash_s/RegexDemo/src/RegexDemo1.java
new file mode 100644
index 000000000..8d1ec9536
--- /dev/null
+++ b/BasicJava/RegexDemo_metachars_slash_s/RegexDemo/src/RegexDemo1.java
@@ -0,0 +1,41 @@
+import java.util.regex.Pattern;
+
+/**
+ *
+ * \s = Any whitespace character should come only one time, short for [\t\n\x0B\f\r]
+ *
+ */
+
+public class RegexDemo1
+{
+ public static void main(String[] args)
+ {
+ System.out.println("metacharacters s");
+ /*
+ * Parameters:
+ *
+ * regex - The expression to be compiled
+ *
+ * input - The character sequence to be matched
+ *
+ * Returns:
+ *
+ * whether or not the regular expression matches on the input
+ *
+ */
+ System.out.println(Pattern.matches("\\s", " "));//true [Only one whitespace can come]
+ System.out.println(Pattern.matches("\\s", "\t"));//true [Only one whitespace can come]
+ System.out.println(Pattern.matches("\\s", "\n"));//true [Only one whitespace can come]
+ System.out.println(Pattern.matches("\\s", "\f"));//true [Only one whitespace can come]
+ System.out.println(Pattern.matches("\\s", " "));//false [Only one whitespace can come, but more whitespaces]
+ System.out.println(Pattern.matches("\\s", "\t\t"));//false [Only one whitespace can come, but more whitespaces]
+ System.out.println(Pattern.matches("\\s", "ab"));//false [not a whitespace]
+
+ System.out.println("----------------------------------");
+
+ System.out.println("metacharacters s with quantifier....");
+ System.out.println(Pattern.matches("\\s*", " "));//true [more than one whitespace can come]
+ System.out.println(Pattern.matches("\\s*", "\r\r"));//true [more than one whitespace can come]
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_metachars_slash_s/RegexDemo/src/RegexDemo2.java b/BasicJava/RegexDemo_metachars_slash_s/RegexDemo/src/RegexDemo2.java
new file mode 100644
index 000000000..297fab9a3
--- /dev/null
+++ b/BasicJava/RegexDemo_metachars_slash_s/RegexDemo/src/RegexDemo2.java
@@ -0,0 +1,40 @@
+import java.util.regex.Pattern;
+
+/**
+ *
+ * \S = Any non-whitespace character Should come only one time, short for [^\s]
+ *
+ */
+
+public class RegexDemo2
+{
+ public static void main(String[] args)
+ {
+ System.out.println("metacharacters S");
+ /*
+ * Parameters:
+ *
+ * regex - The expression to be compiled
+ *
+ * input - The character sequence to be matched
+ *
+ * Returns:
+ *
+ * whether or not the regular expression matches on the input
+ *
+ */
+ System.out.println(Pattern.matches("\\S", "a"));//true
+ System.out.println(Pattern.matches("\\S", "ab"));//false
+ System.out.println(Pattern.matches("\\S", " "));//false
+ System.out.println(Pattern.matches("\\S", "\t"));//false
+ System.out.println(Pattern.matches("\\S", "\n"));//false
+ System.out.println(Pattern.matches("\\S", "\f"));//false
+
+
+ System.out.println("----------------------------------");
+
+ System.out.println("metacharacters S with quantifier....");
+ System.out.println(Pattern.matches("\\S*", "peter"));//true
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_metachars_slash_s/RegexDemo1_Output.txt b/BasicJava/RegexDemo_metachars_slash_s/RegexDemo1_Output.txt
new file mode 100644
index 000000000..de9e84508
--- /dev/null
+++ b/BasicJava/RegexDemo_metachars_slash_s/RegexDemo1_Output.txt
@@ -0,0 +1,12 @@
+metacharacters s
+true
+true
+true
+true
+false
+false
+false
+----------------------------------
+metacharacters s with quantifier....
+true
+true
diff --git a/BasicJava/RegexDemo_metachars_slash_s/RegexDemo2_Output.txt b/BasicJava/RegexDemo_metachars_slash_s/RegexDemo2_Output.txt
new file mode 100644
index 000000000..e3c75950c
--- /dev/null
+++ b/BasicJava/RegexDemo_metachars_slash_s/RegexDemo2_Output.txt
@@ -0,0 +1,10 @@
+metacharacters S
+true
+false
+false
+false
+false
+false
+----------------------------------
+metacharacters S with quantifier....
+true
diff --git a/BasicJava/RegexDemo_metachars_slash_w/RegexDemo/.classpath b/BasicJava/RegexDemo_metachars_slash_w/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_metachars_slash_w/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_metachars_slash_w/RegexDemo/.project b/BasicJava/RegexDemo_metachars_slash_w/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_metachars_slash_w/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_metachars_slash_w/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_metachars_slash_w/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_metachars_slash_w/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_metachars_slash_w/RegexDemo/bin/RegexDemo1.class b/BasicJava/RegexDemo_metachars_slash_w/RegexDemo/bin/RegexDemo1.class
new file mode 100644
index 000000000..780e4d511
Binary files /dev/null and b/BasicJava/RegexDemo_metachars_slash_w/RegexDemo/bin/RegexDemo1.class differ
diff --git a/BasicJava/RegexDemo_metachars_slash_w/RegexDemo/bin/RegexDemo2.class b/BasicJava/RegexDemo_metachars_slash_w/RegexDemo/bin/RegexDemo2.class
new file mode 100644
index 000000000..8cf1a06f5
Binary files /dev/null and b/BasicJava/RegexDemo_metachars_slash_w/RegexDemo/bin/RegexDemo2.class differ
diff --git a/BasicJava/RegexDemo_metachars_slash_w/RegexDemo/src/RegexDemo1.java b/BasicJava/RegexDemo_metachars_slash_w/RegexDemo/src/RegexDemo1.java
new file mode 100644
index 000000000..b9268336e
--- /dev/null
+++ b/BasicJava/RegexDemo_metachars_slash_w/RegexDemo/src/RegexDemo1.java
@@ -0,0 +1,38 @@
+import java.util.regex.Pattern;
+
+/**
+ *
+ * \w = Any word character, short for [a-zA-Z_0-9]
+ *
+ */
+
+public class RegexDemo1
+{
+ public static void main(String[] args)
+ {
+ System.out.println("metacharacters w");
+ /*
+ * Parameters:
+ *
+ * regex - The expression to be compiled
+ *
+ * input - The character sequence to be matched
+ *
+ * Returns:
+ *
+ * whether or not the regular expression matches on the input
+ *
+ */
+ System.out.println(Pattern.matches("\\w", "a"));//true
+ System.out.println(Pattern.matches("\\w", "9"));//true
+ System.out.println(Pattern.matches("\\w", "_"));//true
+ System.out.println(Pattern.matches("\\w", "a9"));//false
+
+ System.out.println("----------------------------------");
+
+ System.out.println("metacharacters w with quantifier....");
+ System.out.println(Pattern.matches("\\w*", "peter_99"));//true
+ System.out.println(Pattern.matches("\\w*", "peter_99@"));//false
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_metachars_slash_w/RegexDemo/src/RegexDemo2.java b/BasicJava/RegexDemo_metachars_slash_w/RegexDemo/src/RegexDemo2.java
new file mode 100644
index 000000000..c13b7bb9c
--- /dev/null
+++ b/BasicJava/RegexDemo_metachars_slash_w/RegexDemo/src/RegexDemo2.java
@@ -0,0 +1,38 @@
+import java.util.regex.Pattern;
+
+/**
+ *
+ * \W = Any non-word character, short for [^\w]
+ *
+ */
+
+public class RegexDemo2
+{
+ public static void main(String[] args)
+ {
+ System.out.println("metacharacters W");
+ /*
+ * Parameters:
+ *
+ * regex - The expression to be compiled
+ *
+ * input - The character sequence to be matched
+ *
+ * Returns:
+ *
+ * whether or not the regular expression matches on the input
+ *
+ */
+ System.out.println(Pattern.matches("\\W", "@"));//true
+ System.out.println(Pattern.matches("\\W", "a"));//false
+ System.out.println(Pattern.matches("\\W", "9"));//false
+ System.out.println(Pattern.matches("\\W", "@@"));//false
+
+ System.out.println("----------------------------------");
+
+ System.out.println("metacharacters W with quantifier....");
+ System.out.println(Pattern.matches("\\W*", "@@"));//true
+ System.out.println(Pattern.matches("\\W*", "@@peter"));//false
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_metachars_slash_w/RegexDemo1_Output.txt b/BasicJava/RegexDemo_metachars_slash_w/RegexDemo1_Output.txt
new file mode 100644
index 000000000..20da6361c
--- /dev/null
+++ b/BasicJava/RegexDemo_metachars_slash_w/RegexDemo1_Output.txt
@@ -0,0 +1,9 @@
+metacharacters w
+true
+true
+true
+false
+----------------------------------
+metacharacters w with quantifier....
+true
+false
diff --git a/BasicJava/RegexDemo_metachars_slash_w/RegexDemo2_Output.txt b/BasicJava/RegexDemo_metachars_slash_w/RegexDemo2_Output.txt
new file mode 100644
index 000000000..63f24da49
--- /dev/null
+++ b/BasicJava/RegexDemo_metachars_slash_w/RegexDemo2_Output.txt
@@ -0,0 +1,9 @@
+metacharacters W
+true
+false
+false
+false
+----------------------------------
+metacharacters W with quantifier....
+true
+false
diff --git a/BasicJava/RegexDemo_modify_phno/Output.txt b/BasicJava/RegexDemo_modify_phno/Output.txt
new file mode 100644
index 000000000..fbfe0a851
--- /dev/null
+++ b/BasicJava/RegexDemo_modify_phno/Output.txt
@@ -0,0 +1,3 @@
+Masking: 9898988988
+Masking: 7777766555
+Peter PhoneNumber=***masked***. Juli PhoneNumber=***masked***
diff --git a/BasicJava/RegexDemo_modify_phno/RegexDemo/.classpath b/BasicJava/RegexDemo_modify_phno/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_modify_phno/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_modify_phno/RegexDemo/.project b/BasicJava/RegexDemo_modify_phno/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_modify_phno/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_modify_phno/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_modify_phno/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_modify_phno/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_modify_phno/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_modify_phno/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..e318e560e
Binary files /dev/null and b/BasicJava/RegexDemo_modify_phno/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_modify_phno/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_modify_phno/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..f4e9a2f10
--- /dev/null
+++ b/BasicJava/RegexDemo_modify_phno/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,33 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ *
+ * Modifying/Substitution:
+ *
+ * Values in text can be replaced with new values, for example, you could
+ * replace all instances of the word ‘PhoneNumber=’, followed by a number, with a
+ * mask to hide the original text.
+ *
+ */
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+ String inputCharSeq = "Peter PhoneNumber=9898988988. Juli PhoneNumber=7777766555";
+
+ Pattern pattern = Pattern.compile("(PhoneNumber=)(\\d+)");
+ Matcher matcher = pattern.matcher(inputCharSeq);
+
+ StringBuffer sb = new StringBuffer();
+ while (matcher.find())
+ {
+ System.out.println("Masking: " + matcher.group(2));
+ matcher.appendReplacement(sb, matcher.group(1) + "***masked***");
+ }
+ matcher.appendTail(sb);
+ System.out.println(sb);
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_multiline_flag/Output.txt b/BasicJava/RegexDemo_multiline_flag/Output.txt
new file mode 100644
index 000000000..d2d534b44
--- /dev/null
+++ b/BasicJava/RegexDemo_multiline_flag/Output.txt
@@ -0,0 +1,3 @@
+This is a dog
+this is a fox
+Number of Matches = 1
diff --git a/BasicJava/RegexDemo_multiline_flag/RegexDemo/.classpath b/BasicJava/RegexDemo_multiline_flag/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_multiline_flag/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_multiline_flag/RegexDemo/.project b/BasicJava/RegexDemo_multiline_flag/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_multiline_flag/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_multiline_flag/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_multiline_flag/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_multiline_flag/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_multiline_flag/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_multiline_flag/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..3767a9296
Binary files /dev/null and b/BasicJava/RegexDemo_multiline_flag/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_multiline_flag/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_multiline_flag/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..438a2d7a4
--- /dev/null
+++ b/BasicJava/RegexDemo_multiline_flag/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,55 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ *
+ * Flags
+ *
+ */
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+
+ String inputText = "This is a dog"
+ + System.getProperty("line.separator") + "this is a fox";
+
+ System.out.println(inputText);
+
+ /*
+ * Pattern.MULTILINE
+ *
+ * With out Pattern.MULTILINE flag The match fails because the
+ * matcher searches for dog at the end of the entire String
+ * but the dog is present at the end of the first line of the
+ * string.
+ *
+ * However, with the Pattern.MULTILINE flag, the same test
+ * will pass since the matcher now takes into account line
+ * terminators. So the String dog is found just before the
+ * line terminates, hence success:
+ */
+ calculateMatches("dog$", inputText, Pattern.MULTILINE);
+ }
+
+ private static void calculateMatches(String regex, String inputText,
+ int flag)
+ {
+ Pattern pattern = Pattern.compile(regex, flag);
+ Matcher matcher = pattern.matcher(inputText);
+ int matches = 0;
+
+ /*
+ * The find method keeps advancing through the input text and
+ * returns true for every match, so we can use it to find the
+ * match count as well:
+ */
+ while (matcher.find())
+ {
+ ++matches;
+ }
+ System.out.println("Number of Matches = " + matches);
+ }
+
+}
diff --git a/BasicJava/RegexDemo_multiple_occ_is/Output.txt b/BasicJava/RegexDemo_multiple_occ_is/Output.txt
new file mode 100644
index 000000000..9396c5afb
--- /dev/null
+++ b/BasicJava/RegexDemo_multiple_occ_is/Output.txt
@@ -0,0 +1,4 @@
+found: 1 : 2 - 4
+found: 2 : 5 - 7
+found: 3 : 23 - 25
+found: 4 : 70 - 72
diff --git a/BasicJava/RegexDemo_multiple_occ_is/RegexDemo/.classpath b/BasicJava/RegexDemo_multiple_occ_is/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_multiple_occ_is/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_multiple_occ_is/RegexDemo/.project b/BasicJava/RegexDemo_multiple_occ_is/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_multiple_occ_is/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_multiple_occ_is/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_multiple_occ_is/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_multiple_occ_is/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_multiple_occ_is/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_multiple_occ_is/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..8a665d2af
Binary files /dev/null and b/BasicJava/RegexDemo_multiple_occ_is/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_multiple_occ_is/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_multiple_occ_is/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..0a7598818
--- /dev/null
+++ b/BasicJava/RegexDemo_multiple_occ_is/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,42 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * Java regex example which uses the Matcher class to locate multiple
+ * occurrences of the substring "is" inside a text: *
+ *
+ */
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+ String inputCharSeq = "This is the text which is to be searched "
+ + "for occurrences of the word 'is'.";
+
+ String regex = "is";
+
+ /*
+ * Compiles the given regular expression into a pattern.
+ */
+ Pattern pattern = Pattern.compile(regex);
+ /*
+ * Returns:A new matcher for this pattern
+ */
+ Matcher matcher = pattern.matcher(inputCharSeq);
+
+ int count = 0;
+ /*
+ * Returns:true if, and only if, a subsequence of the input
+ * sequence matches this matcher's pattern
+ */
+ while (matcher.find())
+ {
+ count++;
+ System.out.println("found: " + count + " : "
+ + matcher.start() + " - " + matcher.end());
+ }
+
+ }
+
+}
diff --git a/BasicJava/RegexDemo_nested_group_john/Output.txt b/BasicJava/RegexDemo_nested_group_john/Output.txt
new file mode 100644
index 000000000..fbdbb68be
--- /dev/null
+++ b/BasicJava/RegexDemo_nested_group_john/Output.txt
@@ -0,0 +1,12 @@
+Group1 = John writes
+Group2 = John
+Group3 = writes
+--------------------------------
+Group1 = John Doe
+Group2 = John
+Group3 = Doe
+--------------------------------
+Group1 = John Wayne
+Group2 = John
+Group3 = Wayne
+--------------------------------
diff --git a/BasicJava/RegexDemo_nested_group_john/RegexDemo/.classpath b/BasicJava/RegexDemo_nested_group_john/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_nested_group_john/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_nested_group_john/RegexDemo/.project b/BasicJava/RegexDemo_nested_group_john/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_nested_group_john/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_nested_group_john/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_nested_group_john/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_nested_group_john/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_nested_group_john/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_nested_group_john/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..398802844
Binary files /dev/null and b/BasicJava/RegexDemo_nested_group_john/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_nested_group_john/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_nested_group_john/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..827e708bb
--- /dev/null
+++ b/BasicJava/RegexDemo_nested_group_john/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,47 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * Groups Inside Groups
+ *
+ * It is possible to have groups inside group in a regular
+ * expression.
+ *
+ */
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+ String text = "John writes about this, and John Doe writes about that,"
+ + " and John Wayne writes about everything.";
+
+ /*
+ * Notice how the two groups from the examples earlier are now
+ * nested inside a larger group. (again, you cannot see the
+ * space at the end of the expression, but it is there).
+ *
+ * When groups are nested inside each other, they are numbered
+ * based on when the left paranthesis of the group is met.
+ * Thus, group 1 is the big group. Group 2 is the group with
+ * the expression John inside. Group 3 is the group with the
+ * expression .+? inside. This is important to know when you
+ * need to reference the groups via the groups(int groupNo)
+ * method.
+ */
+
+ String regex = "((John) (.+?)) ";
+
+ Pattern pattern = Pattern.compile(regex);
+ Matcher matcher = pattern.matcher(text);
+
+ while (matcher.find())
+ {
+ System.out.println("Group1 = "+matcher.group(1));
+ System.out.println("Group2 = "+matcher.group(2));
+ System.out.println("Group3 = "+matcher.group(3));
+ System.out.println("--------------------------------");
+ }
+ }
+
+}
diff --git a/BasicJava/RegexDemo_password/Output.txt b/BasicJava/RegexDemo_password/Output.txt
new file mode 100644
index 000000000..4ca0c8bb8
--- /dev/null
+++ b/BasicJava/RegexDemo_password/Output.txt
@@ -0,0 +1,9 @@
+'peter1AB@' is valid? = true
+'peter4COW$' is valid? = true
+'peter78Dog%#' is valid? = true
+--------------------------------------------------
+'p1AB@' is valid? = false
+'peter1@' is valid? = false
+'peterAB2*' is valid? = false
+'peterAB$' is valid? = false
+'PETER2$' is valid? = false
diff --git a/BasicJava/RegexDemo_password/RegexDemo/.classpath b/BasicJava/RegexDemo_password/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_password/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_password/RegexDemo/.project b/BasicJava/RegexDemo_password/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_password/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_password/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_password/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_password/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_password/RegexDemo/bin/PasswordValidator.class b/BasicJava/RegexDemo_password/RegexDemo/bin/PasswordValidator.class
new file mode 100644
index 000000000..aa73a85d7
Binary files /dev/null and b/BasicJava/RegexDemo_password/RegexDemo/bin/PasswordValidator.class differ
diff --git a/BasicJava/RegexDemo_password/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_password/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..d1e053bbd
Binary files /dev/null and b/BasicJava/RegexDemo_password/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_password/RegexDemo/src/PasswordValidator.java b/BasicJava/RegexDemo_password/RegexDemo/src/PasswordValidator.java
new file mode 100644
index 000000000..87da31559
--- /dev/null
+++ b/BasicJava/RegexDemo_password/RegexDemo/src/PasswordValidator.java
@@ -0,0 +1,34 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ *
+ * How to validate password with regular expression
+ *
+ */
+public class PasswordValidator
+{
+ private Pattern pattern;
+ private Matcher matcher;
+
+ private static final String PASSWORD_REGEX =
+ "((?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[@#$%]).{6,20})";
+
+ public PasswordValidator()
+ {
+ pattern = Pattern.compile(PASSWORD_REGEX);
+ }
+
+ /**
+ * Validate password with regular expression
+ *
+ * @param password password for validation
+ * @return true valid password, false invalid password
+ */
+ public boolean validate(final String password)
+ {
+ matcher = pattern.matcher(password);
+ return matcher.matches();
+ }
+
+}
diff --git a/BasicJava/RegexDemo_password/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_password/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..edb82f735
--- /dev/null
+++ b/BasicJava/RegexDemo_password/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,49 @@
+/**
+ *
+ * How to validate password with regular expression
+ *
+ */
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+ PasswordValidator passwordValidator = new PasswordValidator();
+
+ System.out.println("'peter1AB@' is valid? = "+passwordValidator.validate("peter1AB@"));
+ System.out.println("'peter4COW$' is valid? = "+passwordValidator.validate("peter4COW$"));
+ System.out.println("'peter78Dog%#' is valid? = "+passwordValidator.validate("peter78Dog%#"));
+
+ System.out.println("--------------------------------------------------");
+
+ /*
+ * too short, minimum 6 characters
+ */
+ System.out.println("'p1AB@' is valid? = "+passwordValidator.validate("p1AB@"));
+
+ /*
+ * uppercase characters is required
+ */
+ System.out.println("'peter1@' is valid? = "+passwordValidator.validate("peter1@"));
+
+
+ /*
+ * special symbol “*” is not allow here
+ */
+ System.out.println("'peterAB2*' is valid? = "+passwordValidator.validate("peterAB2*"));
+
+ /*
+ * digit is required
+ */
+ System.out.println("'peterAB$' is valid? = "+passwordValidator.validate("peterAB$"));
+
+
+ /*
+ * lower case character is required
+ */
+ System.out.println("'PETER2$' is valid? = "+passwordValidator.validate("PETER2$"));
+
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_pattern_matcher/RegexDemo/.classpath b/BasicJava/RegexDemo_pattern_matcher/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_pattern_matcher/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_pattern_matcher/RegexDemo/.project b/BasicJava/RegexDemo_pattern_matcher/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_pattern_matcher/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_pattern_matcher/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_pattern_matcher/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_pattern_matcher/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_pattern_matcher/RegexDemo/bin/RegexDemo1.class b/BasicJava/RegexDemo_pattern_matcher/RegexDemo/bin/RegexDemo1.class
new file mode 100644
index 000000000..c2fb066c8
Binary files /dev/null and b/BasicJava/RegexDemo_pattern_matcher/RegexDemo/bin/RegexDemo1.class differ
diff --git a/BasicJava/RegexDemo_pattern_matcher/RegexDemo/bin/RegexDemo2.class b/BasicJava/RegexDemo_pattern_matcher/RegexDemo/bin/RegexDemo2.class
new file mode 100644
index 000000000..d97f178f7
Binary files /dev/null and b/BasicJava/RegexDemo_pattern_matcher/RegexDemo/bin/RegexDemo2.class differ
diff --git a/BasicJava/RegexDemo_pattern_matcher/RegexDemo/bin/RegexDemo3.class b/BasicJava/RegexDemo_pattern_matcher/RegexDemo/bin/RegexDemo3.class
new file mode 100644
index 000000000..ade068440
Binary files /dev/null and b/BasicJava/RegexDemo_pattern_matcher/RegexDemo/bin/RegexDemo3.class differ
diff --git a/BasicJava/RegexDemo_pattern_matcher/RegexDemo/src/RegexDemo1.java b/BasicJava/RegexDemo_pattern_matcher/RegexDemo/src/RegexDemo1.java
new file mode 100644
index 000000000..95fefd441
--- /dev/null
+++ b/BasicJava/RegexDemo_pattern_matcher/RegexDemo/src/RegexDemo1.java
@@ -0,0 +1,39 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class RegexDemo1
+{
+ public static void main(String[] args)
+ {
+ /*
+ * . represents single character
+ *
+ * Parameters:
+ *
+ * regex - The expression to be compiled
+ *
+ * Returns:
+ *
+ * the given regular expression compiled into a pattern
+ */
+ Pattern pattern = Pattern.compile(".r");
+ /*
+ * Parameters:
+ *
+ * input - The character sequence to be matched
+ *
+ * Returns:
+ *
+ * A new matcher for this pattern
+ *
+ */
+ Matcher matcher = pattern.matcher("br");
+ /*
+ * Returns:true if, and only if, the entire region sequence
+ * matches this matcher's pattern
+ */
+ boolean result = matcher.matches();
+ System.out.println(result);
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_pattern_matcher/RegexDemo/src/RegexDemo2.java b/BasicJava/RegexDemo_pattern_matcher/RegexDemo/src/RegexDemo2.java
new file mode 100644
index 000000000..a1cb7f3b4
--- /dev/null
+++ b/BasicJava/RegexDemo_pattern_matcher/RegexDemo/src/RegexDemo2.java
@@ -0,0 +1,11 @@
+import java.util.regex.Pattern;
+
+public class RegexDemo2
+{
+ public static void main(String[] args)
+ {
+ boolean result=Pattern.compile(".r").matcher("ar").matches();
+ System.out.println(result);
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_pattern_matcher/RegexDemo/src/RegexDemo3.java b/BasicJava/RegexDemo_pattern_matcher/RegexDemo/src/RegexDemo3.java
new file mode 100644
index 000000000..7b114b7d4
--- /dev/null
+++ b/BasicJava/RegexDemo_pattern_matcher/RegexDemo/src/RegexDemo3.java
@@ -0,0 +1,30 @@
+import java.util.regex.Pattern;
+
+/**
+ * boolean java.util.regex.Pattern.matches(String regex, CharSequence
+ * input)
+ *
+ * Compiles the given regular expression and attempts to match the
+ * given input against it
+ */
+public class RegexDemo3
+{
+ public static void main(String[] args)
+ {
+ /*
+ * Parameters:
+ *
+ * regex: The expression to be compiled
+ *
+ * input: The character sequence to be matched
+ *
+ * Returns:
+ *
+ * whether or not the regular expression matches on
+ * the input
+ */
+ boolean result = Pattern.matches(".r", "ar");
+ System.out.println(result);
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_pattern_matcher/RegexDemo1_Output.txt b/BasicJava/RegexDemo_pattern_matcher/RegexDemo1_Output.txt
new file mode 100644
index 000000000..27ba77dda
--- /dev/null
+++ b/BasicJava/RegexDemo_pattern_matcher/RegexDemo1_Output.txt
@@ -0,0 +1 @@
+true
diff --git a/BasicJava/RegexDemo_pattern_matcher/RegexDemo2_Output.txt b/BasicJava/RegexDemo_pattern_matcher/RegexDemo2_Output.txt
new file mode 100644
index 000000000..27ba77dda
--- /dev/null
+++ b/BasicJava/RegexDemo_pattern_matcher/RegexDemo2_Output.txt
@@ -0,0 +1 @@
+true
diff --git a/BasicJava/RegexDemo_pattern_matcher/RegexDemo3_Output.txt b/BasicJava/RegexDemo_pattern_matcher/RegexDemo3_Output.txt
new file mode 100644
index 000000000..27ba77dda
--- /dev/null
+++ b/BasicJava/RegexDemo_pattern_matcher/RegexDemo3_Output.txt
@@ -0,0 +1 @@
+true
diff --git a/BasicJava/RegexDemo_phone_number/Output.txt b/BasicJava/RegexDemo_phone_number/Output.txt
new file mode 100644
index 000000000..da29283aa
--- /dev/null
+++ b/BasicJava/RegexDemo_phone_number/Output.txt
@@ -0,0 +1,2 @@
+true
+false
diff --git a/BasicJava/RegexDemo_phone_number/RegexDemo/.classpath b/BasicJava/RegexDemo_phone_number/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_phone_number/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_phone_number/RegexDemo/.project b/BasicJava/RegexDemo_phone_number/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_phone_number/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_phone_number/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_phone_number/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_phone_number/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_phone_number/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_phone_number/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..e71e9d164
Binary files /dev/null and b/BasicJava/RegexDemo_phone_number/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_phone_number/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_phone_number/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..6e14ecd7c
--- /dev/null
+++ b/BasicJava/RegexDemo_phone_number/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,18 @@
+/**
+ * Write a regular expression which matches any phone number
+ */
+
+public class RegexDemo
+{
+ public static void main(String[] args)
+ {
+ String regex = "\\d\\d\\d([-]){1}\\d\\d\\d([-]){1}\\d\\d\\d\\d";
+
+ String phoneNum1 = "123-332-9999";
+ System.out.println(phoneNum1.matches(regex));// true
+
+ String phoneNum2 = "1233329999";
+ System.out.println(phoneNum2.matches(regex));// false
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_predefined_class_d_D/Output.txt b/BasicJava/RegexDemo_predefined_class_d_D/Output.txt
new file mode 100644
index 000000000..2c3a88903
--- /dev/null
+++ b/BasicJava/RegexDemo_predefined_class_d_D/Output.txt
@@ -0,0 +1,2 @@
+Number of Matches = 2
+Number of Matches = 4
diff --git a/BasicJava/RegexDemo_predefined_class_d_D/RegexDemo/.classpath b/BasicJava/RegexDemo_predefined_class_d_D/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_predefined_class_d_D/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_predefined_class_d_D/RegexDemo/.project b/BasicJava/RegexDemo_predefined_class_d_D/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_predefined_class_d_D/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_predefined_class_d_D/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_predefined_class_d_D/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_predefined_class_d_D/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_predefined_class_d_D/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_predefined_class_d_D/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..ce6be5839
Binary files /dev/null and b/BasicJava/RegexDemo_predefined_class_d_D/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_predefined_class_d_D/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_predefined_class_d_D/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..f8366a3fa
--- /dev/null
+++ b/BasicJava/RegexDemo_predefined_class_d_D/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,51 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ *
+ * Predefined Character Classes
+ *
+ * The Java regex API also accepts predefined character classes.One
+ * special aspect of the Java version of this regex is the escape
+ * character.
+ *
+ * As we will see, most characters will start with a backslash, which
+ * has a special meaning in Java. For these to be compiled by the
+ * Pattern class – the leading backslash must be escaped i.e. \d
+ * becomes \\d.
+ *
+ */
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+ /*
+ * Matching digits, equivalent to [0-9]:
+ */
+ calculateMatches("\\d", "12abcd");
+ /*
+ * Matching non-digits, equivalent to [^0-9]:
+ */
+ calculateMatches("\\D", "12abcd");
+ }
+
+ private static void calculateMatches(String regex, String inputText)
+ {
+ Pattern pattern = Pattern.compile(regex);
+ Matcher matcher = pattern.matcher(inputText);
+ int matches = 0;
+
+ /*
+ * The find method keeps advancing through the input text and
+ * returns true for every match, so we can use it to find the
+ * match count as well:
+ */
+ while (matcher.find())
+ {
+ ++matches;
+ }
+ System.out.println("Number of Matches = " + matches);
+ }
+
+}
diff --git a/BasicJava/RegexDemo_predefined_class_s_S/Output.txt b/BasicJava/RegexDemo_predefined_class_s_S/Output.txt
new file mode 100644
index 000000000..1d5c459b4
--- /dev/null
+++ b/BasicJava/RegexDemo_predefined_class_s_S/Output.txt
@@ -0,0 +1,2 @@
+Number of Matches = 4
+Number of Matches = 2
diff --git a/BasicJava/RegexDemo_predefined_class_s_S/RegexDemo/.classpath b/BasicJava/RegexDemo_predefined_class_s_S/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_predefined_class_s_S/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_predefined_class_s_S/RegexDemo/.project b/BasicJava/RegexDemo_predefined_class_s_S/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_predefined_class_s_S/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_predefined_class_s_S/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_predefined_class_s_S/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_predefined_class_s_S/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_predefined_class_s_S/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_predefined_class_s_S/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..f723b7a9b
Binary files /dev/null and b/BasicJava/RegexDemo_predefined_class_s_S/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_predefined_class_s_S/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_predefined_class_s_S/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..4c9151f8a
--- /dev/null
+++ b/BasicJava/RegexDemo_predefined_class_s_S/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,51 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ *
+ * Predefined Character Classes
+ *
+ * The Java regex API also accepts predefined character classes.One
+ * special aspect of the Java version of this regex is the escape
+ * character.
+ *
+ * As we will see, most characters will start with a backslash, which
+ * has a special meaning in Java. For these to be compiled by the
+ * Pattern class – the leading backslash must be escaped i.e. \s
+ * becomes \\s.
+ *
+ */
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+ /*
+ * Matching white space:
+ */
+ calculateMatches("\\s", "a c");
+ /*
+ * Matching non-white space:
+ */
+ calculateMatches("\\S", "a c");
+ }
+
+ private static void calculateMatches(String regex, String inputText)
+ {
+ Pattern pattern = Pattern.compile(regex);
+ Matcher matcher = pattern.matcher(inputText);
+ int matches = 0;
+
+ /*
+ * The find method keeps advancing through the input text and
+ * returns true for every match, so we can use it to find the
+ * match count as well:
+ */
+ while (matcher.find())
+ {
+ ++matches;
+ }
+ System.out.println("Number of Matches = " + matches);
+ }
+
+}
diff --git a/BasicJava/RegexDemo_predefined_class_w_W/Output.txt b/BasicJava/RegexDemo_predefined_class_w_W/Output.txt
new file mode 100644
index 000000000..da66079b0
--- /dev/null
+++ b/BasicJava/RegexDemo_predefined_class_w_W/Output.txt
@@ -0,0 +1,2 @@
+Number of Matches = 3
+Number of Matches = 2
diff --git a/BasicJava/RegexDemo_predefined_class_w_W/RegexDemo/.classpath b/BasicJava/RegexDemo_predefined_class_w_W/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_predefined_class_w_W/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_predefined_class_w_W/RegexDemo/.project b/BasicJava/RegexDemo_predefined_class_w_W/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_predefined_class_w_W/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_predefined_class_w_W/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_predefined_class_w_W/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_predefined_class_w_W/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_predefined_class_w_W/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_predefined_class_w_W/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..67fc908cd
Binary files /dev/null and b/BasicJava/RegexDemo_predefined_class_w_W/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_predefined_class_w_W/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_predefined_class_w_W/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..d7083bbba
--- /dev/null
+++ b/BasicJava/RegexDemo_predefined_class_w_W/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,51 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ *
+ * Predefined Character Classes
+ *
+ * The Java regex API also accepts predefined character classes.One
+ * special aspect of the Java version of this regex is the escape
+ * character.
+ *
+ * As we will see, most characters will start with a backslash, which
+ * has a special meaning in Java. For these to be compiled by the
+ * Pattern class – the leading backslash must be escaped i.e. \w
+ * becomes \\w.
+ *
+ */
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+ /*
+ * Matching a word character, equivalent to [a-zA-Z_0-9]:
+ */
+ calculateMatches("\\w", "Hi9!#");
+ /*
+ * Matching a non-word character:
+ */
+ calculateMatches("\\W", "Hi9!#");
+ }
+
+ private static void calculateMatches(String regex, String inputText)
+ {
+ Pattern pattern = Pattern.compile(regex);
+ Matcher matcher = pattern.matcher(inputText);
+ int matches = 0;
+
+ /*
+ * The find method keeps advancing through the input text and
+ * returns true for every match, so we can use it to find the
+ * match count as well:
+ */
+ while (matcher.find())
+ {
+ ++matches;
+ }
+ System.out.println("Number of Matches = " + matches);
+ }
+
+}
diff --git a/BasicJava/RegexDemo_quantifers_a_3times/Output.txt b/BasicJava/RegexDemo_quantifers_a_3times/Output.txt
new file mode 100644
index 000000000..0799291e9
--- /dev/null
+++ b/BasicJava/RegexDemo_quantifers_a_3times/Output.txt
@@ -0,0 +1,3 @@
+Regex = a{3} , InputText = aaa is matching? = true
+Regex = a{3} , InputText = aa is matching? = false
+Regex = a{3} , InputText = aaaaaa is matching? = false
diff --git a/BasicJava/RegexDemo_quantifers_a_3times/RegexDemo/.classpath b/BasicJava/RegexDemo_quantifers_a_3times/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_quantifers_a_3times/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_quantifers_a_3times/RegexDemo/.project b/BasicJava/RegexDemo_quantifers_a_3times/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_quantifers_a_3times/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_quantifers_a_3times/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_quantifers_a_3times/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_quantifers_a_3times/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_quantifers_a_3times/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_quantifers_a_3times/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..d0de63c23
Binary files /dev/null and b/BasicJava/RegexDemo_quantifers_a_3times/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_quantifers_a_3times/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_quantifers_a_3times/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..ff044c039
--- /dev/null
+++ b/BasicJava/RegexDemo_quantifers_a_3times/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,28 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ *
+ * Quantifiers
+ *
+ */
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+ isMatch("a{3}", "aaa");
+ isMatch("a{3}", "aa");
+ isMatch("a{3}", "aaaaaa");
+ }
+
+ private static void isMatch(String regex, String inputText)
+ {
+ Pattern pattern = Pattern.compile(regex);
+ Matcher matcher = pattern.matcher(inputText);
+
+ System.out.println("Regex = " + regex + " , " + "InputText = "
+ + inputText + " is matching? = " + matcher.matches());
+ }
+
+}
diff --git a/BasicJava/RegexDemo_quantifiers_a_2_3/Output.txt b/BasicJava/RegexDemo_quantifiers_a_2_3/Output.txt
new file mode 100644
index 000000000..7785fc11a
--- /dev/null
+++ b/BasicJava/RegexDemo_quantifiers_a_2_3/Output.txt
@@ -0,0 +1,4 @@
+Regex = a{2,3} , InputText = aa is matching? = true
+Regex = a{2,3} , InputText = aaa is matching? = true
+Regex = a{2,3} , InputText = a is matching? = false
+Regex = a{2,3} , InputText = aaaaaa is matching? = false
diff --git a/BasicJava/RegexDemo_quantifiers_a_2_3/RegexDemo/.classpath b/BasicJava/RegexDemo_quantifiers_a_2_3/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_quantifiers_a_2_3/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_quantifiers_a_2_3/RegexDemo/.project b/BasicJava/RegexDemo_quantifiers_a_2_3/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_quantifiers_a_2_3/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_quantifiers_a_2_3/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_quantifiers_a_2_3/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_quantifiers_a_2_3/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_quantifiers_a_2_3/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_quantifiers_a_2_3/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..cf3996555
Binary files /dev/null and b/BasicJava/RegexDemo_quantifiers_a_2_3/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_quantifiers_a_2_3/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_quantifiers_a_2_3/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..fcf4f3a3c
--- /dev/null
+++ b/BasicJava/RegexDemo_quantifiers_a_2_3/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,35 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ *
+ * Quantifiers
+ *
+ */
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+
+ /*
+ * We’ve specified at least two occurrences but not exceeding
+ * three.
+ */
+ isMatch("a{2,3}", "aa");
+ isMatch("a{2,3}", "aaa");
+ isMatch("a{2,3}", "a");
+ isMatch("a{2,3}", "aaaaaa");
+
+ }
+
+ private static void isMatch(String regex, String inputText)
+ {
+ Pattern pattern = Pattern.compile(regex);
+ Matcher matcher = pattern.matcher(inputText);
+
+ System.out.println("Regex = " + regex + " , " + "InputText = "
+ + inputText + " is matching? = " + matcher.matches());
+ }
+
+}
diff --git a/BasicJava/RegexDemo_quantifiers_details/RegexDemo/.classpath b/BasicJava/RegexDemo_quantifiers_details/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_quantifiers_details/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_quantifiers_details/RegexDemo/.project b/BasicJava/RegexDemo_quantifiers_details/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_quantifiers_details/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_quantifiers_details/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_quantifiers_details/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_quantifiers_details/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_quantifiers_details/RegexDemo/bin/RegexDemo1.class b/BasicJava/RegexDemo_quantifiers_details/RegexDemo/bin/RegexDemo1.class
new file mode 100644
index 000000000..7e0153edc
Binary files /dev/null and b/BasicJava/RegexDemo_quantifiers_details/RegexDemo/bin/RegexDemo1.class differ
diff --git a/BasicJava/RegexDemo_quantifiers_details/RegexDemo/bin/RegexDemo2.class b/BasicJava/RegexDemo_quantifiers_details/RegexDemo/bin/RegexDemo2.class
new file mode 100644
index 000000000..302b31e7e
Binary files /dev/null and b/BasicJava/RegexDemo_quantifiers_details/RegexDemo/bin/RegexDemo2.class differ
diff --git a/BasicJava/RegexDemo_quantifiers_details/RegexDemo/bin/RegexDemo3.class b/BasicJava/RegexDemo_quantifiers_details/RegexDemo/bin/RegexDemo3.class
new file mode 100644
index 000000000..5d921fa86
Binary files /dev/null and b/BasicJava/RegexDemo_quantifiers_details/RegexDemo/bin/RegexDemo3.class differ
diff --git a/BasicJava/RegexDemo_quantifiers_details/RegexDemo/src/RegexDemo1.java b/BasicJava/RegexDemo_quantifiers_details/RegexDemo/src/RegexDemo1.java
new file mode 100644
index 000000000..e913f6c26
--- /dev/null
+++ b/BasicJava/RegexDemo_quantifiers_details/RegexDemo/src/RegexDemo1.java
@@ -0,0 +1,37 @@
+import java.util.regex.Pattern;
+
+
+public class RegexDemo1
+{
+ public static void main(String[] args)
+ {
+ /*
+ * * = Occurs zero or more times, is short for {0,}
+ */
+ System.out.println(Pattern.matches("X*", "")); // true
+ System.out.println(Pattern.matches("X*", "XXXX")); // true
+ System.out.println(Pattern.matches("X*", "aaaa")); // false
+
+ System.out.println("-------------------------------");
+
+ /*
+ * + = Occurs one or more times, is short for {1,}
+ */
+ System.out.println(Pattern.matches("X+", "")); // false
+ System.out.println(Pattern.matches("X+", "X")); // true
+ System.out.println(Pattern.matches("X+", "XXXX")); // true
+ System.out.println(Pattern.matches("X+", "BBBB")); // false
+
+ System.out.println("-------------------------------");
+
+ /*
+ * ? = Occurs no or one times, ? is short for {0,1}.
+ */
+ System.out.println(Pattern.matches("X?", "")); // true
+ System.out.println(Pattern.matches("X?", "X")); // true
+ System.out.println(Pattern.matches("X?", "XXXX")); // false
+ System.out.println(Pattern.matches("X?", "BBBB")); // false
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_quantifiers_details/RegexDemo/src/RegexDemo2.java b/BasicJava/RegexDemo_quantifiers_details/RegexDemo/src/RegexDemo2.java
new file mode 100644
index 000000000..e49f50189
--- /dev/null
+++ b/BasicJava/RegexDemo_quantifiers_details/RegexDemo/src/RegexDemo2.java
@@ -0,0 +1,29 @@
+import java.util.regex.Pattern;
+
+
+public class RegexDemo2
+{
+ public static void main(String[] args)
+ {
+ /*
+ * {X} = Occurs X number of times, {}
+ * describes the order of the preceding liberal
+ */
+ System.out.println(Pattern.matches("X{3}", "X")); // false
+ System.out.println(Pattern.matches("X{3}", "XXX")); // true
+ System.out.println(Pattern.matches("X{3}", "aaaa")); // false
+
+ System.out.println("-------------------------------");
+
+ System.out.println(Pattern.matches("\\d{3}", "989")); // true
+ System.out.println(Pattern.matches("\\d{3}", "9898")); // false
+
+ System.out.println("-------------------------------");
+
+ System.out.println(Pattern.matches(".{10}", "99999aaaaa")); // true
+ System.out.println(Pattern.matches(".{10}", "99999")); // false
+
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_quantifiers_details/RegexDemo/src/RegexDemo3.java b/BasicJava/RegexDemo_quantifiers_details/RegexDemo/src/RegexDemo3.java
new file mode 100644
index 000000000..23edbbb1b
--- /dev/null
+++ b/BasicJava/RegexDemo_quantifiers_details/RegexDemo/src/RegexDemo3.java
@@ -0,0 +1,17 @@
+import java.util.regex.Pattern;
+
+
+public class RegexDemo3
+{
+ public static void main(String[] args)
+ {
+ /*
+ * {X,Y} = Occurs between X and Y times
+ */
+ System.out.println(Pattern.matches("\\d{1,4}", "9")); // true
+ System.out.println(Pattern.matches("\\d{1,4}", "98")); // true
+ System.out.println(Pattern.matches("\\d{1,4}", "9888")); // true
+ System.out.println(Pattern.matches("\\d{1,4}", "9898909")); // false
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_quantifiers_details/RegexDemo1_Output.txt b/BasicJava/RegexDemo_quantifiers_details/RegexDemo1_Output.txt
new file mode 100644
index 000000000..792e44810
--- /dev/null
+++ b/BasicJava/RegexDemo_quantifiers_details/RegexDemo1_Output.txt
@@ -0,0 +1,13 @@
+true
+true
+false
+-------------------------------
+false
+true
+true
+false
+-------------------------------
+true
+true
+false
+false
diff --git a/BasicJava/RegexDemo_quantifiers_details/RegexDemo2_Output.txt b/BasicJava/RegexDemo_quantifiers_details/RegexDemo2_Output.txt
new file mode 100644
index 000000000..d89354aa3
--- /dev/null
+++ b/BasicJava/RegexDemo_quantifiers_details/RegexDemo2_Output.txt
@@ -0,0 +1,9 @@
+false
+true
+false
+-------------------------------
+true
+false
+-------------------------------
+true
+false
diff --git a/BasicJava/RegexDemo_quantifiers_details/RegexDemo3_Output.txt b/BasicJava/RegexDemo_quantifiers_details/RegexDemo3_Output.txt
new file mode 100644
index 000000000..6859f05a4
--- /dev/null
+++ b/BasicJava/RegexDemo_quantifiers_details/RegexDemo3_Output.txt
@@ -0,0 +1,4 @@
+true
+true
+true
+false
diff --git a/BasicJava/RegexDemo_quote/Output.txt b/BasicJava/RegexDemo_quote/Output.txt
new file mode 100644
index 000000000..901f53571
--- /dev/null
+++ b/BasicJava/RegexDemo_quote/Output.txt
@@ -0,0 +1,2 @@
+regex = \Qdog$\E
+The cat says meow All cat say meow.
diff --git a/BasicJava/RegexDemo_quote/RegexDemo/.classpath b/BasicJava/RegexDemo_quote/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_quote/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_quote/RegexDemo/.project b/BasicJava/RegexDemo_quote/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_quote/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_quote/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_quote/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_quote/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_quote/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_quote/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..90bd69669
Binary files /dev/null and b/BasicJava/RegexDemo_quote/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_quote/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_quote/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..f1f5a2486
--- /dev/null
+++ b/BasicJava/RegexDemo_quote/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,26 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class RegexDemo
+{
+
+ private static String STRING_TO_BE_LITERALIZED = "dog$";
+ private static String INPUT_CHAR_SEQ = "The dog$ says meow All dog$ say meow.";
+ private static String REPLACE_STR = "cat";
+
+ public static void main(String[] args)
+ {
+ /*
+ * Returns:A literal string replacement
+ */
+ String regex = Pattern.quote(STRING_TO_BE_LITERALIZED);
+ System.out.println("regex = "+regex);
+ Pattern pattern = Pattern.compile(regex);
+
+ // get a matcher object
+ Matcher matcher = pattern.matcher(INPUT_CHAR_SEQ);
+ INPUT_CHAR_SEQ = matcher.replaceAll(REPLACE_STR);
+ System.out.println(INPUT_CHAR_SEQ);
+ }
+
+}
diff --git a/BasicJava/RegexDemo_replace/RegexDemo/.classpath b/BasicJava/RegexDemo_replace/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_replace/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_replace/RegexDemo/.project b/BasicJava/RegexDemo_replace/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_replace/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_replace/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_replace/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_replace/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_replace/RegexDemo/bin/RegexDemo1.class b/BasicJava/RegexDemo_replace/RegexDemo/bin/RegexDemo1.class
new file mode 100644
index 000000000..f36b5aad7
Binary files /dev/null and b/BasicJava/RegexDemo_replace/RegexDemo/bin/RegexDemo1.class differ
diff --git a/BasicJava/RegexDemo_replace/RegexDemo/bin/RegexDemo2.class b/BasicJava/RegexDemo_replace/RegexDemo/bin/RegexDemo2.class
new file mode 100644
index 000000000..2e2490600
Binary files /dev/null and b/BasicJava/RegexDemo_replace/RegexDemo/bin/RegexDemo2.class differ
diff --git a/BasicJava/RegexDemo_replace/RegexDemo/src/RegexDemo1.java b/BasicJava/RegexDemo_replace/RegexDemo/src/RegexDemo1.java
new file mode 100644
index 000000000..bd6aa59f1
--- /dev/null
+++ b/BasicJava/RegexDemo_replace/RegexDemo/src/RegexDemo1.java
@@ -0,0 +1,29 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class RegexDemo1
+{
+ private static String REGEX = "lion";
+ private static String INPUT = "The lion says meow. All lions say meow.";
+ private static String REPLACE = "cat";
+
+ public static void main(String[] args)
+ {
+ Pattern pattern = Pattern.compile(REGEX);
+ Matcher matcher = pattern.matcher(INPUT);
+ /*
+ * Parameters:
+ *
+ * replacement - The replacement string
+ *
+ * Returns:
+ *
+ * The string constructed by replacing each matching
+ * subsequence by the replacement string, substituting
+ * captured subsequences as needed
+ */
+ INPUT = matcher.replaceAll(REPLACE);
+ System.out.println(INPUT);
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_replace/RegexDemo/src/RegexDemo2.java b/BasicJava/RegexDemo_replace/RegexDemo/src/RegexDemo2.java
new file mode 100644
index 000000000..2574ca7b1
--- /dev/null
+++ b/BasicJava/RegexDemo_replace/RegexDemo/src/RegexDemo2.java
@@ -0,0 +1,29 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class RegexDemo2
+{
+ private static String REGEX = "lion";
+ private static String INPUT = "The lion says meow. All lions say meow.";
+ private static String REPLACE = "cat";
+
+ public static void main(String[] args)
+ {
+ Pattern pattern = Pattern.compile(REGEX);
+ Matcher matcher = pattern.matcher(INPUT);
+ /*
+ * Parameters:
+ *
+ * replacement - The replacement string
+ *
+ * Returns:
+ *
+ * The string constructed by replacing the first matching
+ * subsequence by the replacement string, substituting
+ * captured subsequences as needed
+ */
+ INPUT = matcher.replaceFirst(REPLACE);
+ System.out.println(INPUT);
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_replace/RegexDemo1_Output.txt b/BasicJava/RegexDemo_replace/RegexDemo1_Output.txt
new file mode 100644
index 000000000..9912b859d
--- /dev/null
+++ b/BasicJava/RegexDemo_replace/RegexDemo1_Output.txt
@@ -0,0 +1 @@
+The cat says meow. All cats say meow.
diff --git a/BasicJava/RegexDemo_replace/RegexDemo2_Output.txt b/BasicJava/RegexDemo_replace/RegexDemo2_Output.txt
new file mode 100644
index 000000000..52fa28339
--- /dev/null
+++ b/BasicJava/RegexDemo_replace/RegexDemo2_Output.txt
@@ -0,0 +1 @@
+The cat says meow. All lions say meow.
diff --git a/BasicJava/RegexDemo_replace_group/Output.txt b/BasicJava/RegexDemo_replace_group/Output.txt
new file mode 100644
index 000000000..8f8899d45
--- /dev/null
+++ b/BasicJava/RegexDemo_replace_group/Output.txt
@@ -0,0 +1,2 @@
+replaceAll = Steve peter about this, and Steve Doe writes about that, and Steve Wayne writes about everything.
+replaceFirst = Steve peter about this, and John Doe writes about that, and John Wayne writes about everything.
diff --git a/BasicJava/RegexDemo_replace_group/RegexDemo/.classpath b/BasicJava/RegexDemo_replace_group/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_replace_group/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_replace_group/RegexDemo/.project b/BasicJava/RegexDemo_replace_group/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_replace_group/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_replace_group/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_replace_group/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_replace_group/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_replace_group/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_replace_group/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..fda209002
Binary files /dev/null and b/BasicJava/RegexDemo_replace_group/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_replace_group/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_replace_group/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..d375a2e2f
--- /dev/null
+++ b/BasicJava/RegexDemo_replace_group/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,39 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ *
+ * replaceAll() and replaceFirst():
+ *
+ * The Matcher replaceAll() and replaceFirst() methods can be used to
+ * replace parts of the string the Matcher is searching through.
+ *
+ */
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+ String text = "John peter about this, and John Doe writes about that,"
+ + " and John Wayne writes about everything.";
+
+ String regex = "(John)";
+
+ Pattern pattern = Pattern.compile(regex);
+ Matcher matcher = pattern.matcher(text);
+
+ /*
+ * The replaceAll() method replaces all matches of the regular
+ * expression.
+ */
+ String replaceAll = matcher.replaceAll("Steve");
+ System.out.println("replaceAll = " + replaceAll);
+
+ /*
+ * The replaceFirst() only replaces the first match.
+ */
+ String replaceFirst = matcher.replaceFirst("Steve");
+ System.out.println("replaceFirst = " + replaceFirst);
+ }
+
+}
diff --git a/BasicJava/RegexDemo_replacement_methods_dog_cat/RegexDemo/.classpath b/BasicJava/RegexDemo_replacement_methods_dog_cat/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_replacement_methods_dog_cat/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_replacement_methods_dog_cat/RegexDemo/.project b/BasicJava/RegexDemo_replacement_methods_dog_cat/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_replacement_methods_dog_cat/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_replacement_methods_dog_cat/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_replacement_methods_dog_cat/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_replacement_methods_dog_cat/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_replacement_methods_dog_cat/RegexDemo/bin/RegexDemo1.class b/BasicJava/RegexDemo_replacement_methods_dog_cat/RegexDemo/bin/RegexDemo1.class
new file mode 100644
index 000000000..9144a83bd
Binary files /dev/null and b/BasicJava/RegexDemo_replacement_methods_dog_cat/RegexDemo/bin/RegexDemo1.class differ
diff --git a/BasicJava/RegexDemo_replacement_methods_dog_cat/RegexDemo/bin/RegexDemo2.class b/BasicJava/RegexDemo_replacement_methods_dog_cat/RegexDemo/bin/RegexDemo2.class
new file mode 100644
index 000000000..d2e7a2da8
Binary files /dev/null and b/BasicJava/RegexDemo_replacement_methods_dog_cat/RegexDemo/bin/RegexDemo2.class differ
diff --git a/BasicJava/RegexDemo_replacement_methods_dog_cat/RegexDemo/src/RegexDemo1.java b/BasicJava/RegexDemo_replacement_methods_dog_cat/RegexDemo/src/RegexDemo1.java
new file mode 100644
index 000000000..194de8e12
--- /dev/null
+++ b/BasicJava/RegexDemo_replacement_methods_dog_cat/RegexDemo/src/RegexDemo1.java
@@ -0,0 +1,31 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ *
+ * Replacement Methods
+ *
+ */
+public class RegexDemo1
+{
+
+ public static void main(String[] args)
+ {
+ Pattern pattern = Pattern.compile("dog");
+ Matcher matcher = pattern
+ .matcher("dogs are domestic animals, dogs are friendly");
+
+ /*
+ * Replacement methods are useful to replace text in an input
+ * string. The common ones are replaceFirst and replaceAll.
+ *
+ * The replaceFirst and replaceAll methods replace the text
+ * that matches a given regular expression. As their names
+ * indicate, replaceFirst replaces the first occurrence, and
+ * replaceAll replaces all occurrences.
+ */
+ String newStr = matcher.replaceFirst("cat");
+ System.out.println(newStr);
+ }
+
+}
diff --git a/BasicJava/RegexDemo_replacement_methods_dog_cat/RegexDemo/src/RegexDemo2.java b/BasicJava/RegexDemo_replacement_methods_dog_cat/RegexDemo/src/RegexDemo2.java
new file mode 100644
index 000000000..281188c1d
--- /dev/null
+++ b/BasicJava/RegexDemo_replacement_methods_dog_cat/RegexDemo/src/RegexDemo2.java
@@ -0,0 +1,31 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ *
+ * Replacement Methods
+ *
+ */
+public class RegexDemo2
+{
+
+ public static void main(String[] args)
+ {
+ Pattern pattern = Pattern.compile("dog");
+ Matcher matcher = pattern
+ .matcher("dogs are domestic animals, dogs are friendly");
+
+ /*
+ * Replacement methods are useful to replace text in an input
+ * string. The common ones are replaceFirst and replaceAll.
+ *
+ * The replaceFirst and replaceAll methods replace the text
+ * that matches a given regular expression. As their names
+ * indicate, replaceFirst replaces the first occurrence, and
+ * replaceAll replaces all occurrences.
+ */
+ String newStr = matcher.replaceAll("cat");
+ System.out.println(newStr);
+ }
+
+}
diff --git a/BasicJava/RegexDemo_replacement_methods_dog_cat/RegexDemo1_Output.txt b/BasicJava/RegexDemo_replacement_methods_dog_cat/RegexDemo1_Output.txt
new file mode 100644
index 000000000..c82da99b6
--- /dev/null
+++ b/BasicJava/RegexDemo_replacement_methods_dog_cat/RegexDemo1_Output.txt
@@ -0,0 +1 @@
+cats are domestic animals, dogs are friendly
diff --git a/BasicJava/RegexDemo_replacement_methods_dog_cat/RegexDemo2_Output.txt b/BasicJava/RegexDemo_replacement_methods_dog_cat/RegexDemo2_Output.txt
new file mode 100644
index 000000000..7bbfa18ee
--- /dev/null
+++ b/BasicJava/RegexDemo_replacement_methods_dog_cat/RegexDemo2_Output.txt
@@ -0,0 +1 @@
+cats are domestic animals, cats are friendly
diff --git a/BasicJava/RegexDemo_spilt_hyphen/Output.txt b/BasicJava/RegexDemo_spilt_hyphen/Output.txt
new file mode 100644
index 000000000..63d07aef0
--- /dev/null
+++ b/BasicJava/RegexDemo_spilt_hyphen/Output.txt
@@ -0,0 +1,6 @@
+stringArrry length = 5
+strValue = Hello
+strValue = peter
+strValue = how
+strValue = are
+strValue = you?
diff --git a/BasicJava/RegexDemo_spilt_hyphen/RegexDemo/.classpath b/BasicJava/RegexDemo_spilt_hyphen/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_spilt_hyphen/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_spilt_hyphen/RegexDemo/.project b/BasicJava/RegexDemo_spilt_hyphen/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_spilt_hyphen/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_spilt_hyphen/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_spilt_hyphen/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_spilt_hyphen/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_spilt_hyphen/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_spilt_hyphen/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..92de39b44
Binary files /dev/null and b/BasicJava/RegexDemo_spilt_hyphen/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_spilt_hyphen/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_spilt_hyphen/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..758752cc4
--- /dev/null
+++ b/BasicJava/RegexDemo_spilt_hyphen/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,29 @@
+import java.util.regex.Pattern;
+
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+ String inputCharSeq = "Hello-peter-how-are-you?";
+
+ String regex = "-";
+
+ Pattern pattern = Pattern.compile(regex);
+
+ /*
+ * The split() method in the Pattern class can split a text
+ * into an array of String's, using the regular expression
+ * (the pattern) as delimiter.
+ */
+ String[] stringArrry = pattern.split(inputCharSeq);
+
+ System.out.println("stringArrry length = " + stringArrry.length);
+
+ for (String strValue : stringArrry)
+ {
+ System.out.println("strValue = " + strValue);
+ }
+ }
+
+}
diff --git a/BasicJava/RegexDemo_split/Output.txt b/BasicJava/RegexDemo_split/Output.txt
new file mode 100644
index 000000000..0281acc2e
--- /dev/null
+++ b/BasicJava/RegexDemo_split/Output.txt
@@ -0,0 +1,5 @@
+Peter
+Welcome
+to
+india
+Number of split strings: 4
diff --git a/BasicJava/RegexDemo_split/RegexDemo/.classpath b/BasicJava/RegexDemo_split/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_split/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_split/RegexDemo/.project b/BasicJava/RegexDemo_split/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_split/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_split/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_split/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_split/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_split/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_split/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..df5e2383d
Binary files /dev/null and b/BasicJava/RegexDemo_split/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_split/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_split/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..d4b644cf3
--- /dev/null
+++ b/BasicJava/RegexDemo_split/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,33 @@
+import java.util.regex.Pattern;
+
+/**
+ *
+ * To split a text into multiple strings based on a delimiter (Here delimiter
+ * would be specified using regex), we can use Pattern.split() method.
+ *
+ */
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+ String inputCharSeq = "Peter_Welcome_to_india";
+
+ // Pattern for delimiter
+ String regex = "_";
+
+ Pattern pattern = Pattern.compile(regex);
+ /*
+ * Returns:The array of strings computed by splitting the input around
+ * matches of this pattern.
+ */
+ String[] stringArray = pattern.split(inputCharSeq);
+
+ for (String str : stringArray)
+ {
+ System.out.println(str);
+ }
+ System.out.println("Number of split strings: " + stringArray.length);
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_stringmatcher/Output.txt b/BasicJava/RegexDemo_stringmatcher/Output.txt
new file mode 100644
index 000000000..cc23687a7
--- /dev/null
+++ b/BasicJava/RegexDemo_stringmatcher/Output.txt
@@ -0,0 +1,14 @@
+true
+false
+-----------------------------
+true
+true
+false
+-----------------------------
+true
+true
+true
+-----------------------------
+true
+true
+false
diff --git a/BasicJava/RegexDemo_stringmatcher/RegexDemo/.classpath b/BasicJava/RegexDemo_stringmatcher/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_stringmatcher/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_stringmatcher/RegexDemo/.project b/BasicJava/RegexDemo_stringmatcher/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_stringmatcher/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_stringmatcher/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_stringmatcher/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_stringmatcher/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_stringmatcher/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_stringmatcher/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..0f9547554
Binary files /dev/null and b/BasicJava/RegexDemo_stringmatcher/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_stringmatcher/RegexDemo/bin/StringMatcher.class b/BasicJava/RegexDemo_stringmatcher/RegexDemo/bin/StringMatcher.class
new file mode 100644
index 000000000..c864f11ed
Binary files /dev/null and b/BasicJava/RegexDemo_stringmatcher/RegexDemo/bin/StringMatcher.class differ
diff --git a/BasicJava/RegexDemo_stringmatcher/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_stringmatcher/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..660cdf22f
--- /dev/null
+++ b/BasicJava/RegexDemo_stringmatcher/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,30 @@
+public class RegexDemo
+{
+ public static void main(String[] args)
+ {
+ StringMatcher stringMatcher = new StringMatcher();
+
+ System.out.println(stringMatcher.isTrue("true")); // true
+ System.out.println(stringMatcher.isTrue("True")); // false
+
+ System.out.println("-----------------------------");
+
+ System.out.println(stringMatcher.isTrueVersion2("true")); // true
+ System.out.println(stringMatcher.isTrueVersion2("True")); // true
+ System.out.println(stringMatcher.isTrueVersion2("True1")); // false
+
+ System.out.println("-----------------------------");
+
+ System.out.println(stringMatcher.isTrueOrYes("true")); // true
+ System.out.println(stringMatcher.isTrueOrYes("Yes")); // true
+ System.out.println(stringMatcher.isTrueOrYes("yes")); // true
+
+ System.out.println("-----------------------------");
+
+ System.out.println(stringMatcher.containsTrue("Hellotrue")); // true
+ System.out.println(stringMatcher.containsTrue("WelcometrueWelcome")); // true
+ System.out.println(stringMatcher.containsTrue("WelcometrWelcome")); // false
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_stringmatcher/RegexDemo/src/StringMatcher.java b/BasicJava/RegexDemo_stringmatcher/RegexDemo/src/StringMatcher.java
new file mode 100644
index 000000000..2b7dd43dc
--- /dev/null
+++ b/BasicJava/RegexDemo_stringmatcher/RegexDemo/src/StringMatcher.java
@@ -0,0 +1,37 @@
+
+public class StringMatcher
+{
+ /*
+ * returns true if the string matches exactly "true"
+ */
+ public boolean isTrue(String s)
+ {
+ return s.matches("true");
+ }
+
+ /*
+ * returns true if the string matches exactly "true" or "True"
+ */
+ public boolean isTrueVersion2(String s)
+ {
+ return s.matches("[tT]rue");
+ }
+
+ /*
+ * returns true if the string matches exactly "true" or "True" or "yes" or
+ * "Yes"
+ */
+ public boolean isTrueOrYes(String s)
+ {
+ return s.matches("[tT]rue|[yY]es");
+ }
+
+ /*
+ * returns true if the string contains "true"
+ */
+ public boolean containsTrue(String s)
+ {
+ return s.matches(".*true.*");
+ }
+
+}
diff --git a/BasicJava/RegexDemo_study_methods/Output.txt b/BasicJava/RegexDemo_study_methods/Output.txt
new file mode 100644
index 000000000..da29283aa
--- /dev/null
+++ b/BasicJava/RegexDemo_study_methods/Output.txt
@@ -0,0 +1,2 @@
+true
+false
diff --git a/BasicJava/RegexDemo_study_methods/RegexDemo/.classpath b/BasicJava/RegexDemo_study_methods/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_study_methods/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_study_methods/RegexDemo/.project b/BasicJava/RegexDemo_study_methods/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_study_methods/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_study_methods/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_study_methods/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_study_methods/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_study_methods/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_study_methods/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..f949d9701
Binary files /dev/null and b/BasicJava/RegexDemo_study_methods/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_study_methods/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_study_methods/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..7bba1ba7a
--- /dev/null
+++ b/BasicJava/RegexDemo_study_methods/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,31 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ *
+ * Study Methods
+ *
+ */
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+ Pattern pattern = Pattern.compile("dog");
+ Matcher matcher = pattern.matcher("dog is friendly");
+
+ /*
+ * Study methods go through the input String and return a
+ * boolean indicating whether or not the pattern is found.
+ * Commonly used are matches and lookingAt methods.
+ *
+ * The matches and lookingAt methods both attempt to match an
+ * input sequence against a pattern. The difference, is that
+ * matches requires the entire input sequence to be matched,
+ * while lookingAt does not.
+ */
+ System.out.println(matcher.lookingAt());
+ System.out.println(matcher.matches());
+ }
+
+}
diff --git a/BasicJava/RegexDemo_substraction_class/Output.txt b/BasicJava/RegexDemo_substraction_class/Output.txt
new file mode 100644
index 000000000..b093d2b4c
--- /dev/null
+++ b/BasicJava/RegexDemo_substraction_class/Output.txt
@@ -0,0 +1,2 @@
+Number of Matches = 8
+Number of Matches = 1
diff --git a/BasicJava/RegexDemo_substraction_class/RegexDemo/.classpath b/BasicJava/RegexDemo_substraction_class/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_substraction_class/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_substraction_class/RegexDemo/.project b/BasicJava/RegexDemo_substraction_class/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_substraction_class/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_substraction_class/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_substraction_class/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_substraction_class/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_substraction_class/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_substraction_class/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..e26b866ff
Binary files /dev/null and b/BasicJava/RegexDemo_substraction_class/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_substraction_class/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_substraction_class/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..35d2e3782
--- /dev/null
+++ b/BasicJava/RegexDemo_substraction_class/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,40 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ *
+ * Subtraction Class
+ *
+ */
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+ /*
+ * We will get 8 matches because the Subtraction of the two
+ * sets has only 8 elements.
+ */
+ calculateMatches("[0-9&&[^12]]", "0123456789");
+ calculateMatches("[0-9&&[^12]]", "123");
+ }
+
+ private static void calculateMatches(String regex, String inputText)
+ {
+ Pattern pattern = Pattern.compile(regex);
+ Matcher matcher = pattern.matcher(inputText);
+ int matches = 0;
+
+ /*
+ * The find method keeps advancing through the input text and
+ * returns true for every match, so we can use it to find the
+ * match count as well:
+ */
+ while (matcher.find())
+ {
+ ++matches;
+ }
+ System.out.println("Number of Matches = " + matches);
+ }
+
+}
diff --git a/BasicJava/RegexDemo_tim_tom/Output.txt b/BasicJava/RegexDemo_tim_tom/Output.txt
new file mode 100644
index 000000000..5436d2804
--- /dev/null
+++ b/BasicJava/RegexDemo_tim_tom/Output.txt
@@ -0,0 +1,10 @@
+true
+false
+-----------------------------
+true
+true
+false
+-----------------------------
+true
+true
+false
diff --git a/BasicJava/RegexDemo_tim_tom/RegexDemo/.classpath b/BasicJava/RegexDemo_tim_tom/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_tim_tom/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_tim_tom/RegexDemo/.project b/BasicJava/RegexDemo_tim_tom/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_tim_tom/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_tim_tom/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_tim_tom/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_tim_tom/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_tim_tom/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_tim_tom/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..ac2c40037
Binary files /dev/null and b/BasicJava/RegexDemo_tim_tom/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_tim_tom/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_tim_tom/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..d56dcccfe
--- /dev/null
+++ b/BasicJava/RegexDemo_tim_tom/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,35 @@
+import java.util.regex.Pattern;
+
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+ /*
+ * It would return true if string matches exactly "Tom"
+ */
+ System.out.println(Pattern.matches("Tom", "Tom")); // true
+ System.out.println(Pattern.matches("Tom", "tom")); // false
+
+ System.out.println("-----------------------------");
+
+ /*
+ * returns true if the string matches exactly "tom" or "Tom"
+ */
+ System.out.println(Pattern.matches("[Tt]om", "Tom")); // true
+ System.out.println(Pattern.matches("[Tt]om", "tom")); // true
+ System.out.println(Pattern.matches("[Tt]om", "Tome")); // false
+
+ System.out.println("-----------------------------");
+
+ /*
+ * Returns true if the string matches exactly "tim" or "Tim" or "jin" or
+ * "Jin"
+ */
+ System.out.println(Pattern.matches("[tT]im|[jJ]in", "Tim"));// true
+ System.out.println(Pattern.matches("[tT]im|[jJ]in", "jin"));// true
+ System.out.println(Pattern.matches("[tT]im|[jJ]in", "john"));// false
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_time12hrs/Output.txt b/BasicJava/RegexDemo_time12hrs/Output.txt
new file mode 100644
index 000000000..6662b3681
--- /dev/null
+++ b/BasicJava/RegexDemo_time12hrs/Output.txt
@@ -0,0 +1,8 @@
+2:00 am is Valid? = true
+2:00 AM is Valid? = true
+12:50 pm is Valid? = true
+--------------------------------------
+0:00 am is Valid? = false
+23:00 AM is Valid? = false
+12:90 pm is Valid? = false
+11:20 GM is Valid? = false
diff --git a/BasicJava/RegexDemo_time12hrs/RegexDemo/.classpath b/BasicJava/RegexDemo_time12hrs/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_time12hrs/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_time12hrs/RegexDemo/.project b/BasicJava/RegexDemo_time12hrs/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_time12hrs/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_time12hrs/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_time12hrs/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_time12hrs/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_time12hrs/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_time12hrs/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..3b3599c0f
Binary files /dev/null and b/BasicJava/RegexDemo_time12hrs/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_time12hrs/RegexDemo/bin/Time12HoursValidator.class b/BasicJava/RegexDemo_time12hrs/RegexDemo/bin/Time12HoursValidator.class
new file mode 100644
index 000000000..3062ff0d9
Binary files /dev/null and b/BasicJava/RegexDemo_time12hrs/RegexDemo/bin/Time12HoursValidator.class differ
diff --git a/BasicJava/RegexDemo_time12hrs/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_time12hrs/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..e81be6cc0
--- /dev/null
+++ b/BasicJava/RegexDemo_time12hrs/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,40 @@
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ *
+ * How to validate Time in 12 Hours format with regular expression
+ *
+ */
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+ List validTimeList = Arrays.asList("2:00 am", "2:00 AM", "12:50 pm");
+
+ Time12HoursValidator time12HoursValidator = new Time12HoursValidator();
+
+
+ for (String time : validTimeList)
+ {
+ System.out.println(
+ time + " is Valid? = " + time12HoursValidator.validate(time));
+ }
+
+
+
+ System.out.println("--------------------------------------");
+
+ List inValidTimeList = Arrays.asList("0:00 am", "23:00 AM", "12:90 pm","11:20 GM");
+
+ for (String time : inValidTimeList)
+ {
+ System.out.println(
+ time + " is Valid? = " + time12HoursValidator.validate(time));
+ }
+
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_time12hrs/RegexDemo/src/Time12HoursValidator.java b/BasicJava/RegexDemo_time12hrs/RegexDemo/src/Time12HoursValidator.java
new file mode 100644
index 000000000..9f58ccb97
--- /dev/null
+++ b/BasicJava/RegexDemo_time12hrs/RegexDemo/src/Time12HoursValidator.java
@@ -0,0 +1,27 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ *
+ * How to validate Time in 12 Hours format with regular expression
+ *
+ */
+public class Time12HoursValidator
+{
+
+ private Pattern pattern;
+ private Matcher matcher;
+
+ private static final String TIME12HOURS_REGEX = "(1[012]|[1-9]):[0-5][0-9](\\s)?(?i)(am|pm)";
+
+ public Time12HoursValidator()
+ {
+ pattern = Pattern.compile(TIME12HOURS_REGEX);
+ }
+
+ public boolean validate(final String time)
+ {
+ matcher = pattern.matcher(time);
+ return matcher.matches();
+ }
+}
diff --git a/BasicJava/RegexDemo_union_class/Output.txt b/BasicJava/RegexDemo_union_class/Output.txt
new file mode 100644
index 000000000..87e108ad6
--- /dev/null
+++ b/BasicJava/RegexDemo_union_class/Output.txt
@@ -0,0 +1 @@
+Number of Matches = 6
diff --git a/BasicJava/RegexDemo_union_class/RegexDemo/.classpath b/BasicJava/RegexDemo_union_class/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_union_class/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_union_class/RegexDemo/.project b/BasicJava/RegexDemo_union_class/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_union_class/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_union_class/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_union_class/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_union_class/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_union_class/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_union_class/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..5411cba23
Binary files /dev/null and b/BasicJava/RegexDemo_union_class/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_union_class/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_union_class/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..0878f1597
--- /dev/null
+++ b/BasicJava/RegexDemo_union_class/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,39 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ *
+ * Union Class
+ *
+ */
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+ /*
+ * This will only match 6 out of the 9 integers because the
+ * union set skips 4,5 and 6.
+ */
+ calculateMatches("[1-3[7-9]]", "123456789");
+ }
+
+ private static void calculateMatches(String regex, String inputText)
+ {
+ Pattern pattern = Pattern.compile(regex);
+ Matcher matcher = pattern.matcher(inputText);
+ int matches = 0;
+
+ /*
+ * The find method keeps advancing through the input text and
+ * returns true for every match, so we can use it to find the
+ * match count as well:
+ */
+ while (matcher.find())
+ {
+ ++matches;
+ }
+ System.out.println("Number of Matches = " + matches);
+ }
+
+}
diff --git a/BasicJava/RegexDemo_username/Output.txt b/BasicJava/RegexDemo_username/Output.txt
new file mode 100644
index 000000000..fb2c6d204
--- /dev/null
+++ b/BasicJava/RegexDemo_username/Output.txt
@@ -0,0 +1,7 @@
+'peter34' is valid userName? = true
+'peter_34' is valid userName? = true
+'peter-34' is valid userName? = true
+
+'pk' is valid userName? = false
+'peter@89' is valid userName? = false
+'peter11111323445' is valid userName? = false
diff --git a/BasicJava/RegexDemo_username/RegexDemo/.classpath b/BasicJava/RegexDemo_username/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_username/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_username/RegexDemo/.project b/BasicJava/RegexDemo_username/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_username/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_username/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_username/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_username/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_username/RegexDemo/bin/RegexDemo.class b/BasicJava/RegexDemo_username/RegexDemo/bin/RegexDemo.class
new file mode 100644
index 000000000..f1e2a0494
Binary files /dev/null and b/BasicJava/RegexDemo_username/RegexDemo/bin/RegexDemo.class differ
diff --git a/BasicJava/RegexDemo_username/RegexDemo/bin/UserNameValidator.class b/BasicJava/RegexDemo_username/RegexDemo/bin/UserNameValidator.class
new file mode 100644
index 000000000..3baacbd41
Binary files /dev/null and b/BasicJava/RegexDemo_username/RegexDemo/bin/UserNameValidator.class differ
diff --git a/BasicJava/RegexDemo_username/RegexDemo/src/RegexDemo.java b/BasicJava/RegexDemo_username/RegexDemo/src/RegexDemo.java
new file mode 100644
index 000000000..8060bf245
--- /dev/null
+++ b/BasicJava/RegexDemo_username/RegexDemo/src/RegexDemo.java
@@ -0,0 +1,34 @@
+/**
+ *
+ * How to validate username with regular expression
+ *
+ */
+public class RegexDemo
+{
+
+ public static void main(String[] args)
+ {
+ UserNameValidator unValidator = new UserNameValidator();
+
+ System.out.println("'peter34' is valid userName? = "+unValidator.validate("peter34"));
+ System.out.println("'peter_34' is valid userName? = "+unValidator.validate("peter_34"));
+ System.out.println("'peter-34' is valid userName? = "+unValidator.validate("peter-34"));
+
+ System.out.println();
+
+ /*
+ * too short, min 3 characters
+ */
+ System.out.println("'pk' is valid userName? = "+unValidator.validate("pk"));
+ /*
+ * “@” character is not allow
+ */
+ System.out.println("'peter@89' is valid userName? = "+unValidator.validate("peter@89"));
+
+ /*
+ * too long, max characters of 15
+ */
+ System.out.println("'peter11111323445' is valid userName? = "+unValidator.validate("peter11111323445"));
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_username/RegexDemo/src/UserNameValidator.java b/BasicJava/RegexDemo_username/RegexDemo/src/UserNameValidator.java
new file mode 100644
index 000000000..d445ddc6a
--- /dev/null
+++ b/BasicJava/RegexDemo_username/RegexDemo/src/UserNameValidator.java
@@ -0,0 +1,35 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+/**
+ *
+ * How to validate username with regular expression
+ *
+ */
+public class UserNameValidator
+{
+ private Pattern pattern;
+ private Matcher matcher;
+
+ private static final String USERNAME_REGEX = "^[a-z0-9_-]{3,15}$";
+
+ public UserNameValidator()
+ {
+ pattern = Pattern.compile(USERNAME_REGEX);
+ }
+
+ /*
+ * Validate username with regular expression
+ *
+ * @param username username for validation
+ *
+ * @return true valid username, false invalid username
+ */
+ public boolean validate(final String username)
+ {
+
+ matcher = pattern.matcher(username);
+ return matcher.matches();
+
+ }
+
+}
diff --git a/BasicJava/RegexDemo_what_is_regex_caseinsensitive/RegexDemo/.classpath b/BasicJava/RegexDemo_what_is_regex_caseinsensitive/RegexDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/RegexDemo_what_is_regex_caseinsensitive/RegexDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/BasicJava/RegexDemo_what_is_regex_caseinsensitive/RegexDemo/.project b/BasicJava/RegexDemo_what_is_regex_caseinsensitive/RegexDemo/.project
new file mode 100644
index 000000000..a56f77973
--- /dev/null
+++ b/BasicJava/RegexDemo_what_is_regex_caseinsensitive/RegexDemo/.project
@@ -0,0 +1,17 @@
+
+
+ RegexDemo
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/BasicJava/RegexDemo_what_is_regex_caseinsensitive/RegexDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/RegexDemo_what_is_regex_caseinsensitive/RegexDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/RegexDemo_what_is_regex_caseinsensitive/RegexDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/RegexDemo_what_is_regex_caseinsensitive/RegexDemo/bin/RegexDemo1.class b/BasicJava/RegexDemo_what_is_regex_caseinsensitive/RegexDemo/bin/RegexDemo1.class
new file mode 100644
index 000000000..85b785f2d
Binary files /dev/null and b/BasicJava/RegexDemo_what_is_regex_caseinsensitive/RegexDemo/bin/RegexDemo1.class differ
diff --git a/BasicJava/RegexDemo_what_is_regex_caseinsensitive/RegexDemo/bin/RegexDemo2.class b/BasicJava/RegexDemo_what_is_regex_caseinsensitive/RegexDemo/bin/RegexDemo2.class
new file mode 100644
index 000000000..d0e7f67e6
Binary files /dev/null and b/BasicJava/RegexDemo_what_is_regex_caseinsensitive/RegexDemo/bin/RegexDemo2.class differ
diff --git a/BasicJava/RegexDemo_what_is_regex_caseinsensitive/RegexDemo/src/RegexDemo1.java b/BasicJava/RegexDemo_what_is_regex_caseinsensitive/RegexDemo/src/RegexDemo1.java
new file mode 100644
index 000000000..e55aee4c4
--- /dev/null
+++ b/BasicJava/RegexDemo_what_is_regex_caseinsensitive/RegexDemo/src/RegexDemo1.java
@@ -0,0 +1,29 @@
+import java.util.regex.Pattern;
+
+public class RegexDemo1
+{
+
+ public static void main(String[] args)
+ {
+ String inputCharSeq = "Peter Welcome to India.";
+
+ String regex = ".*Welcome.*";
+
+ /*
+ * Parameters:
+ *
+ * regex - The expression to be compiled
+ *
+ * input - The character sequence to be matched
+ *
+ * Returns:
+ *
+ * whether or not the regular expression matches on
+ * the input
+ *
+ */
+ boolean isMatch = Pattern.matches(regex, inputCharSeq);
+ System.out.println("The text contains 'Welcome'? = " + isMatch);
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_what_is_regex_caseinsensitive/RegexDemo/src/RegexDemo2.java b/BasicJava/RegexDemo_what_is_regex_caseinsensitive/RegexDemo/src/RegexDemo2.java
new file mode 100644
index 000000000..5fb782baa
--- /dev/null
+++ b/BasicJava/RegexDemo_what_is_regex_caseinsensitive/RegexDemo/src/RegexDemo2.java
@@ -0,0 +1,48 @@
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class RegexDemo2
+{
+
+ public static void main(String[] args)
+ {
+ String inputCharSeq = "Peter Welcome to India.";
+
+ String regex = ".*WElCoMe.*";
+
+ /*
+ * Parameters:
+ *
+ * regex - The expression to be compiled
+ * *
+ * flags - Match flags, a bit mask that may include
+ * CASE_INSENSITIVE, MULTILINE, DOTALL, UNICODE_CASE,
+ * CANON_EQ, UNIX_LINES, LITERAL, UNICODE_CHARACTER_CLASS and
+ * COMMENTS
+ *
+ * Returns:
+ *
+ * the given regular expression compiled into a pattern with
+ * the given flags
+ *
+ */
+ Pattern patternObj = Pattern.compile(regex, Pattern.CASE_INSENSITIVE);
+ /*
+ * Parameters:
+ *
+ * input - The character sequence to be matched
+ *
+ * Returns:
+ *
+ * A new matcher for this pattern
+ */
+ Matcher matcher = patternObj.matcher(inputCharSeq);
+ /*
+ * Returns:true if, and only if, the entire region sequence matches this
+ * matcher's pattern
+ */
+ boolean isMatched = matcher.matches();
+ System.out.println("Is it a Match? = " + isMatched);
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/RegexDemo_what_is_regex_caseinsensitive/RegexDemo1_Output.txt b/BasicJava/RegexDemo_what_is_regex_caseinsensitive/RegexDemo1_Output.txt
new file mode 100644
index 000000000..703c2ff6e
--- /dev/null
+++ b/BasicJava/RegexDemo_what_is_regex_caseinsensitive/RegexDemo1_Output.txt
@@ -0,0 +1 @@
+The text contains 'Welcome'? = true
diff --git a/BasicJava/RegexDemo_what_is_regex_caseinsensitive/RegexDemo2_Output.txt b/BasicJava/RegexDemo_what_is_regex_caseinsensitive/RegexDemo2_Output.txt
new file mode 100644
index 000000000..40174d2dd
--- /dev/null
+++ b/BasicJava/RegexDemo_what_is_regex_caseinsensitive/RegexDemo2_Output.txt
@@ -0,0 +1 @@
+Is it a Match? = true
diff --git a/BasicJava/StreamDemo_1_no_loop_Article/StreamDemo/.classpath b/BasicJava/StreamDemo_1_no_loop_Article/StreamDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/StreamDemo_1_no_loop_Article/StreamDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/Later/Streams/10/StreamDemo/.project b/BasicJava/StreamDemo_1_no_loop_Article/StreamDemo/.project
similarity index 100%
rename from Later/Streams/10/StreamDemo/.project
rename to BasicJava/StreamDemo_1_no_loop_Article/StreamDemo/.project
diff --git a/BasicJava/StreamDemo_1_no_loop_Article/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/StreamDemo_1_no_loop_Article/StreamDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/StreamDemo_1_no_loop_Article/StreamDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/StreamDemo_1_no_loop_Article/StreamDemo/bin/Article.class b/BasicJava/StreamDemo_1_no_loop_Article/StreamDemo/bin/Article.class
new file mode 100644
index 000000000..96fe30896
Binary files /dev/null and b/BasicJava/StreamDemo_1_no_loop_Article/StreamDemo/bin/Article.class differ
diff --git a/BasicJava/StreamDemo_1_no_loop_Article/StreamDemo/bin/StreamDemo1.class b/BasicJava/StreamDemo_1_no_loop_Article/StreamDemo/bin/StreamDemo1.class
new file mode 100644
index 000000000..9330e053f
Binary files /dev/null and b/BasicJava/StreamDemo_1_no_loop_Article/StreamDemo/bin/StreamDemo1.class differ
diff --git a/BasicJava/StreamDemo_1_no_loop_Article/StreamDemo/bin/StreamDemo2.class b/BasicJava/StreamDemo_1_no_loop_Article/StreamDemo/bin/StreamDemo2.class
new file mode 100644
index 000000000..564c4d812
Binary files /dev/null and b/BasicJava/StreamDemo_1_no_loop_Article/StreamDemo/bin/StreamDemo2.class differ
diff --git a/BasicJava/StreamDemo_1_no_loop_Article/StreamDemo/src/Article.java b/BasicJava/StreamDemo_1_no_loop_Article/StreamDemo/src/Article.java
new file mode 100644
index 000000000..be71be3ed
--- /dev/null
+++ b/BasicJava/StreamDemo_1_no_loop_Article/StreamDemo/src/Article.java
@@ -0,0 +1,52 @@
+public class Article
+{
+ private String title;
+ private String author;
+ private String tagName;
+
+ public Article(String title, String author, String tagName)
+ {
+ super();
+ this.title = title;
+ this.author = author;
+ this.tagName = tagName;
+ }
+
+ public String getTitle()
+ {
+ return title;
+ }
+
+ public void setTitle(String title)
+ {
+ this.title = title;
+ }
+
+ public String getAuthor()
+ {
+ return author;
+ }
+
+ public void setAuthor(String author)
+ {
+ this.author = author;
+ }
+
+ public String getTagName()
+ {
+ return tagName;
+ }
+
+ public void setTagName(String tagName)
+ {
+ this.tagName = tagName;
+ }
+
+ @Override
+ public String toString()
+ {
+ return "Article [title=" + title + ", author=" + author + ", tagName="
+ + tagName + "]";
+ }
+
+}
diff --git a/BasicJava/StreamDemo_1_no_loop_Article/StreamDemo/src/StreamDemo1.java b/BasicJava/StreamDemo_1_no_loop_Article/StreamDemo/src/StreamDemo1.java
new file mode 100644
index 000000000..f1e19f733
--- /dev/null
+++ b/BasicJava/StreamDemo_1_no_loop_Article/StreamDemo/src/StreamDemo1.java
@@ -0,0 +1,66 @@
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+
+/**
+ * In Java 8 No more loops:
+ *
+ * Find the first article in the collection that has the tagName “Java”.
+ */
+public class StreamDemo1
+{
+ public static void main(String[] args)
+ {
+ List articleList = getArticleList();
+
+
+ Article article = getFirstArticleUsingForLoop(articleList);
+ System.out.println(article);
+
+ System.out.println("------------------------------------------------------------------");
+
+ article = getFirstArticleUsingStream(articleList);
+ System.out.println(article);
+ }
+
+ private static Article getFirstArticleUsingForLoop(List articleList)
+ {
+ /*
+ * Before JDK8 - Using a for-loop
+ */
+ for (Article article : articleList)
+ {
+ if (article.getTagName().contains("Java"))
+ {
+ return article;
+ }
+ }
+ return null;
+ }
+
+ private static Article getFirstArticleUsingStream(List articleList)
+ {
+ /*
+ * With JDK 8 - Using operations from the stream API
+ */
+ Optional optional = articleList.stream()
+ .filter(article -> article.getTagName().contains("Java"))
+ .findFirst();
+
+ Article article = optional.get();
+ return article;
+ }
+
+
+ private static List getArticleList()
+ {
+ List listOfArticle = new ArrayList();
+
+ listOfArticle.add(new Article("Java complete Reference","John","Java"));
+ listOfArticle.add(new Article("Java Programming","John","Java"));
+ listOfArticle.add(new Article("RESTful web services","John","Web Service"));
+ listOfArticle.add(new Article("Programming Ruby","John","Ruby"));
+
+ return listOfArticle;
+ }
+}
\ No newline at end of file
diff --git a/BasicJava/StreamDemo_1_no_loop_Article/StreamDemo/src/StreamDemo2.java b/BasicJava/StreamDemo_1_no_loop_Article/StreamDemo/src/StreamDemo2.java
new file mode 100644
index 000000000..a67b129bf
--- /dev/null
+++ b/BasicJava/StreamDemo_1_no_loop_Article/StreamDemo/src/StreamDemo2.java
@@ -0,0 +1,68 @@
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * Get all articles in the collection that has the tagName “Java”.
+ */
+public class StreamDemo2
+{
+ public static void main(String[] args)
+ {
+ List articleList = getArticleList();
+ List javaArticleList = getAllArticleUsingForLoop(articleList);
+ System.out.println(javaArticleList);
+
+ System.out.println("------------------------------------------------------------------");
+
+ /*
+ * With JDK 8 - Using operations from the stream API
+ */
+ javaArticleList = getAllArticleUsingStream(articleList);
+ System.out.println(javaArticleList);
+ }
+
+
+ private static List getAllArticleUsingForLoop(List articleList)
+ {
+ /*
+ * Before JDK8 - Using a for-loop
+ */
+ List javaArticleList = new ArrayList();
+ for (Article article : articleList)
+ {
+ if (article.getTagName().contains("Java"))
+ {
+ javaArticleList.add(article);
+ }
+ }
+ return javaArticleList;
+ }
+
+ private static List getAllArticleUsingStream(List articleList)
+ {
+ /*
+ * With JDK 8 - Using operations from the stream API
+ */
+ List javaArticleList = articleList.stream()
+ .filter(article -> article.getTagName().contains("Java"))
+ .collect(Collectors.toList());
+
+ return javaArticleList;
+
+ }
+
+
+ private static List getArticleList()
+ {
+ List listOfArticle = new ArrayList();
+
+ listOfArticle.add(new Article("Java complete Reference","John","Java"));
+ listOfArticle.add( new Article("Java Programming","John","Java"));
+ listOfArticle.add(new Article("RESTful web services","John","Web Service"));
+ listOfArticle.add(new Article("Programming Ruby","John","Ruby"));
+
+ return listOfArticle;
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/StreamDemo_1_no_loop_Article/StreamDemo1_Output.txt b/BasicJava/StreamDemo_1_no_loop_Article/StreamDemo1_Output.txt
new file mode 100644
index 000000000..7df7aa35a
--- /dev/null
+++ b/BasicJava/StreamDemo_1_no_loop_Article/StreamDemo1_Output.txt
@@ -0,0 +1,3 @@
+Article [title=Java complete Reference, author=John, tagName=Java]
+------------------------------------------------------------------
+Article [title=Java complete Reference, author=John, tagName=Java]
diff --git a/BasicJava/StreamDemo_1_no_loop_Article/StreamDemo2_Output.txt b/BasicJava/StreamDemo_1_no_loop_Article/StreamDemo2_Output.txt
new file mode 100644
index 000000000..5b798115e
--- /dev/null
+++ b/BasicJava/StreamDemo_1_no_loop_Article/StreamDemo2_Output.txt
@@ -0,0 +1,5 @@
+[Article [title=Java complete Reference, author=John, tagName=Java],
+Article [title=Java Programming, author=John, tagName=Java]]
+------------------------------------------------------------------
+[Article [title=Java complete Reference, author=John, tagName=Java],
+Article [title=Java Programming, author=John, tagName=Java]]
diff --git a/BasicJava/StreamDemo_2_no_loop_Article_group/StreamDemo/.classpath b/BasicJava/StreamDemo_2_no_loop_Article_group/StreamDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/StreamDemo_2_no_loop_Article_group/StreamDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/Later/Streams/11/StreamDemo/.project b/BasicJava/StreamDemo_2_no_loop_Article_group/StreamDemo/.project
similarity index 100%
rename from Later/Streams/11/StreamDemo/.project
rename to BasicJava/StreamDemo_2_no_loop_Article_group/StreamDemo/.project
diff --git a/BasicJava/StreamDemo_2_no_loop_Article_group/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/StreamDemo_2_no_loop_Article_group/StreamDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/StreamDemo_2_no_loop_Article_group/StreamDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/StreamDemo_2_no_loop_Article_group/StreamDemo/bin/Article.class b/BasicJava/StreamDemo_2_no_loop_Article_group/StreamDemo/bin/Article.class
new file mode 100644
index 000000000..96fe30896
Binary files /dev/null and b/BasicJava/StreamDemo_2_no_loop_Article_group/StreamDemo/bin/Article.class differ
diff --git a/BasicJava/StreamDemo_2_no_loop_Article_group/StreamDemo/bin/StreamDemo1.class b/BasicJava/StreamDemo_2_no_loop_Article_group/StreamDemo/bin/StreamDemo1.class
new file mode 100644
index 000000000..a4d739eaf
Binary files /dev/null and b/BasicJava/StreamDemo_2_no_loop_Article_group/StreamDemo/bin/StreamDemo1.class differ
diff --git a/BasicJava/StreamDemo_2_no_loop_Article_group/StreamDemo/bin/StreamDemo2.class b/BasicJava/StreamDemo_2_no_loop_Article_group/StreamDemo/bin/StreamDemo2.class
new file mode 100644
index 000000000..78f7d5ea9
Binary files /dev/null and b/BasicJava/StreamDemo_2_no_loop_Article_group/StreamDemo/bin/StreamDemo2.class differ
diff --git a/BasicJava/StreamDemo_2_no_loop_Article_group/StreamDemo/src/Article.java b/BasicJava/StreamDemo_2_no_loop_Article_group/StreamDemo/src/Article.java
new file mode 100644
index 000000000..be71be3ed
--- /dev/null
+++ b/BasicJava/StreamDemo_2_no_loop_Article_group/StreamDemo/src/Article.java
@@ -0,0 +1,52 @@
+public class Article
+{
+ private String title;
+ private String author;
+ private String tagName;
+
+ public Article(String title, String author, String tagName)
+ {
+ super();
+ this.title = title;
+ this.author = author;
+ this.tagName = tagName;
+ }
+
+ public String getTitle()
+ {
+ return title;
+ }
+
+ public void setTitle(String title)
+ {
+ this.title = title;
+ }
+
+ public String getAuthor()
+ {
+ return author;
+ }
+
+ public void setAuthor(String author)
+ {
+ this.author = author;
+ }
+
+ public String getTagName()
+ {
+ return tagName;
+ }
+
+ public void setTagName(String tagName)
+ {
+ this.tagName = tagName;
+ }
+
+ @Override
+ public String toString()
+ {
+ return "Article [title=" + title + ", author=" + author + ", tagName="
+ + tagName + "]";
+ }
+
+}
diff --git a/BasicJava/StreamDemo_2_no_loop_Article_group/StreamDemo/src/StreamDemo1.java b/BasicJava/StreamDemo_2_no_loop_Article_group/StreamDemo/src/StreamDemo1.java
new file mode 100644
index 000000000..3765faf94
--- /dev/null
+++ b/BasicJava/StreamDemo_2_no_loop_Article_group/StreamDemo/src/StreamDemo1.java
@@ -0,0 +1,82 @@
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * Group all the articles based on the author.
+ */
+public class StreamDemo1
+{
+ public static void main(String[] args)
+ {
+ List articleList = getArticleList();
+
+ Map> groupByAuthorMap = groupByAuthorUsingForLoop(
+ articleList);
+
+ for (String key : groupByAuthorMap.keySet())
+ {
+ System.out.println(key + " = " + groupByAuthorMap.get(key));
+ }
+
+ System.out.println("-----------------------------");
+
+ groupByAuthorMap = groupByAuthorUsingStream(articleList);
+ for (String key : groupByAuthorMap.keySet())
+ {
+ System.out.println(key + " = " + groupByAuthorMap.get(key));
+ }
+ }
+
+ private static Map> groupByAuthorUsingForLoop(
+ List articleList)
+ {
+ /*
+ * Before JDK8 - Using a for-loop
+ */
+ Map> groupByAuthorMap = new HashMap<>();
+
+ for (Article article : articleList)
+ {
+ if (groupByAuthorMap.containsKey(article.getAuthor()))
+ {
+ groupByAuthorMap.get(article.getAuthor()).add(article);
+ }
+ else
+ {
+ ArrayList articles = new ArrayList<>();
+ articles.add(article);
+ groupByAuthorMap.put(article.getAuthor(), articles);
+ }
+ }
+
+ return groupByAuthorMap;
+ }
+
+ private static Map> groupByAuthorUsingStream(
+ List articleList)
+ {
+ /*
+ * With JDK 8 - Using operations from the stream API
+ */
+ Map> groupByAuthorMap = articleList
+ .stream()
+ .collect(Collectors.groupingBy(Article::getAuthor));
+ return groupByAuthorMap;
+ }
+
+
+ private static List getArticleList()
+ {
+ List listOfArticle = new ArrayList();
+
+ listOfArticle.add(new Article("Java complete Reference","John","Java"));
+ listOfArticle.add( new Article("Java Programming","John","Java"));
+ listOfArticle.add(new Article("RESTful web services","Peter","Web Service"));
+ listOfArticle.add(new Article("Programming Ruby","Peter","Ruby"));
+
+ return listOfArticle;
+ }
+}
\ No newline at end of file
diff --git a/BasicJava/StreamDemo_2_no_loop_Article_group/StreamDemo/src/StreamDemo2.java b/BasicJava/StreamDemo_2_no_loop_Article_group/StreamDemo/src/StreamDemo2.java
new file mode 100644
index 000000000..140a142b5
--- /dev/null
+++ b/BasicJava/StreamDemo_2_no_loop_Article_group/StreamDemo/src/StreamDemo2.java
@@ -0,0 +1,66 @@
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+/**
+ * Get DistinctTagNames in the collection.
+ */
+public class StreamDemo2
+{
+ public static void main(String[] args)
+ {
+ List articleList = getArticleList();
+ Set distinctTagNamesSet = getDistinctTagNamesUsingForLoop(articleList);
+ System.out.println(distinctTagNamesSet);
+
+ System.out.println("------------------------------------------------------------------");
+
+ distinctTagNamesSet = getDistinctTagNamesUsingStream(articleList);
+ System.out.println(distinctTagNamesSet);
+ }
+
+
+ private static Set getDistinctTagNamesUsingForLoop(List articleList)
+ {
+ /*
+ * Before JDK8 - Using a for-loop
+ */
+ Set distinctTagNamesSet = new HashSet<>();
+
+ for (Article article : articleList)
+ {
+ distinctTagNamesSet.add(article.getTagName());
+ }
+
+ return distinctTagNamesSet;
+ }
+
+ private static Set getDistinctTagNamesUsingStream(List articleList)
+ {
+ /*
+ * With JDK 8 - Using operations from the stream API
+ */
+ Set distinctTagNamesSet = articleList.stream()
+ .map(article -> article.getTagName()).distinct()
+ .collect(Collectors.toSet());
+
+ return distinctTagNamesSet;
+
+ }
+
+
+ private static List getArticleList()
+ {
+ List listOfArticle = new ArrayList();
+
+ listOfArticle.add(new Article("Java complete Reference","John","Java"));
+ listOfArticle.add( new Article("Java Programming","John","Java"));
+ listOfArticle.add(new Article("RESTful web services","John","Web Service"));
+ listOfArticle.add(new Article("Programming Ruby","John","Ruby"));
+
+ return listOfArticle;
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/StreamDemo_2_no_loop_Article_group/StreamDemo1_Output.txt b/BasicJava/StreamDemo_2_no_loop_Article_group/StreamDemo1_Output.txt
new file mode 100644
index 000000000..191eea217
--- /dev/null
+++ b/BasicJava/StreamDemo_2_no_loop_Article_group/StreamDemo1_Output.txt
@@ -0,0 +1,9 @@
+John = [Article [title=Java complete Reference, author=John, tagName=Java],
+ Article [title=Java Programming, author=John, tagName=Java]]
+Peter = [Article [title=RESTful web services, author=Peter, tagName=Web Service],
+ Article [title=Programming Ruby, author=Peter, tagName=Ruby]]
+-----------------------------
+John = [Article [title=Java complete Reference, author=John, tagName=Java],
+ Article [title=Java Programming, author=John, tagName=Java]]
+Peter = [Article [title=RESTful web services, author=Peter, tagName=Web Service],
+ Article [title=Programming Ruby, author=Peter, tagName=Ruby]]
diff --git a/BasicJava/StreamDemo_2_no_loop_Article_group/StreamDemo2_Output.txt b/BasicJava/StreamDemo_2_no_loop_Article_group/StreamDemo2_Output.txt
new file mode 100644
index 000000000..7bf098b82
--- /dev/null
+++ b/BasicJava/StreamDemo_2_no_loop_Article_group/StreamDemo2_Output.txt
@@ -0,0 +1,3 @@
+[Java, Ruby, Web Service]
+------------------------------------------------------------------
+[Java, Ruby, Web Service]
diff --git a/BasicJava/StreamDemo_Book_Auther_name_App/Output.txt b/BasicJava/StreamDemo_Book_Auther_name_App/Output.txt
new file mode 100644
index 000000000..055921025
--- /dev/null
+++ b/BasicJava/StreamDemo_Book_Auther_name_App/Output.txt
@@ -0,0 +1 @@
+[STEVE, JOHN]
diff --git a/BasicJava/StreamDemo_Book_Auther_name_App/StreamDemo/.classpath b/BasicJava/StreamDemo_Book_Auther_name_App/StreamDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/StreamDemo_Book_Auther_name_App/StreamDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/Later/Streams/12/StreamDemo/.project b/BasicJava/StreamDemo_Book_Auther_name_App/StreamDemo/.project
similarity index 100%
rename from Later/Streams/12/StreamDemo/.project
rename to BasicJava/StreamDemo_Book_Auther_name_App/StreamDemo/.project
diff --git a/BasicJava/StreamDemo_Book_Auther_name_App/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/StreamDemo_Book_Auther_name_App/StreamDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/StreamDemo_Book_Auther_name_App/StreamDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/StreamDemo_Book_Auther_name_App/StreamDemo/bin/Author.class b/BasicJava/StreamDemo_Book_Auther_name_App/StreamDemo/bin/Author.class
new file mode 100644
index 000000000..95fdbaf3e
Binary files /dev/null and b/BasicJava/StreamDemo_Book_Auther_name_App/StreamDemo/bin/Author.class differ
diff --git a/BasicJava/StreamDemo_Book_Auther_name_App/StreamDemo/bin/Book.class b/BasicJava/StreamDemo_Book_Auther_name_App/StreamDemo/bin/Book.class
new file mode 100644
index 000000000..b2918b44b
Binary files /dev/null and b/BasicJava/StreamDemo_Book_Auther_name_App/StreamDemo/bin/Book.class differ
diff --git a/BasicJava/StreamDemo_Book_Auther_name_App/StreamDemo/bin/StreamDemo.class b/BasicJava/StreamDemo_Book_Auther_name_App/StreamDemo/bin/StreamDemo.class
new file mode 100644
index 000000000..75f69905d
Binary files /dev/null and b/BasicJava/StreamDemo_Book_Auther_name_App/StreamDemo/bin/StreamDemo.class differ
diff --git a/BasicJava/StreamDemo_Book_Auther_name_App/StreamDemo/src/Author.java b/BasicJava/StreamDemo_Book_Auther_name_App/StreamDemo/src/Author.java
new file mode 100644
index 000000000..5a6b8b1a5
--- /dev/null
+++ b/BasicJava/StreamDemo_Book_Auther_name_App/StreamDemo/src/Author.java
@@ -0,0 +1,45 @@
+public class Author
+{
+ private String name;
+ private String email;
+ private int age;
+
+ public Author(String name, String email, int age)
+ {
+ super();
+ this.name = name;
+ this.email = email;
+ this.age = age;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public String getEmail()
+ {
+ return email;
+ }
+
+ public void setEmail(String email)
+ {
+ this.email = email;
+ }
+
+ public int getAge()
+ {
+ return age;
+ }
+
+ public void setAge(int age)
+ {
+ this.age = age;
+ }
+
+}
diff --git a/BasicJava/StreamDemo_Book_Auther_name_App/StreamDemo/src/Book.java b/BasicJava/StreamDemo_Book_Auther_name_App/StreamDemo/src/Book.java
new file mode 100644
index 000000000..f30ecf599
--- /dev/null
+++ b/BasicJava/StreamDemo_Book_Auther_name_App/StreamDemo/src/Book.java
@@ -0,0 +1,46 @@
+public class Book
+{
+
+ private String name;
+ private Author author;
+ private double price;
+
+ public Book(String name, Author author, double price)
+ {
+ super();
+ this.name = name;
+ this.author = author;
+ this.price = price;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public Author getAuthor()
+ {
+ return author;
+ }
+
+ public void setAuthor(Author author)
+ {
+ this.author = author;
+ }
+
+ public double getPrice()
+ {
+ return price;
+ }
+
+ public void setPrice(double price)
+ {
+ this.price = price;
+ }
+
+}
diff --git a/BasicJava/StreamDemo_Book_Auther_name_App/StreamDemo/src/StreamDemo.java b/BasicJava/StreamDemo_Book_Auther_name_App/StreamDemo/src/StreamDemo.java
new file mode 100644
index 000000000..653114077
--- /dev/null
+++ b/BasicJava/StreamDemo_Book_Auther_name_App/StreamDemo/src/StreamDemo.java
@@ -0,0 +1,59 @@
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ *
+ * Get the unique names in uppercase of the first 2 book authors
+ * that are 30 years old or older.
+ *
+ */
+public class StreamDemo
+{
+ public static void main(String[] args)
+ {
+ List bookList = new ArrayList();
+
+ // Adding Books
+ bookList.add(new Book("Java Basics",
+ new Author("Peter", "peter@yahoo.com", 25), 1000.50));
+
+ bookList.add(new Book("Mysql Basics",
+ new Author("Steve", "steve@yahoo.com", 35), 2000.0));
+
+ bookList.add(new Book("Oracle Basics",
+ new Author("John", "john@yahoo.com", 45), 3000.0));
+
+ bookList.add(new Book("Angular Basics",
+ new Author("Dave", "dave@yahoo.com", 55), 3000.0));
+
+ bookList.add(new Book("Jquery Basics",
+ new Author("Dave", "dave@yahoo.com", 55), 1000.0));
+
+
+ List filteredAutherNameList = new ArrayList();
+
+ /*
+ * From this list of books, we first need to map from books to
+ * the book authors which gets us a stream of Authors and then
+ * filter them to just get those authors that are 30 or over.
+ * We’ll map the name of the Author, which returns us a
+ * stream of Strings. We’ll map this to uppercase Strings and
+ * make sure the elements are unique in the stream and grab
+ * the first 2. Finally we return this as a list using toList
+ * from java.util.streams.Collectors.
+ */
+
+ filteredAutherNameList = bookList.stream() // Stream of book
+ .map(book -> book.getAuthor()) // Stream to Stream
+ .filter(author -> author.getAge() >= 30) // Filter the author whose Age is >=30
+ .map(Author::getName) //Stream to Stream
+ .map(String::toUpperCase) // Convert name as upper case
+ .distinct() // Get the unique elements[i.e. name]
+ .limit(2) // Grab the first 2
+ .collect(Collectors.toList()); // collect the result as a list
+
+ System.out.println(filteredAutherNameList);
+
+ }
+}
\ No newline at end of file
diff --git a/BasicJava/StreamDemo_Book_Auther_sum_age_App/Output.txt b/BasicJava/StreamDemo_Book_Auther_sum_age_App/Output.txt
new file mode 100644
index 000000000..fb85eaa17
--- /dev/null
+++ b/BasicJava/StreamDemo_Book_Auther_sum_age_App/Output.txt
@@ -0,0 +1 @@
+sumOfMaleAuthorAge = 90
diff --git a/BasicJava/StreamDemo_Book_Auther_sum_age_App/StreamDemo/.classpath b/BasicJava/StreamDemo_Book_Auther_sum_age_App/StreamDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/StreamDemo_Book_Auther_sum_age_App/StreamDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/Later/Streams/13/StreamDemo/.project b/BasicJava/StreamDemo_Book_Auther_sum_age_App/StreamDemo/.project
similarity index 100%
rename from Later/Streams/13/StreamDemo/.project
rename to BasicJava/StreamDemo_Book_Auther_sum_age_App/StreamDemo/.project
diff --git a/BasicJava/StreamDemo_Book_Auther_sum_age_App/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/StreamDemo_Book_Auther_sum_age_App/StreamDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/StreamDemo_Book_Auther_sum_age_App/StreamDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/StreamDemo_Book_Auther_sum_age_App/StreamDemo/bin/Author.class b/BasicJava/StreamDemo_Book_Auther_sum_age_App/StreamDemo/bin/Author.class
new file mode 100644
index 000000000..63c6aad22
Binary files /dev/null and b/BasicJava/StreamDemo_Book_Auther_sum_age_App/StreamDemo/bin/Author.class differ
diff --git a/BasicJava/StreamDemo_Book_Auther_sum_age_App/StreamDemo/bin/Book.class b/BasicJava/StreamDemo_Book_Auther_sum_age_App/StreamDemo/bin/Book.class
new file mode 100644
index 000000000..b2918b44b
Binary files /dev/null and b/BasicJava/StreamDemo_Book_Auther_sum_age_App/StreamDemo/bin/Book.class differ
diff --git a/BasicJava/StreamDemo_Book_Auther_sum_age_App/StreamDemo/bin/StreamDemo.class b/BasicJava/StreamDemo_Book_Auther_sum_age_App/StreamDemo/bin/StreamDemo.class
new file mode 100644
index 000000000..f80454a88
Binary files /dev/null and b/BasicJava/StreamDemo_Book_Auther_sum_age_App/StreamDemo/bin/StreamDemo.class differ
diff --git a/BasicJava/StreamDemo_Book_Auther_sum_age_App/StreamDemo/src/Author.java b/BasicJava/StreamDemo_Book_Auther_sum_age_App/StreamDemo/src/Author.java
new file mode 100644
index 000000000..95d207da0
--- /dev/null
+++ b/BasicJava/StreamDemo_Book_Auther_sum_age_App/StreamDemo/src/Author.java
@@ -0,0 +1,57 @@
+public class Author
+{
+ private String name;
+ private String email;
+ private int age;
+ private char gender;
+
+ public Author(String name, String email, int age, char gender)
+ {
+ super();
+ this.name = name;
+ this.email = email;
+ this.age = age;
+ this.gender = gender;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public String getEmail()
+ {
+ return email;
+ }
+
+ public void setEmail(String email)
+ {
+ this.email = email;
+ }
+
+ public int getAge()
+ {
+ return age;
+ }
+
+ public void setAge(int age)
+ {
+ this.age = age;
+ }
+
+ public char getGender()
+ {
+ return gender;
+ }
+
+ public void setGender(char gender)
+ {
+ this.gender = gender;
+ }
+
+}
diff --git a/BasicJava/StreamDemo_Book_Auther_sum_age_App/StreamDemo/src/Book.java b/BasicJava/StreamDemo_Book_Auther_sum_age_App/StreamDemo/src/Book.java
new file mode 100644
index 000000000..f30ecf599
--- /dev/null
+++ b/BasicJava/StreamDemo_Book_Auther_sum_age_App/StreamDemo/src/Book.java
@@ -0,0 +1,46 @@
+public class Book
+{
+
+ private String name;
+ private Author author;
+ private double price;
+
+ public Book(String name, Author author, double price)
+ {
+ super();
+ this.name = name;
+ this.author = author;
+ this.price = price;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public Author getAuthor()
+ {
+ return author;
+ }
+
+ public void setAuthor(Author author)
+ {
+ this.author = author;
+ }
+
+ public double getPrice()
+ {
+ return price;
+ }
+
+ public void setPrice(double price)
+ {
+ this.price = price;
+ }
+
+}
diff --git a/BasicJava/StreamDemo_Book_Auther_sum_age_App/StreamDemo/src/StreamDemo.java b/BasicJava/StreamDemo_Book_Auther_sum_age_App/StreamDemo/src/StreamDemo.java
new file mode 100644
index 000000000..c7df577b7
--- /dev/null
+++ b/BasicJava/StreamDemo_Book_Auther_sum_age_App/StreamDemo/src/StreamDemo.java
@@ -0,0 +1,51 @@
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ *
+ * How to get the sum of ages of all male authors younger than 50.
+ *
+ */
+public class StreamDemo
+{
+ public static void main(String[] args)
+ {
+ List bookList = new ArrayList();
+
+ // Adding Books
+ bookList.add(new Book("Java Basics",
+ new Author("Peter", "peter@yahoo.com", 20, 'M'),1000.50));
+
+ bookList.add(new Book("Mysql Basics",
+ new Author("Steve", "steve@yahoo.com", 30, 'M'),2000.0));
+
+ bookList.add(new Book("Oracle Basics",
+ new Author("John", "john@yahoo.com", 40, 'M'),3000.0));
+
+ bookList.add(new Book("Angular Basics",
+ new Author("Juli", "juli@yahoo.com", 55, 'F'),3000.0));
+
+ bookList.add(new Book("Jquery Basics",
+ new Author("Dave", "dave@yahoo.com", 65, 'M'),1000.0));
+
+ /*
+ * Using the same original stream we once again map the
+ * elements from Books to Authors and filter just on those
+ * authors that are male. Next we map the elements from
+ * Authors to author ages which gives us a stream of ints. We
+ * filter ages to just those that are less than 50 and use a
+ * reduce operation and Integer::sum to total the ages.
+ */
+
+ Integer sumOfMaleAuthorAge =
+ bookList.stream()//Stream
+ .map(Book::getAuthor) //Stream to Stream.
+ .filter(author -> author.getGender() == 'M') // filter the male Authors.
+ .map(Author::getAge)//Stream to Stream.
+ .filter(age -> age < 50)//filter the age<50.
+ .reduce(0, Integer::sum);// calculate the sum of ages.
+
+ System.out.println("sumOfMaleAuthorAge = " + sumOfMaleAuthorAge);
+
+ }
+}
\ No newline at end of file
diff --git a/BasicJava/StreamDemo_Collect_Set_App/Output.txt b/BasicJava/StreamDemo_Collect_Set_App/Output.txt
new file mode 100644
index 000000000..a769e1f64
--- /dev/null
+++ b/BasicJava/StreamDemo_Collect_Set_App/Output.txt
@@ -0,0 +1 @@
+[10000, 15000]
diff --git a/BasicJava/StreamDemo_Collect_Set_App/StreamDemo/.classpath b/BasicJava/StreamDemo_Collect_Set_App/StreamDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/StreamDemo_Collect_Set_App/StreamDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/Later/Streams/14/StreamDemo/.project b/BasicJava/StreamDemo_Collect_Set_App/StreamDemo/.project
similarity index 100%
rename from Later/Streams/14/StreamDemo/.project
rename to BasicJava/StreamDemo_Collect_Set_App/StreamDemo/.project
diff --git a/BasicJava/StreamDemo_Collect_Set_App/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/StreamDemo_Collect_Set_App/StreamDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/StreamDemo_Collect_Set_App/StreamDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/Later/Streams/10/StreamDemo/bin/Product.class b/BasicJava/StreamDemo_Collect_Set_App/StreamDemo/bin/Product.class
similarity index 100%
rename from Later/Streams/10/StreamDemo/bin/Product.class
rename to BasicJava/StreamDemo_Collect_Set_App/StreamDemo/bin/Product.class
diff --git a/BasicJava/StreamDemo_Collect_Set_App/StreamDemo/bin/StreamDemo.class b/BasicJava/StreamDemo_Collect_Set_App/StreamDemo/bin/StreamDemo.class
new file mode 100644
index 000000000..f300dacd8
Binary files /dev/null and b/BasicJava/StreamDemo_Collect_Set_App/StreamDemo/bin/StreamDemo.class differ
diff --git a/Later/Streams/10/StreamDemo/src/Product.java b/BasicJava/StreamDemo_Collect_Set_App/StreamDemo/src/Product.java
similarity index 100%
rename from Later/Streams/10/StreamDemo/src/Product.java
rename to BasicJava/StreamDemo_Collect_Set_App/StreamDemo/src/Product.java
diff --git a/BasicJava/StreamDemo_Collect_Set_App/StreamDemo/src/StreamDemo.java b/BasicJava/StreamDemo_Collect_Set_App/StreamDemo/src/StreamDemo.java
new file mode 100644
index 000000000..1d1a52294
--- /dev/null
+++ b/BasicJava/StreamDemo_Collect_Set_App/StreamDemo/src/StreamDemo.java
@@ -0,0 +1,35 @@
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+/**
+ *
+ * Stream allows you to collect your result in any various forms. You
+ * can get you result as set, list or map and can perform manipulation
+ * on the elements.
+ *
+ */
+public class StreamDemo
+{
+ public static void main(String[] args)
+ {
+ List productList = new ArrayList();
+
+ // Adding Products
+ productList.add(new Product(1, "Sony mobile", 25000));
+ productList.add(new Product(2, "Lenovo mobile", 15000));
+ productList.add(new Product(3, "Nokia mobile", 10000));
+ productList.add(new Product(4, "Samsung mobile", 40000));
+ productList.add(new Product(5, "Micromax mobile", 10000));
+
+
+ Set productPriceSet =
+ productList.stream()
+ .filter(product->product.getPrice() < 20000) // filter product on the base of price
+ .map(product->product.getPrice())
+ .collect(Collectors.toSet()); //collect it as Set(remove duplicate elements)
+
+ System.out.println(productPriceSet);
+ }
+}
\ No newline at end of file
diff --git a/BasicJava/StreamDemo_Collectors_group/Output.txt b/BasicJava/StreamDemo_Collectors_group/Output.txt
new file mode 100644
index 000000000..4d400ee28
--- /dev/null
+++ b/BasicJava/StreamDemo_Collectors_group/Output.txt
@@ -0,0 +1,7 @@
+20 = [Product [name=lemon, price=20], Product [name=bread, price=20]]
+30 = [Product [name=sugar, price=30]]
+15 = [Product [name=potatoes, price=15], Product [name=orange, price=15]]
+---------------------------------------------------
+false = [Product [name=potatoes, price=15], Product [name=orange, price=15],
+ Product [name=lemon, price=20], Product [name=bread, price=20]]
+true = [Product [name=sugar, price=30]]
diff --git a/BasicJava/StreamDemo_Collectors_group/StreamDemo/.classpath b/BasicJava/StreamDemo_Collectors_group/StreamDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/StreamDemo_Collectors_group/StreamDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/Later/Streams/16/StreamDemo/.project b/BasicJava/StreamDemo_Collectors_group/StreamDemo/.project
similarity index 100%
rename from Later/Streams/16/StreamDemo/.project
rename to BasicJava/StreamDemo_Collectors_group/StreamDemo/.project
diff --git a/BasicJava/StreamDemo_Collectors_group/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/StreamDemo_Collectors_group/StreamDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/StreamDemo_Collectors_group/StreamDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/StreamDemo_Collectors_group/StreamDemo/bin/Product.class b/BasicJava/StreamDemo_Collectors_group/StreamDemo/bin/Product.class
new file mode 100644
index 000000000..a66bb2673
Binary files /dev/null and b/BasicJava/StreamDemo_Collectors_group/StreamDemo/bin/Product.class differ
diff --git a/BasicJava/StreamDemo_Collectors_group/StreamDemo/bin/StreamDemo.class b/BasicJava/StreamDemo_Collectors_group/StreamDemo/bin/StreamDemo.class
new file mode 100644
index 000000000..37cf32af7
Binary files /dev/null and b/BasicJava/StreamDemo_Collectors_group/StreamDemo/bin/StreamDemo.class differ
diff --git a/BasicJava/StreamDemo_Collectors_group/StreamDemo/src/Product.java b/BasicJava/StreamDemo_Collectors_group/StreamDemo/src/Product.java
new file mode 100644
index 000000000..84d632c09
--- /dev/null
+++ b/BasicJava/StreamDemo_Collectors_group/StreamDemo/src/Product.java
@@ -0,0 +1,40 @@
+
+public class Product
+{
+ private String name;
+ private int price;
+
+ public Product(String name, int price)
+ {
+ super();
+ this.name = name;
+ this.price = price;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public int getPrice()
+ {
+ return price;
+ }
+
+ public void setPrice(int price)
+ {
+ this.price = price;
+ }
+
+ @Override
+ public String toString()
+ {
+ return "Product [name=" + name + ", price=" + price + "]";
+ }
+
+}
diff --git a/BasicJava/StreamDemo_Collectors_group/StreamDemo/src/StreamDemo.java b/BasicJava/StreamDemo_Collectors_group/StreamDemo/src/StreamDemo.java
new file mode 100644
index 000000000..ffb2fb422
--- /dev/null
+++ b/BasicJava/StreamDemo_Collectors_group/StreamDemo/src/StreamDemo.java
@@ -0,0 +1,52 @@
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+public class StreamDemo
+{
+ public static void main(String[] args)
+ {
+ List productList = Arrays.asList(
+ new Product("potatoes", 15),
+ new Product("orange", 15), new Product("lemon", 20),
+ new Product("bread", 20), new Product("sugar", 30));
+
+ /*
+ * Grouping of stream’s elements according to the specified
+ * function:
+ *
+ * The stream was reduced to the Map which groups all products
+ * by their price.
+ */
+ Map> map = productList.stream()
+ .collect(Collectors.groupingBy(Product::getPrice));
+
+ Set>> entrySet = map.entrySet();
+ for (Entry> entry : entrySet)
+ {
+ System.out.println(entry.getKey() +" = "+entry.getValue());
+ }
+
+ System.out.println("---------------------------------------------------");
+
+ /*
+ * Dividing stream’s elements into groups according to some
+ * predicate:
+ */
+ Map> partionedMap = productList
+ .stream().collect(Collectors.partitioningBy(
+ element -> element.getPrice() > 25));
+
+
+ Set>> partionedEntrySet = partionedMap.entrySet();
+ for (Entry> entry : partionedEntrySet)
+ {
+ System.out.println(entry.getKey() +" = "+entry.getValue());
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/StreamDemo_Collectors_toList_joining/Output.txt b/BasicJava/StreamDemo_Collectors_toList_joining/Output.txt
new file mode 100644
index 000000000..fa6a1dc72
--- /dev/null
+++ b/BasicJava/StreamDemo_Collectors_toList_joining/Output.txt
@@ -0,0 +1,2 @@
+productNameList = [potatoes, orange, lemon, bread, sugar]
+listToString = [potatoes, orange, lemon, bread, sugar]
diff --git a/BasicJava/StreamDemo_Collectors_toList_joining/StreamDemo/.classpath b/BasicJava/StreamDemo_Collectors_toList_joining/StreamDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/StreamDemo_Collectors_toList_joining/StreamDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/Later/Streams/17/StreamDemo/.project b/BasicJava/StreamDemo_Collectors_toList_joining/StreamDemo/.project
similarity index 100%
rename from Later/Streams/17/StreamDemo/.project
rename to BasicJava/StreamDemo_Collectors_toList_joining/StreamDemo/.project
diff --git a/BasicJava/StreamDemo_Collectors_toList_joining/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/StreamDemo_Collectors_toList_joining/StreamDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/StreamDemo_Collectors_toList_joining/StreamDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/StreamDemo_Collectors_toList_joining/StreamDemo/bin/Product.class b/BasicJava/StreamDemo_Collectors_toList_joining/StreamDemo/bin/Product.class
new file mode 100644
index 000000000..a66bb2673
Binary files /dev/null and b/BasicJava/StreamDemo_Collectors_toList_joining/StreamDemo/bin/Product.class differ
diff --git a/BasicJava/StreamDemo_Collectors_toList_joining/StreamDemo/bin/StreamDemo.class b/BasicJava/StreamDemo_Collectors_toList_joining/StreamDemo/bin/StreamDemo.class
new file mode 100644
index 000000000..b8579682b
Binary files /dev/null and b/BasicJava/StreamDemo_Collectors_toList_joining/StreamDemo/bin/StreamDemo.class differ
diff --git a/BasicJava/StreamDemo_Collectors_toList_joining/StreamDemo/src/Product.java b/BasicJava/StreamDemo_Collectors_toList_joining/StreamDemo/src/Product.java
new file mode 100644
index 000000000..84d632c09
--- /dev/null
+++ b/BasicJava/StreamDemo_Collectors_toList_joining/StreamDemo/src/Product.java
@@ -0,0 +1,40 @@
+
+public class Product
+{
+ private String name;
+ private int price;
+
+ public Product(String name, int price)
+ {
+ super();
+ this.name = name;
+ this.price = price;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public int getPrice()
+ {
+ return price;
+ }
+
+ public void setPrice(int price)
+ {
+ this.price = price;
+ }
+
+ @Override
+ public String toString()
+ {
+ return "Product [name=" + name + ", price=" + price + "]";
+ }
+
+}
diff --git a/BasicJava/StreamDemo_Collectors_toList_joining/StreamDemo/src/StreamDemo.java b/BasicJava/StreamDemo_Collectors_toList_joining/StreamDemo/src/StreamDemo.java
new file mode 100644
index 000000000..06790325d
--- /dev/null
+++ b/BasicJava/StreamDemo_Collectors_toList_joining/StreamDemo/src/StreamDemo.java
@@ -0,0 +1,41 @@
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class StreamDemo
+{
+ public static void main(String[] args)
+ {
+ List productList = Arrays.asList(
+ new Product("potatoes", 15),
+ new Product("orange", 15), new Product("lemon", 20),
+ new Product("bread", 20), new Product("sugar", 30));
+
+ /*
+ * Converting a stream to the Collection (Collection, List or
+ * Set):
+ */
+ List productNameList = productList.stream()
+ .map(Product::getName).collect(Collectors.toList());
+
+ System.out.println("productNameList = " + productNameList);
+
+ /*
+ * Reducing to String:
+ *
+ * The joiner() method can have from one to three parameters
+ * (delimiter, prefix, suffix). The handiest thing about using
+ * joiner() – developer doesn’t need to check if the stream
+ * reaches its end to apply the suffix and not to apply a
+ * delimiter. Collector will take care of that.
+ */
+
+ String listToString = productList.stream()
+ .map(Product::getName)
+ .collect(Collectors.joining(", ", "[", "]"));
+
+ System.out.println("listToString = " + listToString);
+
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/StreamDemo_Count_modulus_App/Output.txt b/BasicJava/StreamDemo_Count_modulus_App/Output.txt
new file mode 100644
index 000000000..0c5c86712
--- /dev/null
+++ b/BasicJava/StreamDemo_Count_modulus_App/Output.txt
@@ -0,0 +1,2 @@
+With out filter, Count = 3
+After filter, Count = 2
diff --git a/BasicJava/StreamDemo_Count_modulus_App/StreamDemo/.classpath b/BasicJava/StreamDemo_Count_modulus_App/StreamDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/StreamDemo_Count_modulus_App/StreamDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/Later/Streams/18/StreamDemo/.project b/BasicJava/StreamDemo_Count_modulus_App/StreamDemo/.project
similarity index 100%
rename from Later/Streams/18/StreamDemo/.project
rename to BasicJava/StreamDemo_Count_modulus_App/StreamDemo/.project
diff --git a/BasicJava/StreamDemo_Count_modulus_App/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/StreamDemo_Count_modulus_App/StreamDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/StreamDemo_Count_modulus_App/StreamDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/StreamDemo_Count_modulus_App/StreamDemo/bin/StreamCountDemo.class b/BasicJava/StreamDemo_Count_modulus_App/StreamDemo/bin/StreamCountDemo.class
new file mode 100644
index 000000000..5438ff13d
Binary files /dev/null and b/BasicJava/StreamDemo_Count_modulus_App/StreamDemo/bin/StreamCountDemo.class differ
diff --git a/BasicJava/StreamDemo_Count_modulus_App/StreamDemo/src/StreamCountDemo.java b/BasicJava/StreamDemo_Count_modulus_App/StreamDemo/src/StreamCountDemo.java
new file mode 100644
index 000000000..8d31f8e12
--- /dev/null
+++ b/BasicJava/StreamDemo_Count_modulus_App/StreamDemo/src/StreamCountDemo.java
@@ -0,0 +1,19 @@
+import java.util.Arrays;
+import java.util.List;
+import java.util.function.Predicate;
+
+public class StreamCountDemo
+{
+ public static void main(String[] args)
+ {
+ List list = Arrays.asList(3, 4, 6);
+ /*
+ * It returns the number of elements in stream.
+ */
+ System.out.println("With out filter, Count = " + list.stream().count());
+
+ Predicate p = num -> num % 2 == 0;
+
+ System.out.println("After filter, Count = " + list.stream().filter(p).count());
+ }
+}
\ No newline at end of file
diff --git a/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo/.classpath b/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/Later/Streams/19/StreamDemo/.project b/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo/.project
similarity index 100%
rename from Later/Streams/19/StreamDemo/.project
rename to BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo/.project
diff --git a/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo/bin/StreamDemo1.class b/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo/bin/StreamDemo1.class
new file mode 100644
index 000000000..962b03fa0
Binary files /dev/null and b/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo/bin/StreamDemo1.class differ
diff --git a/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo/bin/StreamDemo2.class b/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo/bin/StreamDemo2.class
new file mode 100644
index 000000000..fa8d30e0d
Binary files /dev/null and b/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo/bin/StreamDemo2.class differ
diff --git a/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo/bin/StreamDemo3.class b/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo/bin/StreamDemo3.class
new file mode 100644
index 000000000..bae171082
Binary files /dev/null and b/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo/bin/StreamDemo3.class differ
diff --git a/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo/bin/StreamDemo4.class b/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo/bin/StreamDemo4.class
new file mode 100644
index 000000000..d8f3b22b9
Binary files /dev/null and b/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo/bin/StreamDemo4.class differ
diff --git a/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo/bin/StreamDemo5.class b/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo/bin/StreamDemo5.class
new file mode 100644
index 000000000..9f480a8d5
Binary files /dev/null and b/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo/bin/StreamDemo5.class differ
diff --git a/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo/src/StreamDemo1.java b/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo/src/StreamDemo1.java
new file mode 100644
index 000000000..af72b36a8
--- /dev/null
+++ b/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo/src/StreamDemo1.java
@@ -0,0 +1,15 @@
+import java.util.stream.Stream;
+
+/**
+ *
+ * How to create stream Using Stream.of(val1, val2, val3….)
+ */
+
+public class StreamDemo1
+{
+ public static void main(String[] args)
+ {
+ Stream stream = Stream.of(1, 2, 3, 4, 5, 6, 7, 8, 9);
+ stream.forEach(p -> System.out.println(p));
+ }
+}
\ No newline at end of file
diff --git a/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo/src/StreamDemo2.java b/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo/src/StreamDemo2.java
new file mode 100644
index 000000000..885b03c6e
--- /dev/null
+++ b/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo/src/StreamDemo2.java
@@ -0,0 +1,16 @@
+import java.util.stream.Stream;
+
+/**
+ *
+ * How to create stream Using Stream.of(arrayOfElements)
+ */
+
+public class StreamDemo2
+{
+ public static void main(String[] args)
+ {
+ Integer[] integerArray = new Integer[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+ Stream stream = Stream.of(integerArray);
+ stream.forEach(p -> System.out.println(p));
+ }
+}
\ No newline at end of file
diff --git a/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo/src/StreamDemo3.java b/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo/src/StreamDemo3.java
new file mode 100644
index 000000000..50a3702a0
--- /dev/null
+++ b/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo/src/StreamDemo3.java
@@ -0,0 +1,22 @@
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Stream;
+
+/**
+ *
+ * How to create stream Using someList.stream()
+ */
+
+public class StreamDemo3
+{
+ public static void main(String[] args)
+ {
+ List list = new ArrayList();
+ for (int i = 1; i < 10; i++)
+ {
+ list.add(i);
+ }
+ Stream stream = list.stream();
+ stream.forEach(p -> System.out.println(p));
+ }
+}
\ No newline at end of file
diff --git a/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo/src/StreamDemo4.java b/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo/src/StreamDemo4.java
new file mode 100644
index 000000000..297a9e258
--- /dev/null
+++ b/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo/src/StreamDemo4.java
@@ -0,0 +1,17 @@
+import java.util.Date;
+import java.util.stream.Stream;
+
+/**
+ *
+ * How to create stream Using Stream.generate() or Stream.iterate()
+ * functions
+ */
+
+public class StreamDemo4
+{
+ public static void main(String[] args)
+ {
+ Stream stream = Stream.generate(() -> {return new Date(); });
+ stream.forEach(p -> System.out.println(p));
+ }
+}
\ No newline at end of file
diff --git a/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo/src/StreamDemo5.java b/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo/src/StreamDemo5.java
new file mode 100644
index 000000000..857d79426
--- /dev/null
+++ b/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo/src/StreamDemo5.java
@@ -0,0 +1,21 @@
+import java.util.stream.IntStream;
+import java.util.stream.Stream;
+
+/**
+ *
+ * How to create stream Using String chars or String tokens
+ */
+
+public class StreamDemo5
+{
+ public static void main(String[] args)
+ {
+ IntStream intStream = "12345_abcdefg".chars();
+ intStream.forEach(p -> System.out.println(p));
+
+ System.out.println("\n-------------------------\n");
+
+ Stream stream = Stream.of("A$B$C".split("\\$"));
+ stream.forEach(p -> System.out.println(p));
+ }
+}
\ No newline at end of file
diff --git a/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo1_Output.txt b/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo1_Output.txt
new file mode 100644
index 000000000..071939893
--- /dev/null
+++ b/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo1_Output.txt
@@ -0,0 +1,9 @@
+1
+2
+3
+4
+5
+6
+7
+8
+9
diff --git a/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo2_Output.txt b/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo2_Output.txt
new file mode 100644
index 000000000..071939893
--- /dev/null
+++ b/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo2_Output.txt
@@ -0,0 +1,9 @@
+1
+2
+3
+4
+5
+6
+7
+8
+9
diff --git a/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo3_Output.txt b/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo3_Output.txt
new file mode 100644
index 000000000..071939893
--- /dev/null
+++ b/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo3_Output.txt
@@ -0,0 +1,9 @@
+1
+2
+3
+4
+5
+6
+7
+8
+9
diff --git a/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo4_Output.txt b/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo4_Output.txt
new file mode 100644
index 000000000..4ccdb4cbb
--- /dev/null
+++ b/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo4_Output.txt
@@ -0,0 +1,12 @@
+Sun Jul 16 09:18:50 IST 2017
+Sun Jul 16 09:18:50 IST 2017
+Sun Jul 16 09:18:50 IST 2017
+Sun Jul 16 09:18:50 IST 2017
+Sun Jul 16 09:18:50 IST 2017
+Sun Jul 16 09:18:50 IST 2017
+Sun Jul 16 09:18:50 IST 2017
+Sun Jul 16 09:18:50 IST 2017
+Sun Jul 16 09:18:50 IST 2017
+---
+---
+---
\ No newline at end of file
diff --git a/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo5_Output.txt b/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo5_Output.txt
new file mode 100644
index 000000000..8b681039d
--- /dev/null
+++ b/BasicJava/StreamDemo_Create_diff_ways_App/StreamDemo5_Output.txt
@@ -0,0 +1,19 @@
+49
+50
+51
+52
+53
+95
+97
+98
+99
+100
+101
+102
+103
+
+-------------------------
+
+A
+B
+C
diff --git a/BasicJava/StreamDemo_How_to_create_App/StreamDemo/.classpath b/BasicJava/StreamDemo_How_to_create_App/StreamDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/StreamDemo_How_to_create_App/StreamDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/Later/Streams/20/StreamDemo/.project b/BasicJava/StreamDemo_How_to_create_App/StreamDemo/.project
similarity index 100%
rename from Later/Streams/20/StreamDemo/.project
rename to BasicJava/StreamDemo_How_to_create_App/StreamDemo/.project
diff --git a/BasicJava/StreamDemo_How_to_create_App/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/StreamDemo_How_to_create_App/StreamDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/StreamDemo_How_to_create_App/StreamDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/Later/Streams/18/StreamDemo/bin/StreamDemo1.class b/BasicJava/StreamDemo_How_to_create_App/StreamDemo/bin/StreamDemo1.class
similarity index 100%
rename from Later/Streams/18/StreamDemo/bin/StreamDemo1.class
rename to BasicJava/StreamDemo_How_to_create_App/StreamDemo/bin/StreamDemo1.class
diff --git a/BasicJava/StreamDemo_How_to_create_App/StreamDemo/bin/StreamDemo2.class b/BasicJava/StreamDemo_How_to_create_App/StreamDemo/bin/StreamDemo2.class
new file mode 100644
index 000000000..3a687cbcc
Binary files /dev/null and b/BasicJava/StreamDemo_How_to_create_App/StreamDemo/bin/StreamDemo2.class differ
diff --git a/Later/Streams/18/StreamDemo/src/StreamDemo1.java b/BasicJava/StreamDemo_How_to_create_App/StreamDemo/src/StreamDemo1.java
similarity index 100%
rename from Later/Streams/18/StreamDemo/src/StreamDemo1.java
rename to BasicJava/StreamDemo_How_to_create_App/StreamDemo/src/StreamDemo1.java
diff --git a/BasicJava/StreamDemo_How_to_create_App/StreamDemo/src/StreamDemo2.java b/BasicJava/StreamDemo_How_to_create_App/StreamDemo/src/StreamDemo2.java
new file mode 100644
index 000000000..ebe8ba698
--- /dev/null
+++ b/BasicJava/StreamDemo_How_to_create_App/StreamDemo/src/StreamDemo2.java
@@ -0,0 +1,17 @@
+import java.util.Arrays;
+import java.util.stream.Stream;
+
+public class StreamDemo2
+{
+ public static void main(String[] args)
+ {
+ // Create an array
+ Integer[] numberArray ={ 1, 5, 8, 10 };
+
+ // Convert it into a Stream
+ Stream stream = Arrays.stream(numberArray);
+ System.out.println(stream);
+ System.out.println("Count = "+stream.count());
+
+ }
+}
\ No newline at end of file
diff --git a/BasicJava/StreamDemo_How_to_create_App/StreamDemo1_Output.txt b/BasicJava/StreamDemo_How_to_create_App/StreamDemo1_Output.txt
new file mode 100644
index 000000000..268cee18c
--- /dev/null
+++ b/BasicJava/StreamDemo_How_to_create_App/StreamDemo1_Output.txt
@@ -0,0 +1,2 @@
+java.util.stream.ReferencePipeline$Head@6d06d69c
+Count = 3
diff --git a/BasicJava/StreamDemo_How_to_create_App/StreamDemo2_Output.txt b/BasicJava/StreamDemo_How_to_create_App/StreamDemo2_Output.txt
new file mode 100644
index 000000000..8f83ee50b
--- /dev/null
+++ b/BasicJava/StreamDemo_How_to_create_App/StreamDemo2_Output.txt
@@ -0,0 +1,2 @@
+java.util.stream.ReferencePipeline$Head@6d06d69c
+Count = 4
diff --git a/BasicJava/StreamDemo_IMO_5_App/StreamDemo/.classpath b/BasicJava/StreamDemo_IMO_5_App/StreamDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/StreamDemo_IMO_5_App/StreamDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/Later/Streams/21/StreamDemo/.project b/BasicJava/StreamDemo_IMO_5_App/StreamDemo/.project
similarity index 100%
rename from Later/Streams/21/StreamDemo/.project
rename to BasicJava/StreamDemo_IMO_5_App/StreamDemo/.project
diff --git a/BasicJava/StreamDemo_IMO_5_App/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/StreamDemo_IMO_5_App/StreamDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/StreamDemo_IMO_5_App/StreamDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/StreamDemo_IMO_5_App/StreamDemo/bin/StreamDistinctDemo.class b/BasicJava/StreamDemo_IMO_5_App/StreamDemo/bin/StreamDistinctDemo.class
new file mode 100644
index 000000000..87999a0b7
Binary files /dev/null and b/BasicJava/StreamDemo_IMO_5_App/StreamDemo/bin/StreamDistinctDemo.class differ
diff --git a/BasicJava/StreamDemo_IMO_5_App/StreamDemo/bin/StreamFilterDemo.class b/BasicJava/StreamDemo_IMO_5_App/StreamDemo/bin/StreamFilterDemo.class
new file mode 100644
index 000000000..cd00da52b
Binary files /dev/null and b/BasicJava/StreamDemo_IMO_5_App/StreamDemo/bin/StreamFilterDemo.class differ
diff --git a/BasicJava/StreamDemo_IMO_5_App/StreamDemo/bin/StreamLimitDemo.class b/BasicJava/StreamDemo_IMO_5_App/StreamDemo/bin/StreamLimitDemo.class
new file mode 100644
index 000000000..42a54e864
Binary files /dev/null and b/BasicJava/StreamDemo_IMO_5_App/StreamDemo/bin/StreamLimitDemo.class differ
diff --git a/BasicJava/StreamDemo_IMO_5_App/StreamDemo/bin/StreamMapDemo.class b/BasicJava/StreamDemo_IMO_5_App/StreamDemo/bin/StreamMapDemo.class
new file mode 100644
index 000000000..5b498cbf2
Binary files /dev/null and b/BasicJava/StreamDemo_IMO_5_App/StreamDemo/bin/StreamMapDemo.class differ
diff --git a/BasicJava/StreamDemo_IMO_5_App/StreamDemo/bin/StreamSortDemo.class b/BasicJava/StreamDemo_IMO_5_App/StreamDemo/bin/StreamSortDemo.class
new file mode 100644
index 000000000..d2edeb4fd
Binary files /dev/null and b/BasicJava/StreamDemo_IMO_5_App/StreamDemo/bin/StreamSortDemo.class differ
diff --git a/BasicJava/StreamDemo_IMO_5_App/StreamDemo/src/StreamDistinctDemo.java b/BasicJava/StreamDemo_IMO_5_App/StreamDemo/src/StreamDistinctDemo.java
new file mode 100644
index 000000000..a39165ca4
--- /dev/null
+++ b/BasicJava/StreamDemo_IMO_5_App/StreamDemo/src/StreamDistinctDemo.java
@@ -0,0 +1,17 @@
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Stream;
+
+public class StreamDistinctDemo
+{
+ public static void main(String[] args)
+ {
+ List numberList = Arrays.asList(1, 1, 2, 3, 3, 4, 5,6, 6);
+ /*
+ * Returns a stream consisting of the distinct elements
+ * (according to Object.equals(Object)) of this stream.
+ */
+ Stream stream = numberList.stream().distinct();
+ stream.forEach(System.out::println);
+ }
+}
\ No newline at end of file
diff --git a/BasicJava/StreamDemo_IMO_5_App/StreamDemo/src/StreamFilterDemo.java b/BasicJava/StreamDemo_IMO_5_App/StreamDemo/src/StreamFilterDemo.java
new file mode 100644
index 000000000..1e77ca678
--- /dev/null
+++ b/BasicJava/StreamDemo_IMO_5_App/StreamDemo/src/StreamFilterDemo.java
@@ -0,0 +1,20 @@
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Stream;
+
+public class StreamFilterDemo
+{
+ public static void main(String[] args)
+ {
+ List numberList = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8,9);
+ /*
+ * The example gets a new stream with even numbers from list
+ * of numbers:
+ */
+ Stream stream = numberList.stream()
+ .filter(i -> (i % 2) == 0);
+
+ stream.forEach(number -> System.out.println(number));
+
+ }
+}
\ No newline at end of file
diff --git a/BasicJava/StreamDemo_IMO_5_App/StreamDemo/src/StreamLimitDemo.java b/BasicJava/StreamDemo_IMO_5_App/StreamDemo/src/StreamLimitDemo.java
new file mode 100644
index 000000000..b9f0cb95b
--- /dev/null
+++ b/BasicJava/StreamDemo_IMO_5_App/StreamDemo/src/StreamLimitDemo.java
@@ -0,0 +1,18 @@
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Stream;
+
+public class StreamLimitDemo
+{
+ public static void main(String[] args)
+ {
+ List numberList = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9);
+
+ /*
+ * Returns a stream consisting of the elements of this stream,
+ * truncated to be no longer than maxSize in length
+ */
+ Stream limstream = numberList.stream().limit(5);
+ limstream.forEach(System.out::println);
+ }
+}
\ No newline at end of file
diff --git a/BasicJava/StreamDemo_IMO_5_App/StreamDemo/src/StreamMapDemo.java b/BasicJava/StreamDemo_IMO_5_App/StreamDemo/src/StreamMapDemo.java
new file mode 100644
index 000000000..e1d03636e
--- /dev/null
+++ b/BasicJava/StreamDemo_IMO_5_App/StreamDemo/src/StreamMapDemo.java
@@ -0,0 +1,21 @@
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Stream;
+
+public class StreamMapDemo
+{
+ public static void main(String[] args)
+ {
+ List nameList = Arrays.asList("ram","peter");
+
+ /*
+ * The example gets a new stream which all names are
+ * transformed from LowerCase to UpperCase.
+ */
+ Stream stream = nameList.stream()
+ .map(name -> name.toUpperCase());
+
+ stream.forEach(name -> System.out.println(name));
+
+ }
+}
\ No newline at end of file
diff --git a/BasicJava/StreamDemo_IMO_5_App/StreamDemo/src/StreamSortDemo.java b/BasicJava/StreamDemo_IMO_5_App/StreamDemo/src/StreamSortDemo.java
new file mode 100644
index 000000000..532f07c9a
--- /dev/null
+++ b/BasicJava/StreamDemo_IMO_5_App/StreamDemo/src/StreamSortDemo.java
@@ -0,0 +1,19 @@
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Stream;
+
+public class StreamSortDemo
+{
+ public static void main(String[] args)
+ {
+ List numberList = Arrays.asList(8, 9, 2, 5, 3, 4, 1, 7, 6);
+ /*
+ * Returns a stream consisting of the elements of this stream,
+ * sorted according to natural order. If the elements of this
+ * stream are not Comparable, a java.lang.ClassCastException
+ * may be thrown when the terminal operation is executed.
+ */
+ Stream stream = numberList.stream().sorted();
+ stream.forEach(System.out::println);
+ }
+}
\ No newline at end of file
diff --git a/BasicJava/StreamDemo_IMO_5_App/StreamDistinctDemo_Output.txt b/BasicJava/StreamDemo_IMO_5_App/StreamDistinctDemo_Output.txt
new file mode 100644
index 000000000..b414108e8
--- /dev/null
+++ b/BasicJava/StreamDemo_IMO_5_App/StreamDistinctDemo_Output.txt
@@ -0,0 +1,6 @@
+1
+2
+3
+4
+5
+6
diff --git a/BasicJava/StreamDemo_IMO_5_App/StreamFilterDemo_Output.txt b/BasicJava/StreamDemo_IMO_5_App/StreamFilterDemo_Output.txt
new file mode 100644
index 000000000..628d2a8fd
--- /dev/null
+++ b/BasicJava/StreamDemo_IMO_5_App/StreamFilterDemo_Output.txt
@@ -0,0 +1,4 @@
+2
+4
+6
+8
diff --git a/BasicJava/StreamDemo_IMO_5_App/StreamLimitDemo_Output.txt b/BasicJava/StreamDemo_IMO_5_App/StreamLimitDemo_Output.txt
new file mode 100644
index 000000000..8a1218a10
--- /dev/null
+++ b/BasicJava/StreamDemo_IMO_5_App/StreamLimitDemo_Output.txt
@@ -0,0 +1,5 @@
+1
+2
+3
+4
+5
diff --git a/BasicJava/StreamDemo_IMO_5_App/StreamMapDemo_Output.txt b/BasicJava/StreamDemo_IMO_5_App/StreamMapDemo_Output.txt
new file mode 100644
index 000000000..2a19608f4
--- /dev/null
+++ b/BasicJava/StreamDemo_IMO_5_App/StreamMapDemo_Output.txt
@@ -0,0 +1,2 @@
+RAM
+PETER
diff --git a/BasicJava/StreamDemo_IMO_5_App/StreamSortDemo_Output.txt b/BasicJava/StreamDemo_IMO_5_App/StreamSortDemo_Output.txt
new file mode 100644
index 000000000..071939893
--- /dev/null
+++ b/BasicJava/StreamDemo_IMO_5_App/StreamSortDemo_Output.txt
@@ -0,0 +1,9 @@
+1
+2
+3
+4
+5
+6
+7
+8
+9
diff --git a/BasicJava/StreamDemo_Intermediate_op_fms/StreamDemo/.classpath b/BasicJava/StreamDemo_Intermediate_op_fms/StreamDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/StreamDemo_Intermediate_op_fms/StreamDemo/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/Later/Streams/22/StreamDemo/.project b/BasicJava/StreamDemo_Intermediate_op_fms/StreamDemo/.project
similarity index 100%
rename from Later/Streams/22/StreamDemo/.project
rename to BasicJava/StreamDemo_Intermediate_op_fms/StreamDemo/.project
diff --git a/BasicJava/StreamDemo_Intermediate_op_fms/StreamDemo/.settings/org.eclipse.jdt.core.prefs b/BasicJava/StreamDemo_Intermediate_op_fms/StreamDemo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/BasicJava/StreamDemo_Intermediate_op_fms/StreamDemo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/BasicJava/StreamDemo_Intermediate_op_fms/StreamDemo/bin/StreamDemo1.class b/BasicJava/StreamDemo_Intermediate_op_fms/StreamDemo/bin/StreamDemo1.class
new file mode 100644
index 000000000..7513237ad
Binary files /dev/null and b/BasicJava/StreamDemo_Intermediate_op_fms/StreamDemo/bin/StreamDemo1.class differ
diff --git a/BasicJava/StreamDemo_Intermediate_op_fms/StreamDemo/bin/StreamDemo2.class b/BasicJava/StreamDemo_Intermediate_op_fms/StreamDemo/bin/StreamDemo2.class
new file mode 100644
index 000000000..9e3eb8575
Binary files /dev/null and b/BasicJava/StreamDemo_Intermediate_op_fms/StreamDemo/bin/StreamDemo2.class differ
diff --git a/BasicJava/StreamDemo_Intermediate_op_fms/StreamDemo/bin/StreamDemo3.class b/BasicJava/StreamDemo_Intermediate_op_fms/StreamDemo/bin/StreamDemo3.class
new file mode 100644
index 000000000..6a91fbcec
Binary files /dev/null and b/BasicJava/StreamDemo_Intermediate_op_fms/StreamDemo/bin/StreamDemo3.class differ
diff --git a/BasicJava/StreamDemo_Intermediate_op_fms/StreamDemo/src/StreamDemo1.java b/BasicJava/StreamDemo_Intermediate_op_fms/StreamDemo/src/StreamDemo1.java
new file mode 100644
index 000000000..34dbdb879
--- /dev/null
+++ b/BasicJava/StreamDemo_Intermediate_op_fms/StreamDemo/src/StreamDemo1.java
@@ -0,0 +1,21 @@
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * Intermediate operation : filter()
+ */
+public class StreamDemo1
+{
+ public static void main(String[] args)
+ {
+ List list = Arrays.asList("Welcome", "apple", "to", "India");
+
+ /*
+ * filter() operation helps eliminate elements based on certain
+ * criteria.
+ */
+ list.stream().filter(element -> !"apple".equals(element))
+ .forEach(element -> System.out.println(element));
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/StreamDemo_Intermediate_op_fms/StreamDemo/src/StreamDemo2.java b/BasicJava/StreamDemo_Intermediate_op_fms/StreamDemo/src/StreamDemo2.java
new file mode 100644
index 000000000..5d50a693a
--- /dev/null
+++ b/BasicJava/StreamDemo_Intermediate_op_fms/StreamDemo/src/StreamDemo2.java
@@ -0,0 +1,22 @@
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * Intermediate operation : map()
+ */
+public class StreamDemo2
+{
+ public static void main(String[] args)
+ {
+ List list = Arrays.asList("Welcome", "apple", "to","India");
+
+ /*
+ * map() operation helps map elements to the corresponding
+ * results.
+ */
+ list.stream().filter(element -> !"apple".equals(element))
+ .map(String::toUpperCase)
+ .forEach(System.out::println);
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/StreamDemo_Intermediate_op_fms/StreamDemo/src/StreamDemo3.java b/BasicJava/StreamDemo_Intermediate_op_fms/StreamDemo/src/StreamDemo3.java
new file mode 100644
index 000000000..43719e18b
--- /dev/null
+++ b/BasicJava/StreamDemo_Intermediate_op_fms/StreamDemo/src/StreamDemo3.java
@@ -0,0 +1,22 @@
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * Intermediate operation :sorted()
+ */
+public class StreamDemo3
+{
+ public static void main(String[] args)
+ {
+ List list = Arrays.asList("Ball", "Cat", "Dog", "Apple");
+
+ /*
+ * sorted() operation helps sort elements based on certain
+ * criteria.
+ */
+ list.stream().sorted().filter((element) -> !element.startsWith("D"))
+ .map(String::toUpperCase)
+ .forEach(System.out::println);
+ }
+
+}
\ No newline at end of file
diff --git a/BasicJava/StreamDemo_Intermediate_op_fms/StreamDemo1_Output.txt b/BasicJava/StreamDemo_Intermediate_op_fms/StreamDemo1_Output.txt
new file mode 100644
index 000000000..f48cc3066
--- /dev/null
+++ b/BasicJava/StreamDemo_Intermediate_op_fms/StreamDemo1_Output.txt
@@ -0,0 +1,3 @@
+Welcome
+to
+India
diff --git a/BasicJava/StreamDemo_Intermediate_op_fms/StreamDemo2_Output.txt b/BasicJava/StreamDemo_Intermediate_op_fms/StreamDemo2_Output.txt
new file mode 100644
index 000000000..b54843ba5
--- /dev/null
+++ b/BasicJava/StreamDemo_Intermediate_op_fms/StreamDemo2_Output.txt
@@ -0,0 +1,3 @@
+WELCOME
+TO
+INDIA
diff --git a/BasicJava/StreamDemo_Intermediate_op_fms/StreamDemo3_Output.txt b/BasicJava/StreamDemo_Intermediate_op_fms/StreamDemo3_Output.txt
new file mode 100644
index 000000000..dd0aff0d6
--- /dev/null
+++ b/BasicJava/StreamDemo_Intermediate_op_fms/StreamDemo3_Output.txt
@@ -0,0 +1,3 @@
+APPLE
+BALL
+CAT
diff --git a/BasicJava/StreamDemo_LToU_list_App/NonStreamDemo_Output.txt b/BasicJava/StreamDemo_LToU_list_App/NonStreamDemo_Output.txt
new file mode 100644
index 000000000..8eae0aa03
--- /dev/null
+++ b/BasicJava/StreamDemo_LToU_list_App/NonStreamDemo_Output.txt
@@ -0,0 +1,2 @@
+lowerAlphaList = [a, b, c ]
+upperAlphaList = [A, B, C ]
diff --git a/BasicJava/StreamDemo_LToU_list_App/StreamDemo/.classpath b/BasicJava/StreamDemo_LToU_list_App/StreamDemo/.classpath
new file mode 100644
index 000000000..fceb4801b
--- /dev/null
+++ b/BasicJava/StreamDemo_LToU_list_App/StreamDemo/.classpath
@@ -0,0 +1,6 @@
+
+