java.lang.ClassCastException: CodeRanch20131211b$Cat cannot be cast to CodeRanch20131211b$Dog

Coderanch | J Steven Perry | 3 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Getting ClassCastException in simple downcasting

    Coderanch | 3 years ago | J Steven Perry
    java.lang.ClassCastException: CodeRanch20131211b$Cat cannot be cast to CodeRanch20131211b$Dog

    Root Cause Analysis

    1. java.lang.ClassCastException

      CodeRanch20131211b$Cat cannot be cast to CodeRanch20131211b$Dog

      at CodeRanch20131211b.main()
    2. Unknown
      CodeRanch20131211b.main
      1. CodeRanch20131211b.main(CodeRanch20131211b.java:22)
      1 frame