++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. The _____ class is declared without a name within a code block such as the body of a method.
Anonymous class
None of these
Local inner class
Final Class
View Answer
2. Which of the following statement is true regarding a constructor in a class.
A constructer can be overloaded
A constructor returns void
A constructor has an associated destructor
All of them
View Answer
3. Which of the following keywords are used to explicitly raise an exception from a method?
try-catch
none of these
throw and throws
try and finally
View Answer
4. A lambda expression facilitates __________
Logical programming
Functional programming
Structured programming
Backward reasoning
View Answer
5. Which of the following statement is true regarding local inner class.
None of these
Can implement anonymous interfaces
Associated with an instance of the enclosing class
Cannot access private members of the enclosing class
View Answer
6. Which of the following area in the memory stores object references, method parameters, and its local variables?
Accumulator
stack
Register
heap
View Answer
7. 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
@inherited
@Target
@Reference
View Answer
8. In Java 8, which of the following classes is used in place of TimeZone.getDefault() method?
Duration
Instant
System
Clock
View Answer
9. Which one is true about a constructor ?
A constructor must have the same name as the class it is declared within.
A constructor may be declared private
A constructor is used to create objects.
All of the above
View Answer
10. Who is known as father of Java Programming Language?
Charles Babbage
James Gosling
Rasmus Lerdof
Blaise Pascal
View Answer