in Education by
Which of these exceptions will be thrown if we use null reference for an arithmetic operation? (a) ArithmeticException (b) NullPointerException (c) IllegalAccessException (d) IllegalOperationException I had been asked this question by my school principal while I was bunking the class. I'd like to ask this question from Java’s Built in Exceptions topic in chapter Exploring java.lang & java.io of Java Select the correct answer from above options Java questions and answers, Java questions pdf, Java question bank, Java questions and answers pdf, mcq on Java pdf, Java questions and solutions, Java mcq Test , Interview Java questions, Java Questions for Interview, Java MCQ (Multiple Choice Questions),Core Java Questions, Core Java MCQ,core java interview questions for experiencedcore java interview questions for 3 years experience,java programming questions,core java interview questions for freshers,java interview questions and answers for freshers, java programming questions and answers pdf, java interview questions for beginners

1 Answer

0 votes
by
 
Best answer
Right choice is (b) NullPointerException For explanation: If we use null reference anywhere in the code where the value stored in that reference is used then NullPointerException occurs.

Related questions

0 votes
    Which of these exceptions will be thrown if we declare an array with negative size? (a) IllegalArrayException ... questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which of these exceptions is thrown by methods of System class? (a) IOException (b) SystemException (c) ... questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which of these exceptions is thrown by URL class's constructors? (a) URLNotFound (b) URLSourceNotFound (c) ... questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which of these Exceptions is thrown by remote method? (a) RemoteException (b) InputOutputException (c) ... questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which of the following exceptions is thrown by every method of Runtime class? (a) IOException (b) ... questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which of these exceptions handles the situations when an illegal argument is used to invoke a method? (a) ... questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which of these classes is used for input and output operation when working with bytes? (a) InputStream (b ... questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which of the following can be operands of arithmetic operators? (a) Numeric (b) Boolean (c) Characters ... questions and answers pdf, java interview questions for beginners...
asked Oct 28, 2021 in Education by JackTerrance
0 votes
    If an expression contains double, int, float, long, then the whole expression will be promoted into which of ... questions and answers pdf, java interview questions for beginners...
asked Oct 28, 2021 in Education by JackTerrance
0 votes
    Which of these packages contain all the Java's built in exceptions? (a) java.io (b) java.util (c ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    If member does not implement serialization, which exception would be thrown? (a) RuntimeException (b) ... and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which of these will happen if recursive method does not have a base case? (a) An infinite loop ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 26, 2021 in Education by JackTerrance
0 votes
    If a class inheriting an abstract class does not define all of its function then it will be known as ... questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    If super class and subclass have same variable name, which keyword should be used to use super class? ( ... questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which exception is thrown when java is out of memory? (a) MemoryFullException (b) MemoryOutOfBoundsException (c ... and answers pdf, java interview questions for beginners...
asked Oct 26, 2021 in Education by JackTerrance
...