consider the following code
public class JListExample {
public static void main(
String[] args) {
Object temparry[]={new String("jinesh"),new String("parikh")};
String s[]=(String[])temparry;
}
}
when i run this programme it gives me the runtime exception as follows
java.lang.ClassCastException: [Ljava.lang.Object;
at List.JListExample.main(JListExample.java:81)
Exception in
thread "main"
can anybody tell me why is this giving me error ?