What is the difference between up-casting and down-casting with respect to class variable

Upcasting is casting to a supertype, while downcasting is casting to a subtype. Upcasting is always allowed, but downcasting involves a type check and can throw a ClassCastException. In your case, a cast from a Dog to an Animal is an upcast, because a Dog is-a Animal. In general, you can upcast whenever there is … Read more

In Objective-C, what is the equivalent of Java’s “instanceof” keyword?

Try [myObject class] for returning the class of an object. You can make exact comparisons with: if ([myObject class] == [MyClass class]) but not by using directly MyClass identifier. Similarily, you can find if the object is of a subclass of your class with: if ([myObject isKindOfClass:[AnObject class]]) as suggested by Jon Skeet and zoul.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)