+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 one is true about a constructor ?
A constructor is used to create objects.
All of the above
A constructor may be declared private
A constructor must have the same name as the class it is declared within.
View Answer
2. Time-zone based date and time information of a ZonedDateTime object can be accessed using _______ method.
normalized()
instant()
getValue()
of()
View Answer
3. Which of the following statement is true regarding local inner class.
Associated with an instance of the enclosing class
Cannot access private members of the enclosing class
Can implement anonymous interfaces
None of these
View Answer
4. In Java code, the line that begins with /* and ends with */ is known as?
None of the above
Single line comment
Multiline 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?
@Documented
@Target
@Reference
@inherited
View Answer
6. The _____ class is declared without a name within a code block such as the body of a method.
Local inner class
Final Class
None of these
Anonymous class
View Answer
7. What is the full form of JVM ?
None of them
Java Virtual Machine
Java Verified Machine
ava Very Large Machine
View Answer
8. Which of the following keywords are used to explicitly raise an exception from a method?
throw and throws
try-catch
none of these
try and finally
View Answer
9. Which of the following annotations is used as custom annotation at runtime?
@Retention
reference
interface
@Documented
View Answer
10. In Java 8, which of the following classes is used in place of TimeZone.getDefault() method?
Duration
Instant
Clock
System
View Answer