I have this Singleton class:
package com.CCharles.Singleton;
import java.util.ArrayList;
public enum Singleton{
INSTANCE;
public void createList(){
ArrayList arrayList = new ArrayList();
for(int i=1;i<101;i++)
{
arrayList.add("Job "+i);
}
for(int i=1;i<101;i++)
{
System.out.println(arrayList.get(3));
}
System.out.println("DONE");
}
public void sayHello(){
System.out.println("Hello World");
}
}
and I am accessing Using:
package com.CCharles.Singleton;
import com.CCharles.Singleton.Singleton;
public class SingletonImpl implements Singleton{
public static void main(String[]args){
Singleton.INSTANCE.createList( );
Singleton.INSTANCE.sayHello( );
{
}
I wonder Why I can't be able to parse(I get compile error 'reached end of file while parsing').