Java Interview Guide: How to Build Confidence With a Solid Understanding of Core Java Principles pdfdrive com


Object-Oriented Programming (Part II)



Yüklə 0,53 Mb.
Pdf görüntüsü
səhifə43/47
tarix06.05.2023
ölçüsü0,53 Mb.
#108601
1   ...   39   40   41   42   43   44   45   46   47
Java Interview Guide

Object-Oriented Programming (Part II)
What is the difference between a method declaration and a method signature?
What is a recursive method?
What is the final keyword used for?
What is the static keyword used for?
Why can’t a static method access a nonstatic field?
What are access modifiers used for? What are the different types?
What are annotations used for?
The Object Superclass


What is the difference between a shallow copy and a deep copy?
Why is a copy constructor preferable to the clone method?
What is the difference between the identity operator and the equals() method?
What is the relationship between the hashCode() method and the
equals() method?
What is the default implementation of the toString() method?
Why is the finalize() method unreliable for cleanup operations?
Composition & Inheritance
What is the difference between composition and inheritance?
What is the difference between method overriding and method overloading?
How would you determine whether to use composition or inheritance?
Abstract Classes & Interfaces
What is the difference between an abstract class and an interface?
How would you determine whether to use an abstract class or an interface?
Why can’t a class be declared both final and abstract?
What is the value of designing a codebase around the use of interfaces?
What are anonymous classes used for?
What is a closure?


What is a lambda expression?
Exceptions
What is an exception?
What is the difference between an unchecked and a checked exception?
How would you determine whether to use an unchecked or a checked exception?
How does a try/catch/finally block work?
How does the try-with-resources statement work?
Generics
What is the difference between a compile-time error and a runtime error?
What is the purpose of generics?
What are the different types of generic wildcards?
What is type erasure?
What are some of the limitations of generics?
Concurrency
What is the lifecycle of a Thread?
Why is synchronization necessary on shared resources?
What is used as a lock for synchronized static and synchronized
nonstatic methods?


What would happen if two different threads hit two synchronized nonstatic
methods on the same object simultaneously?
What would happen if two different threads hit a synchronized static method and
synchronized nonstatic method on the same object simultaneously?
What one thing does the volatile keyword guarantee about a variable?
What two things does the synchronize keyword guarantee about a block of code?
What are some built-in concurrent data structures?
What is the executor framework?
What is a ThreadLocal variable?
What are atomic variables?

Yüklə 0,53 Mb.

Dostları ilə paylaş:
1   ...   39   40   41   42   43   44   45   46   47




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©azkurs.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin