+923132835245
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. Which of the following informs the JavaDoc tool that custom annotations must be visible in the JavaDoc for classes that are using custom animations?
@Target
@Reference
@Documented
@inherited
View Answer
2. In Java 8, which of the following classes is used in place of TimeZone.getDefault() method?
Instant
Duration
Clock
System
View Answer
3. Which of the following statement is true regarding local inner class.
None of these
Associated with an instance of the enclosing class
Can implement anonymous interfaces
Cannot access private members of the enclosing class
View Answer
4. Identify the number of times the @Repeatable annotation type can be executed on the same source code element by default.
One
Multiple
Zero
Twice
View Answer
5. Which one is true about a constructor ?
A constructor may be declared private
A constructor is used to create objects.
A constructor must have the same name as the class it is declared within.
All of the above
View Answer
6. In Java code, the line that begins with /* and ends with */ is known as?
Both A & B
Single line comment
None of the above
Multiline comment
View Answer
7. Identify the shortest manner in which you can decorate a Java annotation
suffix #
prefix @
suflix @
prefix #
View Answer
8. Time-zone based date and time information of a ZonedDateTime object can be accessed using _______ method.
getValue()
normalized()
of()
instant()
View Answer
9. 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
10. Which of the following keywords are used to explicitly raise an exception from a method?
try and finally
none of these
throw and throws
try-catch
View Answer