JOBSEEKERS
Login
Sign Up
Jobseeker
Employer
Staffing Firm
Direct Client
Java interview questions part 11
Java interview questions part 11
Back
Take as many assements as you can to improve your validate your skill rating
Total Questions: 20
1. Which of these events will be notified if scroll bar is manipulated?
A. ActionEvent
B. ComponentEvent
C. AdjustmentEvent
D. WindowEvent
Show Correct Answer
Correct Answer is :
AdjustmentEvent
2. Which of these events will be generated if we close an applet’s window?
A. ActionEvent
B. ComponentEvent
C. AdjustmentEvent
D. WindowEvent
Show Correct Answer
Correct Answer is :
WindowEvent
3. Which of the following is not a class of java.util.regex?
A. Pattern class
B. matcher class
C. PatternSyntaxException
D. Regex class
Show Correct Answer
Correct Answer is :
Regex class
4. What is the significance of Matcher class for regular expression in java?
A. interpretes pattern in the string
B. Performs match in the string
C. interpreted both pattern and performs match operations in the string
D. None of the mentioned.
Show Correct Answer
Correct Answer is :
interpreted both pattern and performs match operations in the string
5. Object of which class is used to compile regular expression?
A. Pattern class
B. Matcher class
C. PatternSyntaxException
D. None of the mentioned
Show Correct Answer
Correct Answer is :
Pattern class
6. Which capturing group can represent the entire expression?
A. group *
B. group 0
C. group * or group 0
D. Noe of the mentioned
Show Correct Answer
Correct Answer is :
group 0
7. groupCount reports a total number of Capturing groups.
A. TRUE
B. FALSE
C.
D.
Show Correct Answer
Correct Answer is :
TRUE
8. Which of the following matches nonword character using regular expression in java?
A. \w
B. \W
C. \s
D. \S
Show Correct Answer
Correct Answer is :
\W
9. Which of the following matches end of the string using regular expression in java?
A. \z
B. \\
C. \*
D. \Z
Show Correct Answer
Correct Answer is :
\z
10. What does public int end(int group) return?
A. offset from last character of the subsequent group
B. offset from first character of the subsequent group
C. offset from last character matched
D. offset from first character matched
Show Correct Answer
Correct Answer is :
offset from last character of the subsequent group
11. what does public String replaceAll(string replace) do?
A. Replace all characters that matches pattern with a replacement string
B. Replace first subsequence that matches pattern with a replacement string
C. Replace all other than first subsequence of that matches pattern with a replacement string
D. Replace every subsequence of the input sequence that matches pattern with a replacement string
Show Correct Answer
Correct Answer is :
Replace every subsequence of the input sequence that matches pattern with a replacement string
12. What does public int start() return?
A. returns start index of the input string
B. returns start index of the current match
C. returns start index of the previous match
D. none of the mentioned
Show Correct Answer
Correct Answer is :
returns start index of the previous match
13. Which of the following keywords is used for throwing exception manually?
A. finally
B. try
C. throw
D. catch
Show Correct Answer
Correct Answer is :
throw
14. Which of the following classes can catch all exceptions which cannot be caught?
A. RuntimeException
B. Error
C. Exception
D. ParentException
Show Correct Answer
Correct Answer is :
Error
15. Which of the following is a super class of all exception type classes?
A. Catchable
B. RuntimeExceptions
C. String
D. Throwable
Show Correct Answer
Correct Answer is :
Throwable
16. Which of the following operators is used to generate instance of an exception which can be thrown using throw?
A. thrown
B. alloc
C. malloc
D. new
Show Correct Answer
Correct Answer is :
new
17. Which of the following keyword is used by calling function to handle exception thrown by called function?
A. throws
B. throw
C. try
D. catch
Show Correct Answer
Correct Answer is :
throws
18. Which of the following handles the exception when a catch is not used?
A. finally
B. throw handler
C. default handler
D. java run time system
Show Correct Answer
Correct Answer is :
default handler
19. Which part of code gets executed whether exception is caught or not?
A. finally
B. try
C. catch
D. throw
Show Correct Answer
Correct Answer is :
finally
20. Which of the following should be true of the object thrown by a thrown statement?
A. Should be assignable to String type
B. Should be assignable to Exception type
C. Should be assignable to Throwable type
D. Should be assignable to Error type
Show Correct Answer
Correct Answer is :
Should be assignable to Throwable type
Similar Interview Questions
Search for latest jobs
Find Jobs