About 391,000 results
Open links in new tab
  1. casting - Downcasting in Java - Stack Overflow

    Dec 19, 2008 · 1 Downcasting is very useful in the following code snippet I use this all the time. Thus proving that downcasting is useful.

  2. java - What is the difference between up-casting and down-casting …

    248 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 …

  3. What is a proper use of downcasting? - Software Engineering Stack …

    Feb 26, 2018 · Downcasting is unpopular, maybe a code smell: Object Oriented doctrine is to prefer, for example, defining and calling virtual or abstract methods instead of downcasting. What, if any, are …

  4. O que é upcasting e downcasting na linguagem Java?

    May 29, 2016 · Downcasting é quando o objeto se passa como se fosse um subtipo dele. Não há garantias que funcione (pode lançar uma ClassCastException, o que obviamente é um erro de …

  5. What is upcasting/downcasting? - Software Engineering Stack Exchange

    What is upcasting or downcasting? Is (Derived*)base_ptr; an upcast or downcast? I call it upcast because you are going away from the base into something more specific. Other people told me it is a …

  6. Upcasting and Downcasting in java - Stack Overflow

    Oct 25, 2010 · I can understand what upcasting is but downcasting is a little confusing. My question is why should we downcast? Can you help me with a real world example ? Is downcasting that important?

  7. java - Why do we need Downcasting really? - Stack Overflow

    May 28, 2015 · Why do we need Downcasting really? [duplicate] Asked 12 years, 5 months ago Modified 10 years, 7 months ago Viewed 13k times

  8. c# - downcast and upcast - Stack Overflow

    Downcasting however has to be done at run time generally as the compiler may not always know whether the instance in question is of the type given. C# provides two operators for this - is which …

  9. oop - How to downcast a Java object? - Stack Overflow

    Nov 5, 2013 · Here you are talking about downcasting, so in this scenario always superclass should be used as a reference and child object should be pointed by that. This usd basically in factory patter.

  10. Pandas replace and downcasting deprecation since version 2.2.0

    Nov 26, 2024 · Pandas replace and downcasting deprecation since version 2.2.0 Asked 1 year, 1 month ago Modified 1 year, 1 month ago Viewed 7k times