arraylist.size()java空指针异常

时间:2017-09-24 18:13:49

标签: java arraylist nullpointerexception

我已经阅读了其他答案,试图找到解决方案,但没有明确解释问题。

为什么以下代码块会为currArraySize创建一个空指针异常?

Private Sub TextBox1_MouseDown(ByVal Button As Integer, ByVal Shift As 
    Integer, ByVal X As Single, ByVal Y As Single)

    initialx = X
    initialy = Y
    xmove = True
End Sub

Private Sub TextBox1_MouseMove(ByVal Button As Integer, ByVal Shift As 
    Integer, ByVal X As Single, ByVal Y As Single)
    Dim newx, newy As Single

    If xmove = True Then
        newx = Math.Abs(X - initialx)
        newy = Math.Abs(Y - initialy)
        TextBox1.Width = TextBox1.Width + newx
    End If
End Sub

0 个答案:

没有答案