Search code examples
javaidentifier

public class final PropertyLookup


it points to this line and says expected what could be the error

public class final PropertyLookup {
  public static String getProperty(PageContext pageContext, String propertyFile, String key,
                                     String locale) {  
  private static Properties getProperties(String propertiesFileName,String locale) { 
}

and also shows enum interface expected even though braces closed properly


Solution

  • PropertyLookup Class:

    import java.util.Properties;
    
    //public class final PropertyLookup
    public final class PropertyLookup {
        public static String getProperty(PageContext pageContext,
                String propertyFile, String key, String locale) {
            // TODO
            return locale;
    
        }
    
        private static Properties getProperties(String propertiesFileName,
                String locale) {
            // TODO
            return null;
    
        }
    }
    

    PageContext Interface:

    public interface PageContext {
    
    }