I wonder if this expression is wrong?
Or this?
Here is my QuizActiviyAdjectives class.
If someone can write me the snippet or tips for the solution would be awesome. Thanks in advance.
if(((RadioButton) grp_options.getChildAt(grp_options.getCheckedRadioButtonId())).getText().equals(rightAnswers.get(i)))
Here is the log.
05-05 16:10:42.380: E/AndroidRuntime(16461): FATAL EXCEPTION: main
05-05 16:10:42.380: E/AndroidRuntime(16461): Process: org.example.ydsquizapp, PID: 16461
05-05 16:10:42.380: E/AndroidRuntime(16461): java.lang.NullPointerException
05-05 16:10:42.380: E/AndroidRuntime(16461): at org.example.ydsquizapp.QuizActivityAdjectives$1.onClick(QuizActivityAdjectives.java:124)
05-05 16:10:42.380: E/AndroidRuntime(16461): at android.view.View.performClick(View.java:4461)
05-05 16:10:42.380: E/AndroidRuntime(16461): at android.view.View$PerformClick.run(View.java:18523)
05-05 16:10:42.380: E/AndroidRuntime(16461): at android.os.Handler.handleCallback(Handler.java:733)
05-05 16:10:42.380: E/AndroidRuntime(16461): at android.os.Handler.dispatchMessage(Handler.java:95)
05-05 16:10:42.380: E/AndroidRuntime(16461): at android.os.Looper.loop(Looper.java:136)
05-05 16:10:42.380: E/AndroidRuntime(16461): at android.app.ActivityThread.main(ActivityThread.java:5118)
05-05 16:10:42.380: E/AndroidRuntime(16461): at java.lang.reflect.Method.invokeNative(Native Method)
05-05 16:10:42.380: E/AndroidRuntime(16461): at java.lang.reflect.Method.invoke(Method.java:515)
05-05 16:10:42.380: E/AndroidRuntime(16461): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
05-05 16:10:42.380: E/AndroidRuntime(16461): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:606)
05-05 16:10:42.380: E/AndroidRuntime(16461): at dalvik.system.NativeStart.main(Native Method)
How can i fix it ? Another way to write it?

That new kid is a freak. Show him this tiny ad:
Thread Boost - a very different sort of advertising
https://coderanch.com/t/674455/Thread-Boost-feature
|