java.lang.ClassCastException

后端 未结 6 654
感情败类
感情败类 2020-11-29 07:27

Normally whats the reason to get java.lang.ClassCastException ..? I get the following error in my application

java.lang.ClassCastException: [Lcom.rsa.authag         


        
6条回答
  •  我在风中等你
    2020-11-29 07:44

    ClassA a = ;
    ClassB b = (ClassB) a;
    

    The 2nd line will fail if ClassA is not a subclass of ClassB, and will throw a ClassCastException.

提交回复
热议问题