java - Didn't declare abstract class but is saying can instantiate anyways? -


i'm getting error won't allow me instantiate class within method, because says abstract. however, didn't declare class abstract don't know why this. suggestions?

public class mytemps implements temperatures {     public mytemps(string[] array)        @override        public listofstrings sublist(int fromindex) {           if (fromindex>this.size()){              throw new indexoutofboundsexception();           }           temperatures sub=new mytemps(10);         }      } 

you can't instantiate interface, need do

new mylistofstrings(10); 

Comments

Popular posts from this blog

java - Sql binding in Spring throws org.skife.jdbi.v2.exceptions.UnableToExecuteStatementException -

apache - Cloudflare bug random 302 redirections -