MCQ 511 MarkWhich is a kind of default catch block?✓ catch (Exception eobj)B catch (default)C catch (last)D catch (end)AnswerCorrect option: A. catch (Exception eobj)catch (Exception eobj)View full question & answer→
MCQ 521 MarkWhich of the following catch block can handle any type of exception?✓ catch (Exception eobj)B catch (default)C catch (last)D catch (end)AnswerCorrect option: A. catch (Exception eobj)catch (Exception eobj)View full question & answer→
MCQ 531 MarkWhich block has to be placed at the end of all catch blocks when there are multiple catch blocks in a program?✓ DefaultB LastC EndD FinalAnswerCorrect option: A. DefaultDefaultView full question & answer→
MCQ 541 MarkIf which of the following block throws several different kinds of exceptions, we can write multiple catch blocks, each handling specific type of exception?✓ tryB catchC finallyD throwsAnswerCorrect option: A. trytryView full question & answer→
MCQ 551 MarkWhich multiple blocks can be there to handle each type of exception separately?✓ catchB throwsC tryD finallyAnswerCorrect option: A. catchcatchView full question & answer→
MCQ 561 MarkIn which of the following blocks should the code that may generate exception be written?✓ tryB catchC finallyD throwsAnswerCorrect option: A. trytryView full question & answer→
MCQ 571 MarkWhat may lead to an exception when we want to upload particular file to a remote computer?A If the file is not present in our computer.B If the computer is not connected to the network.✓ a and b bothD None of theseAnswerCorrect option: C. a and b botha and b bothView full question & answer→
MCQ 581 MarkHow many exceptions can occur in a single program?A Only oneB FiveC Two✓ MultipleAnswerCorrect option: D. MultipleMultipleView full question & answer→
MCQ 591 MarkWhat identifies the type of exception that the block is to deal with by catch block?✓ With parametersB Without parametersC By giving different definitionsD None of theseAnswerCorrect option: A. With parametersWith parametersView full question & answer→
MCQ 601 MarkIn which of the following brackets the code that is to be executed to handle an exception is written?✓ { }B ()C < >D [ ]AnswerCorrect option: A. { }{ }View full question & answer→
MCQ 611 MarkA catch block consists of the keyword catch followed by the following one.✓ ParameterB SymbolsC Return typeD None of theseAnswerCorrect option: A. ParameterParameterView full question & answer→
MCQ 621 MarkHow many catch blocks are there for a try block?A ThreeB TwoC One✓ More than oneAnswerCorrect option: D. More than oneMore than oneView full question & answer→
MCQ 631 MarkWhat is known as catch block if it is executed to handle an exception?✓ Exception handlerB Exception modifierC Exception CreationD Exception builderAnswerCorrect option: A. Exception handlerException handlerView full question & answer→
MCQ 641 MarkWhich block contains the code that is to be executed to handle an exception?A finallyB try✓ catchD throwsAnswerCorrect option: C. catchcatchView full question & answer→
MCQ 651 MarkWhich of the following block does the catch block immediately follow?✓ tryB throwC finallyD throwsAnswerCorrect option: A. trytryView full question & answer→
MCQ 661 MarkWhich block has to be there after try block?A finally, blockB catch block✓ a Or bD None of theseAnswerCorrect option: C. a Or ba Or bView full question & answer→
MCQ 671 MarkIn which of the following block the part of program that may lead to runtime errors must be written?A catch✓ tryC finallyD throwsAnswerCorrect option: B. trytryView full question & answer→
MCQ 681 MarkWhat will happen if the program has no exception handler?✓ Program will be terminated.B Will exit from the terminal.C Computer will shut down.D None of theseAnswerCorrect option: A. Program will be terminated.Program will be terminated.View full question & answer→
MCQ 691 MarkIn which of the following brackets try block statements are to be written?A { }B ()C < >✓ [ ]AnswerCorrect option: D. [ ][ ]View full question & answer→
MCQ 701 MarkHow many Exceptions a try block may give rise to?A OneB Three✓ One or moreD ZeroAnswerCorrect option: C. One or moreOne or moreView full question & answer→
MCQ 711 MarkEach type of exception corresponds to the following one in Java.A A class✓ A symbolC An objectD A methodAnswerCorrect option: B. A symbolA symbolView full question & answer→
MCQ 721 MarkWhich is the code where we want to monitor for exceptions?✓ tryB catchC finallyD throwsAnswerCorrect option: A. trytryView full question & answer→
MCQ 731 MarkWhich block do the keywords try, catch and finally represent?A Symbolic writings✓ StatementsC LoopD StructureAnswerCorrect option: B. StatementsStatementsView full question & answer→
MCQ 741 MarkWhich of the following are keywords for Java Exception handler?✓ tryB catchC finallyD All of theseAnswerCorrect option: A. trytryView full question & answer→
MCQ 751 MarkWhich keywords are used to write an exception handler?A tryB catchC finally✓ All theseAnswerCorrect option: D. All theseAll theseView full question & answer→
MCQ 761 MarkWhat do we try to ensure while performing exception handling?AThe program does not terminate abruptly.BThe program does not generate unexpected output.✓a and b bothDNone of theseAnswerCorrect option: C. a and b botha and b bothView full question & answer→
MCQ 771 MarkWhich kind of technique an exception handling is for managing errors?✓ Object-orientedB ImaginaryC ArithmeticD SymbolicAnswerCorrect option: A. Object-orientedObject-orientedView full question & answer→
MCQ 781 MarkWhose condition an exception is?A LogicB Arithmetic✓ ErrorD CodeAnswerCorrect option: C. ErrorErrorView full question & answer→
MCQ 791 MarkDue to which of the following exception a program to divide an integer by zero will be complied successfully but generate unexpected output?A Logical✓ ArithmeticC LanguageD ProgrammingAnswerCorrect option: B. ArithmeticArithmeticView full question & answer→
MCQ 801 MarkWhat will be the result when an integer number is divided by zero?A zeroB One✓ InfinityD minus zeroAnswerCorrect option: C. InfinityInfinityView full question & answer→
MCQ 811 MarkWhich of the following packages contains a hierarchy of classes dealing with various exceptions?A java. LangB java.io✓ a Or bD None of theseAnswerCorrect option: C. a Or ba Or bView full question & answer→
MCQ 821 MarkWhat is available in Java for each type of exceptions?✓ Corresponding Exception classB Corresponding libraryC Exception class which are not correspondingD Error exception libraryAnswerCorrect option: A. Corresponding Exception classCorresponding Exception classView full question & answer→
MCQ 831 MarkWhich reasonable message is displayed in result while we are trying to display the content of an element of an array that does not exist?A Not foundB Not exists✓ ArraylndexOu tOf Bounds ExceptionD None of theseAnswerCorrect option: C. ArraylndexOu tOf Bounds ExceptionArraylndexOu tOf Bounds ExceptionView full question & answer→
MCQ 841 MarkSome time program compiles successfully but does not guarantee that the program will execute as per our expectations.” -Specify this statement.A This statement is false.✓ This statement is true.C It depends on Java compiler.D It depends on Java program.AnswerCorrect option: B. This statement is true.This statement is true.View full question & answer→
MCQ 851 MarkWhich file shall we get if the program compiles successfully?A .java✓ .classC .objD .exeAnswerCorrect option: B. .class.classView full question & answer→
MCQ 861 MarkWhat does Exit code 1 indicate?✓ Some problem occurred while executing the command.B Not any problem occurred while executing the command.C Compiled program is not of Java.D None of theseAnswerCorrect option: A. Some problem occurred while executing the command.Some problem occurred while executing the command.View full question & answer→
MCQ 871 MarkWhich exit code indicates that the command execution is successful?A1✓0C —1D - AnswerCorrect option: B. 00View full question & answer→
MCQ 881 MarkWhich of the following indicates whether the command or the program has been executed successfully or not in the field of Computer science?A Exit codeB Exit status✓ a Or bD None of theseAnswerCorrect option: C. a Or ba Or bView full question & answer→
MCQ 891 MarkCompile-time errors are usually the mistakes of the following one.✓ ProgrammerB CompilerC JavaD None of theseAnswerCorrect option: A. ProgrammerProgrammerView full question & answer→
MCQ 901 MarkWhat does Java compiler show if there is an error during compilation?A The line number where error has occurred.B The type of error.✓ a and b bothD None of theseAnswerCorrect option: C. a and b botha and b bothView full question & answer→
MCQ 911 MarkWhich of the following are examples of common syntax error?A Missing of comma (,) or semicolon (;)B Use of undeclared variable, wrong spellings of identifier or keywordC Mismatch of bracket✓ All of theseAnswerCorrect option: D. All of theseAll of theseView full question & answer→
MCQ 921 MarkWhen we will not be able to crate the “.class” file?✓ If there is a syntax error in the program.B If there is a logical error in the program.C If there is a Math’s error in the program.D None of theseAnswerCorrect option: A. If there is a syntax error in the program.If there is a syntax error in the program.View full question & answer→
MCQ 931 MarkWhich file will not be able to create, if there is a syntax error in the program?A objB .exe✓ .classD javaAnswerCorrect option: C. .class.classView full question & answer→
MCQ 941 MarkWhen will we get an error if there is a syntax error in the program?A While writing a program✓ At compilation timeC While implementing a programD None of theseAnswerCorrect option: B. At compilation timeAt compilation timeView full question & answer→
MCQ 951 MarkWhich of the following is a function of compiler?✓ To convert source code to object codeB To convert object code to source codeC a and b bothD None of theseAnswerCorrect option: A. To convert source code to object codeTo convert source code to object codeView full question & answer→
MCQ 961 MarkWhat is used to convert basic instructions of any programming language to the instructions which can be implemented by a computer?A Translator✓ CompilerC ConverterD ConnectorAnswerCorrect option: B. CompilerCompilerView full question & answer→
MCQ 971 MarkWhat is known as the instructions which can be implemented by a computer?A Source code✓ Object codeC Syntax codeD Native codeAnswerCorrect option: B. Object codeObject codeView full question & answer→
MCQ 981 MarkWhat is known as basic instructions of any programming language?✓ Source codeB Object codeC Syntax codeD Native codeAnswerCorrect option: A. Source codeSource codeView full question & answer→
MCQ 991 MarkWhich kind of error conditions are created during program is classified?A Compile-time errorB Run-time error✓ a and b bothD None of theseAnswerCorrect option: C. a and b botha and b bothView full question & answer→
MCQ 1001 MarkHow many categories of error conditions are created during program is classified?✓ TwoB ThreeC FourD FiveAnswerCorrect option: A. TwoTwoView full question & answer→