diff --git a/.gitignore b/.gitignore
index 5c42643..344fa02 100644
--- a/.gitignore
+++ b/.gitignore
@@ -175,3 +175,4 @@
/Semester 3/Assignments/MP3_Recursion_CalebFontenot/dist/
/BigIntegerFibonacci/nbproject/private/
/BigIntegerFibonacci/build/
+/Semester 3/GenericRules/target/
diff --git a/Semester 3/GenericRules/nb-configuration.xml b/Semester 3/GenericRules/nb-configuration.xml
new file mode 100644
index 0000000..e9f049f
--- /dev/null
+++ b/Semester 3/GenericRules/nb-configuration.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+ JDK_20__System_
+
+
diff --git a/Semester 3/GenericRules/pom.xml b/Semester 3/GenericRules/pom.xml
index a7869b2..24c3970 100644
--- a/Semester 3/GenericRules/pom.xml
+++ b/Semester 3/GenericRules/pom.xml
@@ -7,8 +7,8 @@
jar
UTF-8
- 17
- 17
+ 20
+ 20
edu.slcc.asdv.caleb.gemericrules.GemericRules
GenericRules
diff --git a/Semester 3/GenericRules/src/main/java/edu/slcc/asdv/caleb/gemericrules/GenericRule3.java b/Semester 3/GenericRules/src/main/java/edu/slcc/asdv/caleb/gemericrules/GenericRule3.java
index a45563a..093df1d 100644
--- a/Semester 3/GenericRules/src/main/java/edu/slcc/asdv/caleb/gemericrules/GenericRule3.java
+++ b/Semester 3/GenericRules/src/main/java/edu/slcc/asdv/caleb/gemericrules/GenericRule3.java
@@ -15,6 +15,6 @@ public class GenericRule3 {
public static void main(String[] args)
{
List list1 = new ArrayList();
- ArrayList list2 = new ArrayList();
+ //ArrayList list2 = new ArrayList();
}
}
diff --git a/Semester 3/GenericRules/src/main/java/edu/slcc/asdv/caleb/gemericrules/GenericRule4.java b/Semester 3/GenericRules/src/main/java/edu/slcc/asdv/caleb/gemericrules/GenericRule4.java
new file mode 100644
index 0000000..b7e311e
--- /dev/null
+++ b/Semester 3/GenericRules/src/main/java/edu/slcc/asdv/caleb/gemericrules/GenericRule4.java
@@ -0,0 +1,23 @@
+/*
+ * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
+ * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
+ */
+package edu.slcc.asdv.caleb.gemericrules;
+
+import java.util.ArrayList;
+
+/**
+ *
+ * @author caleb
+ */
+public class GenericRule4 {
+ public static void f1(ArrayList> list) {
+ System.out.println(list.size());
+ ///list.add(new Integer(5));
+ }
+ public static void main(String[] args)
+ {
+ f1(new ArrayList());
+ f1(new ArrayList());
+ }
+}
diff --git a/Semester 3/GenericRules/src/main/java/edu/slcc/asdv/caleb/gemericrules/GenericRule5.java b/Semester 3/GenericRules/src/main/java/edu/slcc/asdv/caleb/gemericrules/GenericRule5.java
new file mode 100644
index 0000000..8a58452
--- /dev/null
+++ b/Semester 3/GenericRules/src/main/java/edu/slcc/asdv/caleb/gemericrules/GenericRule5.java
@@ -0,0 +1,24 @@
+/*
+ * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
+ * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
+ */
+package edu.slcc.asdv.caleb.gemericrules;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ *
+ * @author caleb
+ */
+public class GenericRule5 {
+ public static void main(String[] args)
+ {
+ List> list1 = new ArrayList();
+ ArrayList> list2 = new ArrayList();
+ ArrayList> list3 = new ArrayList();
+ //list3.add("abc");
+ System.out.println(list3.size());
+ System.out.println(list3.subList(0, 0));
+ }
+}
diff --git a/Semester 3/GenericRules/src/main/java/edu/slcc/asdv/caleb/gemericrules/GenericRule6.java b/Semester 3/GenericRules/src/main/java/edu/slcc/asdv/caleb/gemericrules/GenericRule6.java
new file mode 100644
index 0000000..69a8237
--- /dev/null
+++ b/Semester 3/GenericRules/src/main/java/edu/slcc/asdv/caleb/gemericrules/GenericRule6.java
@@ -0,0 +1,32 @@
+/*
+ * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
+ * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
+ */
+package edu.slcc.asdv.caleb.gemericrules;
+
+import java.util.ArrayList;
+import static java.util.Collections.list;
+import java.util.List;
+
+/**
+ *
+ * @author caleb
+ */
+public class GenericRule6 {
+ public static void f6(List extends A> list) {
+ System.out.println(list.size());
+ }
+ public static void main(String[] args)
+ {
+ List list1 = new ArrayList<>();
+ list1.add (new C());
+ list1.add (new B());
+ f6(list1);
+
+ ArrayList list2 = new ArrayList<>();
+
+ }
+}
+//class A{}
+//class B extends A{}
+//class C extends B{}
\ No newline at end of file
diff --git a/Semester 3/GenericRules/src/main/java/edu/slcc/asdv/caleb/gemericrules/GenericRule7.java b/Semester 3/GenericRules/src/main/java/edu/slcc/asdv/caleb/gemericrules/GenericRule7.java
new file mode 100644
index 0000000..993ffd5
--- /dev/null
+++ b/Semester 3/GenericRules/src/main/java/edu/slcc/asdv/caleb/gemericrules/GenericRule7.java
@@ -0,0 +1,44 @@
+/*
+ * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
+ * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
+ */
+package edu.slcc.asdv.caleb.gemericrules;
+
+import java.util.ArrayList;
+import static java.util.Collections.list;
+import java.util.List;
+
+/**
+ *
+ * @author caleb
+ */
+public class GenericRule7 {
+
+ public static void f6(List extends A> list)
+ {
+ System.out.println(list.size());
+ }
+
+ public static void main(String[] args)
+ {
+ List list1 = new ArrayList<>();
+ list1.add(new C());
+ list1.add(new B());
+
+ List extends A> list = list1;
+
+ ArrayList list2 = new ArrayList<>();
+ list1.add(new A());
+ list = list2;
+
+ }
+}
+
+class A {
+}
+
+class B extends A {
+}
+
+class C extends B {
+}
diff --git a/Semester 3/GenericRules/src/main/java/edu/slcc/asdv/caleb/gemericrules/GenericRule8.java b/Semester 3/GenericRules/src/main/java/edu/slcc/asdv/caleb/gemericrules/GenericRule8.java
new file mode 100644
index 0000000..2985112
--- /dev/null
+++ b/Semester 3/GenericRules/src/main/java/edu/slcc/asdv/caleb/gemericrules/GenericRule8.java
@@ -0,0 +1,39 @@
+/*
+ * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
+ * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
+ */
+package edu.slcc.asdv.caleb.gemericrules;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ *
+ * @author caleb
+ */
+public class GenericRule8 {
+
+ // List extends T1> lista = new ArrayList();
+
+ public static void f8(List extends T2> list)
+ {
+ System.out.println(list.size());
+ //list.add(new C());
+ }
+
+ public static void main(String[] args)
+ {
+ list list1 = new ArrayList<>();
+ list1.add(new C());
+ list1.add(new B());
+ f8(list1);
+
+ ArrayList list2 = new ArrayList<>();
+ list2.add(new A());
+ f8(list2);
+
+ ArrayList list3 = new ArrayList();
+ list3.add("abc");
+ f8(list3);
+ }
+}