getClass() is a method in the Object class that you can use it with any object to get and display the class of any object. Your code was having a casting problem. The error message should show you...
Type: Posts; User: Norm
getClass() is a method in the Object class that you can use it with any object to get and display the class of any object. Your code was having a casting problem. The error message should show you...
When you get an error, please copy and paste here the full text of the error.
Print out the value of the variables that are being used to be sure that they are what you expect. Use the getClass()...
Separate your compound statement up into single, simple statements to get the correct type for each usage.