Can anyone help me identify the Exception in thread “AWT-EventQueue-0” java.lang.NullPointerException on Line 65?

前端 未结 2 1883
半阙折子戏
半阙折子戏 2021-01-28 16:28

I keep getting a Run Time error that says I am having an Exception in thread \"AWT-EventQueue-0\" java.lang.NullPointerException it is saying a [line 65] but to me it just looks

2条回答
  •  萌比男神i
    2021-01-28 17:01

    Line 65 is this one:

    if (state.equals("Alabama"))
    

    If you look through the previous code, nothing has initialized state so its value will be null.

提交回复
热议问题