MyGenerics6_Tester.java - package hw6\/Purpose Practicing with Generics Recursion and Interfaces\/Author Fares\/Course CS 1302\/Date import java.util public

MyGenerics6_Tester.java - package hw6/Purpose Practicing...

This preview shows page 1 - 2 out of 2 pages.

package hw6; //******************************************************************************* //Purpose: Practicing with Generics, Recursion, and Interfaces // //Author: Fares //Course: CS 1302 //Date: 7/5/2017 // //******************************************************************************* import java.util.*; public class MyGenerics6_Tester{ //Declrations public static void main (String [] args){ //Declarations Integer [] intList = {4, 7, 2, 20, 30, 22}; Double [] doubleList = {4.0, 7.5, 2.3, 20.7, 30.1, 22.8}; String [] stringList = {"Tony","Paige","Denzel","Travis","Austin","Thomas", "Demetrius"}; Character[] charList = {'W','D','A','C','I','F','B'}; ComparableCircle [] circle = {new ComparableCircle(), new ComparableCircle(10), new ComparableCircle(5), new ComparableCircle (7), new ComparableCircle (4)}; Integer [][] intTwoDList = {{1, 60, 5}, {20, 40, 5}, {100, 300, 15, 27}}; String [][] stringTwoDList = {{"Quitman", "Valdosta","Atlanta", "Macon"}, {"Gainesville","Tallahassee","Jacksonville"}}; ArrayList<String> aList = new ArrayList<>(); aList.add("Tony"); aList.add("Paige"); aList.add("Denzel"); //Create an object MyGenerics6 object = new MyGenerics6(); //Display different lists object.displayOneDList(intList,"Integer One D Array"); object.displayOneDList(doubleList,"Double One D Array"); object.displayOneDList(stringList,"String One D Array"); object.displayOneDList(charList,"Character One D Array");
Image of page 1
Image of page 2

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture