+ 1
Explain below code syntax
Object strObj = "string"; // what is this syntax String cStr = (String & CharSequence) strObj;
2 Réponses
- 1
(String & CharSequence) strObj;
tryes to reduce (access to) Object type fields to fields of String and CharSequence,
but because every class types are subclass of Object there is not effect of lost functionality of strObj.
String implements CharSequence, you can write
(String) strObj;
with same effect