Array
Array Java Script
Home
Multithreading
Hibernate
Spring
Android
Miscellaneous
TrackWise
TrackWise Tutorial
TrackWise Interview
SCJP
Object
Abstract
Array
Class
Constructor
Exception
Interview
Java
Spring
Hibernate
JSF
PL / SQL
JSP / Servlet
Web Services
Designing Patterns
Others
>>>
ERROR
Offensive Security
Struts 2
JSF
PHP
JDBC
JAVA
AWS
KOTLIN
Web Services
Tuesday, 2 April 2013
Array - 13
class A {}
class B {} extends A {}
public class C
{
public static void main(String args[]) throws ClassCastException
{
A[] arrA;
B[] arrB;
arrA=new A[10];
arrB=new B[20];
//
arrA=arrB;
//
arrB=(B[]) arrA;
//
arrA=new A[10];
//
arrB=(B[]) arrA;
}
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment