When do you get classcastexception?


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More Core Java Interview Questions

What is a priority queue java?

0 Answers  


How to override a equals() method and what is the use?

1 Answers  


Print Vertical traversal of a Binary Tree.

0 Answers   Amazon,


By what default value is an object reference declared as an instance variable?

1 Answers   Wipro,


Is it possible to write JAVA program without including any of the packages,such as "import java.io.*"; bcoz I instantly wrote a code without "import..." statement and runned the program on command Line & it worked. the code is: class Person { String name; int age; Person(String s,int a) { name = s; age = a; } accept() { System.out.println(name+"Hi!!!!!"); System.out.println(age); } } class Demo { public static void main(Strings args[])throws IOException { String name = args[0]; int age = Integer.parseInt(args[1]); Person p = new Person(name,age); p.accept(); } }

3 Answers  






Why do we use variables?

0 Answers  


What is finalize()?

0 Answers  


What is a variable analysis?

0 Answers  


What is cr keyboard?

0 Answers  


What is java volatile?

0 Answers  


explain local datetime api in java8?

0 Answers  


What is logical variable?

0 Answers  


Categories