Safcode | Code Your Ideas by Sir Safder
+923132835245
safcodeinstitute@gmail.com
Online Quiz
10000+ Questions!
Students Works
Ideas & Topics!
Live Coding
HTML & CSS
Home
(current)
About
Courses
CIT
Web Designing
Office Automation
Graphics Designing
Web Development
Software Development
Digital Marketing
App Development
Amazon Virtual Assistant
YouTube Earning
Tutorials
Softwares
Programming Notes
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?
@Documented
@Reference
@Target
@inherited
View Answer
2. In Java code, the line that begins with /* and ends with */ is known as?
Single line comment
Multiline comment
None of the above
Both A & B
View Answer
3. Which of the following annotations is used as custom annotation at runtime?
interface
@Retention
@Documented
reference
View Answer
4. Which of the following functions on any Zoneld ensures that a fixed offset ID will be formed as a ZoneOffset?
now()
normalized()
of()
getVal()
View Answer
5. Who is known as father of Java Programming Language?
Charles Babbage
Blaise Pascal
Rasmus Lerdof
James Gosling
View Answer
6. Which of the following area in the memory stores object references, method parameters, and its local variables?
stack
Accumulator
Register
heap
View Answer
7. What are default methods also known as? a. Virtual extension methods b. Defender methods c. Extension methods
A and B
Only B
Only A
B and C
View Answer
8. Which of the following statement is true regarding a constructor in a class.
All of them
A constructer can be overloaded
A constructor has an associated destructor
A constructor returns void
View Answer
9. What is the full form of JVM ?
Java Verified Machine
ava Very Large Machine
None of them
Java Virtual Machine
View Answer
10. Which of the following keywords are used to explicitly raise an exception from a method?
try-catch
none of these
try and finally
throw and throws
View Answer
11. Time-zone based date and time information of a ZonedDateTime object can be accessed using _______ method.
instant()
getValue()
of()
normalized()
View Answer
12. 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
13. Which of the following are not Java keywords?
class
switch
then
double
View Answer
14. Which of the following methods cannot have a body in Java?
static
final
native
local
View Answer
15. Which one is true about a constructor ?
A constructor may be declared private
A constructor must have the same name as the class it is declared within.
A constructor is used to create objects.
All of the above
View Answer
16. Identify the number of times the @Repeatable annotation type can be executed on the same source code element by default.
Twice
One
Zero
Multiple
View Answer
17. In Java 8, which of the following classes is used in place of TimeZone.getDefault() method?
System
Duration
Instant
Clock
View Answer
18. The _____ class is declared without a name within a code block such as the body of a method.
Anonymous class
None of these
Final Class
Local inner class
View Answer
19. A lambda expression facilitates __________
Logical programming
Backward reasoning
Functional programming
Structured programming
View Answer
20. Identify the shortest manner in which you can decorate a Java annotation
prefix @
suffix #
prefix #
suflix @
View Answer