Welcome Guest | Sign in | Register
Collections - Discussion Page For Q.2571 | Java Programming Questions and Answers | Java Programming Free Online-Tests | LucentBlackBoard | LucentBlackBoard.com

Home > Java Programming > Collections > Questions and Answers

Q: What is the output for the below code ?
public class Test {
public static void main(String... args) {
int [] index = new int[5];
System.out.println(index instanceof Object);
}
}
A. true B. false
C. Compilation fails with an error at line 3 D. Compilation fails with an error at line 4

Answer and Explanation

Answer:true

Explanation:
An array is always an instance of Object

Comment on this Question

Name:

Loading...




Partner Sites
LucentBlackBoard.com                  SoftLucent.com                  LucentJobs.com
All rights reserved © 2012-2015 SoftLucent.