+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 annotations is used as custom annotation at runtime?
@Documented
interface
reference
@Retention
View Answer
2. Identify the number of times the @Repeatable annotation type can be executed on the same source code element by default.
One
Zero
Twice
Multiple
View Answer
3. Which of the following statement is true regarding local inner class.
Associated with an instance of the enclosing class
None of these
Can implement anonymous interfaces
Cannot access private members of the enclosing class
View Answer
4. Which of the following statement is true regarding a constructor in a class.
A constructer can be overloaded
A constructor returns void
All of them
A constructor has an associated destructor
View Answer
5. Time-zone based date and time information of a ZonedDateTime object can be accessed using _______ method.
getValue()
instant()
normalized()
of()
View Answer
6. 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
@Target
@Documented
@inherited
View Answer
7. Who is known as father of Java Programming Language?
Charles Babbage
Rasmus Lerdof
James Gosling
Blaise Pascal
View Answer
8. Which one is true about a constructor ?
A constructor must have the same name as the class it is declared within.
All of the above
A constructor may be declared private
A constructor is used to create objects.
View Answer
9. Identify the shortest manner in which you can decorate a Java annotation
prefix #
suflix @
prefix @
suffix #
View Answer
10. Which of the following functions on any Zoneld ensures that a fixed offset ID will be formed as a ZoneOffset?
of()
normalized()
now()
getVal()
View Answer