Hi guys budsy again , getting a problem in this code .I am taking two radio buttons and adding it to a buttongroup . Then i run System.out.println() to see the values but im getting a null pointer exception . I have used a similar code but in that i didn't get any error. Please help
Apart from the fact that action commands are not object-oriented programming . . . don't know.
Put this series of print statements before that line where the error happens.
Then you find out which line is causing the problem. It is also worthwhile seeing what the getSelection method returns. Also which sort of Button that might apply to. And work out whether that is going to be null for anything here.