++92 313 8389893
safcodeinstitute@gmail.com
Online Quiz
10000+ Questions!
Students Works
Ideas & Topics!
Live Coding
HTML & CSS
Home
(current)
About
Courses
CIT
Web Designing
Graphic Designing
Web Development
Digital Marketing
WordPress + SEO
Artificial Intelligence (AI)
Shopify + WordPress Development
Tutorials
Feedback
Programming Notes
Enroll Now
Contact
Test Your Programming Skills with Safcode!
Here is all important interview / exams questions.
Student doing practice apptitude test on safcode platform.
Instruction: "Total Number of Questions: 20
Each question carry 10 mark , no negative marking"
Quiz Start
1. What are default methods also known as? a. Virtual extension methods b. Defender methods c. Extension methods
Only A
B and C
A and B
Only B
View Answer
2. Which of the following area in the memory stores object references, method parameters, and its local variables?
stack
Register
Accumulator
heap
View Answer
3. Which of the following annotations is used as custom annotation at runtime?
reference
interface
@Retention
@Documented
View Answer
4. In Java code, the line that begins with /* and ends with */ is known as?
Multiline comment
None of the above
Single line comment
Both A & B
View Answer
5. Which of the following informs the JavaDoc tool that custom annotations must be visible in the JavaDoc for classes that are using custom animations?
@Reference
@inherited
@Target
@Documented
View Answer
6. The _____ class is declared without a name within a code block such as the body of a method.
Final Class
None of these
Local inner class
Anonymous class
View Answer
7. Which of the following are not Java keywords?
class
then
switch
double
View Answer
8. Identify the number of times the @Repeatable annotation type can be executed on the same source code element by default.
Twice
Multiple
One
Zero
View Answer
9. In Java 8, which of the following classes is used in place of TimeZone.getDefault() method?
Clock
Duration
Instant
System
View Answer
10. Which of the following statement is true regarding local inner class.
Cannot access private members of the enclosing class
Can implement anonymous interfaces
Associated with an instance of the enclosing class
None of these
View Answer