Java Java Java Java Java

master
Caleb Fontenot 2023-09-25 13:33:44 +07:00
parent d84b96f688
commit 6621d48a07
6 changed files with 105 additions and 0 deletions

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>edu.slcc.asdv.caleb</groupId>
<artifactId>GenericRules</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<exec.mainClass>edu.slcc.asdv.caleb.gemericrules.GemericRules</exec.mainClass>
</properties>
<name>GenericRules</name>
</project>

@ -0,0 +1,16 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
*/
package edu.slcc.asdv.caleb.gemericrules;
/**
*
* @author caleb
*/
public class GemericRules {
public static void main(String[] args) {
System.out.println("Hello World!");
}
}

@ -0,0 +1,13 @@
/*
* 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;
/**
*
* @author caleb
*/
public class GenericRule0 {
}

@ -0,0 +1,20 @@
/*
* 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 GenericRule1 {
public static void f1(ArrayList<Number> list){}
public static void main(String[] args)
{
/* There is no inheritence for what is inside the diamond. */
//f1(new ArrayList<Integer>());
}
}

@ -0,0 +1,21 @@
/*
* 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 GenericRule2 {
public static void f1(ArrayList<Number> list){}
public static void main(String[] args)
{
/* There is inheritence for what is outside the diamond. */
f1(new ArrayList<Number>());
}
}

@ -0,0 +1,20 @@
/*
* 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 GenericRule3 {
public static void main(String[] args)
{
List<Number> list1 = new ArrayList<Number>();
ArrayList<Number> list2 = new ArrayList<Integer>();
}
}