| ArraysToListGenerics1.htm |
Objectives:
|
![]() |
![]()
Edit the code: as shown in the image below
|
Complete Code:
//Collection_ArrayList1.htm
import java.io.*;
import java.lang.reflect.*;
import java.util.*;
public class ClassTemplate1 {
public ClassTemplate1() {
// TODO Auto-generated constructor stub
str2="encapsulated strictly Private scope";
System.out.println(str2);
}
public static void main(String[] args) throws Exception {
// TODO Auto-generated method stub
String[] array1 = {"Jan" ,"Feb", "Mar"};
try{
System.out.println(" Arrays List string objects---");
ArrayList
|
| Runtime View
|
| <String> |