从下面四段()代码中选择出正确的代码段() A: abstractclassName{privateStringname;publicabstractbooleanisStupidName(Stringname){}} B: publicclassSomething{voiddoSomething(){privateStrings="";intl=s.length();}} C: publicclassSomething{publicstaticvoidmain(String[]args){Othero=newOther();newSomething().addOne(o);}publicvoidaddOne(finalOthero){o.i++;}}classOther{publicinti;} D: publicclassSomething{publicintaddOne(finalintx){return++x;}}
从下面四段()代码中选择出正确的代码段() A: abstractclassName{privateStringname;publicabstractbooleanisStupidName(Stringname){}} B: publicclassSomething{voiddoSomething(){privateStrings="";intl=s.length();}} C: publicclassSomething{publicstaticvoidmain(String[]args){Othero=newOther();newSomething().addOne(o);}publicvoidaddOne(finalOthero){o.i++;}}classOther{publicinti;} D: publicclassSomething{publicintaddOne(finalintx){return++x;}}
1