我想创建我自己的StringBuffer,它在java.lang.StringBuffer中添加了2-3个方法。由于原始类是final类,所以我不能扩展该类。现在,如果我将类复制粘贴到我自己的类中,那么它会显示'AbstractStringBuilder is not visible‘错误。
如何在我自己的命名空间中扩展这个类(比如com.util)。
我收到的问题是:私人成员:NameNo_of_days Getit() -to enter the data membersCompute() -To calculate and return the total charges as charges_day * No_of_dayspublic class hotel{
pr