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

Python Kivy ListView: How to delete selected ListItemButton? -

asp.net mvc 4 - A specified Include path is not valid. The EntityType '' does not declare a navigation property with the name '' -