adplus-dvertising
frame-decoration

Question

Which of these exceptions will be thrown if we declare an array with negative size?

a.

IllegalArrayException

b.

IllegalArraySizeExeption

c.

NegativeArrayException

d.

NegativeArraySizeExeption

Posted under Java Programming

Answer: (d).NegativeArraySizeExeption

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Which of these exceptions will be thrown if we declare an array with negative size?

Similar Questions

Discover Related MCQs

Q. Which of these packages contain all the Java’s built in exceptions?

Q. Which of these exceptions will be thrown if we use null reference for an arithmetic operation?

Q. Which of these class is used to create user defined exception?

Q. Which of these class provides various types of rounding functions?

Q. Which of these methods return a smallest whole number greater than or equal to variable X?

Q. Which of these method returns a largest whole number less than or equal to variable X?

Q. Which of function return absolute value of a variable?

Q. Which of these methods of Byte wrapper can be used to obtain Byte object from a string?

Q. Which of the following methods Byte wrapper return the value as a double?

Q. Which of these is a super class of wrappers Byte and short wrappers?

Q. Which of these methods is not defined in both Byte and Short wrappers?

Q. Which of these methods of Character wrapper can be used to obtain the char value contained in Character object.

Q. Which of the following constant are defined in Character wrapper?

Q. Which of these is a super class of Character wrapper?

Q. Which of these methods is used to know whether a given Character object is part of Java’s Identifiers?

Q. Which of these coding techniques is used by method isDefined()?

Q. Which of these methods of Boolean wrapper returns boolean equivalent of an object.

Q. Which of the following constant are defined in Boolean wrapper?

Q. Which of these methods return string equivalent of Boolean object?

Q. Which of these methods is used to know whether a string contains “true”?