Java interview preparation Quiz 2 Welcome to your Fresher Interview Preparation - Java Skills - 2 Name Email Phone Number 1. ____________ can be passed by value or by reference.parametersnonedatavalue2. ______________ review the input string and return a boolean indicating whether or not thepattern founddatanonestudy methodsmethods3. ___________ is a concrete implementation of a calendar class that implements the normalgregorian calendar.functionsnonegregoriancalendardate4. An ____________ is an exception that occurs at the time of execution.Runtime exceptionsnonetimedata5. The ___________ is used to read data from a source.outputstreamstreamInputstreamnone6. _____________ replaces all occurrences.catnonereplacereplaceAll7. There are ___________ useful file utility methods, which can be used to create directories.twoonethreenone8. There are __________ categories of exceptions and errorsnonethreeonetwo9. An _____________ is a problem that arises during the execution of a program.exceptionnonehandleerror10. The ___________ returns the index of the last character matched , plus one.datastart methodsnoneend methods11. Java provides the _______________ package for pattern matching with regular expressionsjavajava.util.regexnoneregex12. ____________ is used to invoke an exception explicitly.addressnonethrowdata13. A __________ that will be called just before an object final destruction by the garbage collectordatafinalize()functionnone14. _______________ are useful methods for replacing text in an input string.nonereplacement methodsdatamethods15. A _____________ object is an unchecked exception that indicates a syntax error in a regularexpression pattern.objectpatternsyntaxexceptionnonesyntax16. A _____________ is an unchecked exception that indicates a syntax error in a regularexpression pattern.datapatternnonepatternsyntaxexception17. The Java.util.regex package primarily consist of the following ___________ classes:twothreenoneone18. A ___________ is a collection of statements that are grouped together to perform an operation.nonedata methodmethodJava method19. The ______________ returns the start index of the subsequence captured by the given groupduring the previous match operation.nonestart methodsdata methodsend methods20. A _____________ is a compiled representation of a regular expression.pattern objectmatcher classobjectnone21. The ____________ method creates a directory, returning true on success and false on failure.dir()mknonemkdir()22. _____________ streams are used to perform input and output of 8-bit bytes.char bytedata byteJava bytenone23. A _____________ initializes an object when it is created.datadestructornoneconstructor24. _______________ is used to output the data produced by the user's program.noneoutputstandardstandard ouput25. The throws keyword appears at the ______ of a method's signature.startendnonedata26. The ______________ is used for writing data to the destination.InputstreamnoneOutputstreamstream27. When a class has two or more methods by the same name but different parameters, it is knownas ____________.datafunctionnonemethod overloading28. ____________________ is a new exception handling mechanism that was introduced in Java7 , which automatically closes the resources used within the try catch block.addressnonedataautomatic resource management29. ________________ provide useful index value that show precisely where the match was foundin the input string.noneIndex methodsindexmethods30. All ____________ classes are subtypes of the java.lang.exception class.classexceptionnoneobject31. A method catches an exception using a combination of the try and catch keywords is known as__________.catching exceptionsaddressnonedata32. _______________ streams are used to perform input and output for 16-bit unicode.Java characternonealphabetdata33. _________________ are a way to treat multiple characters as a single unit.capturing groupsdatausersnone34. _____________ is used to postpone the handling of a checked exception.datathrownonethrows35. ____________ is used to output the error data produced by the user's program.noneStandard errordataStandard36. ____________ replaces the first occurrence.replacenonereplacefirstdata37. __________ is a keyword in java which is used as a references to the object of the current class.whythisnonethat38. A _____________ expression is a special sequence of characters that helps you match or findother strings or set of strings, using a specialized syntax in a pattern.structureRegularnoneExpression39. ___________ are exceptions/errors that are exclusively or logically thrown by the JVM.JVM Exceptionsnonedataexceptions40. The __________ allows us to create methods which do not return a value.void keyword.datastructurenone41. A _____________ constructor that accepts one or more parameters.functionsparameterizeddatanone42. A ______________ argument is the information that directly follows the programs name on thecommand line when it is executed.command linedatanonefunction43. The ______________ method creates both a directory and all the parents of the directory.mkdirs()mknonemkdir()44. A ______________ is the engine that interprets the pattern and performs match operationsagainst an input string.classnoneMatcher classobject45. _______________ is used to feed the data to user's programnoneinputstandardstandard input46. A ____________ is an exception that occurs at the compile time, these are also called ascompile time exceptions.noneRuntime exceptionsdatatime47. The Exception class has ________ main subclasses.nonetwofourthree48. We can use ___________ method provided by file object to list down all the files anddirectories available in a directory.isted()li()nonelist()49. The __________ follows a try block or a catch block.blockdatanonefinally block50. A __________ can be defined as a sequence of data.streamdreamnonedataPlease fill in the comment box below. Time is Up!