ArrayList1类写add函数了吗???
ArrayList1是你自己定义的类,里面没add方法
ArrayList1<String>改为ArrayList<String>
你自己建的类并没有add方法,要么你就使用java自带的ArrayList