Java Flashcards
Describe caching in a cpu.
null1
Describe deadlock.
null2
Describe visibility of a variable.
null3
Describe volatility and the volatile keyword.
null4
Does a thread get its own heap?
null5
Does a thread get its own stack?
null6
Give examples of some concurrency safe collections.
null7
Give some examples of collections that are not concurrency safe.
null8
How can enums help with making singletons thread safe?
null9
How can we alter the singleton design pattern to be thread safe?
null10
How do we fix race conditions?
null11
In java multithreading, what is the monitor design pattern?
null12
Is the classic singleton design pattern thread safe?
null13
What are Consumer interfaces?
null14
What are locks and keys?
null15
What are Predicate interfaces, and what do they return?
null16
What are the states of a thread?
null17
What design pattern can we use to reuse threads and minimize the overhead in an application?
null18
What does the .interrupt method do to a thread?
Moves a thread from the running state to the runnable state
What does the .join method do to a thread?
Calling thread enters the waiting state until the referenced thread terminates
What does the .notifyAll method do?
All threads are moved from the waiting state to the runnable state
What does the .notify method do to a thread?
One thread is moved from the waiting state to runnable state (chosen by the schedular)
What does the streams method, filter, do?
null19
What does the streams method, map, do?
null20
What does the streams method, reduce, do?
Combines all elements in a stream into one element
What does the .wait method do to a thread?
Moves a thread from the running state to the waiting state
What interface defines the void run method for threads?
null21
What is a Collector?
A mutable reduction operation that accumulates input elements into a mutable result container, optionally transforming the accumulated result into a final representation after all input elements have been processed.
What is a Deque?
null22
What is a functional interface?
null23
What is a HashMap?
null24
What is a HashSet?
null25
What is a HashTable?
null26
What is a Instant class?
null27
What is a Linked List?
null28
What is a Map?
null29
What is a mutex?
null30
What is an Array List?
null31
What is an intermediate operation of streams?
null322
What is a predicate?
null33
What is a race condition?
null34
What is a reentrant lock and how is it used in java synchronization?
null35
What is a semaphore?
null36
What is a terminating operation of streams?
null37
What is a thread?
null38
What is a TreeMap?
null39
What is a TreeSet?
null40
What is a Vector?
null41
What is caching?
null42
What is covariance?
null43
What is method overloading?
null44
What is method overriding?
null45
What is mutual exclusion?
null47
What is over/under flow (widening and narrowing)?
null46
What is parallelism in java multithreading?
null 47
What is starvation?
When a thread cannot access a shared resource due to other threads using too frequently
What is the callable interface?
null48
What is the Collection interface?
null49
What is the Collections class?
null50
What is the Date Time api?
null51
What is the difference between a checked and unchecked exception?
null52
What is the difference between a HashTable and a HashMap?
null53
What is the difference between a List and a Set?
null54
What is the difference between a Set and a Queue?
null55
What is the difference between Errors and Exceptions?
null56
What is the difference between final, finalize, and finally?
null57
What is the difference between java8 date time api vs java7 date time api (why did they remake it?
null58
What is the difference between throw and throws?
null59
What is the executor design pattern?
null60
What is the executor interface?
null61
What is the factory design pattern?
null62
What is the Iterable interface?
null63
What is the java.util.function package?
null64
What is the producer consumer problem?
null65
What is the purpose of connection pooling in jdbc or other connection style implementations?
null66
What is the purpose of the Collections API
A collections framework represents a unified application programming interface for not only representing collections of objects, but also for manipulating them in a consistent manner at a high enough level of abstraction to encourage reusability and good object-oriented design.
What is the purpose of the thread schedular?
null67
What is the ReadWriteLock interface in java and what are some notable subclasses?
null68
What is the Runnable design pattern?
null69
What is the singleton design pattern?
null70
What is the stream api?
null71
What is thread pooling?
null 72
What is type casting?
null73
What is up and down casting?
null74
When adding the synchronized keyword to the method signature, what object is used for the key?
null75
Which class can we extend to create a custom thread in java?
null76