英文:
i keep getting the error Cannot resolve symbol 'MutableInteger. and the same on the getvalue() or setValue()
问题
public static int LongestBubble(int[] Arr, int n){
//引用传递的共享变量
MutableInteger maxLength = new MutableInteger(0);// 此行出错
getLongestBubbleLength(Arr, n, 0, -1, State.START, 0, maxLength);
if (maxLength.getValue() < 3)// 此行出错
return 0;
return maxLength.getValue();// 此行出错
} // 结束 LongestBubble() 过程
英文:
public static int LongestBubble(int[] Arr, int n){
//SHARED BY REFERENCE VARIABLE
MutableInteger maxLength=new MutableInteger(0);// error on this line
getLongestBubbleLength(Arr,n,0,-1,State.START,0,maxLength);
if(maxLength.getValue()<3)// error on this line
return 0;
return maxLength.getValue();// error on this line
} // end of procedure LongestBubble()
专注分享java语言的经验与见解,让所有开发者获益!
评论