FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[Original HTTPS Page]
anton-liauchuk/java-interview: Java interview · GitHub
anton-liauchuk
/
java-interview
Public
Notifications
You must be signed in to change notification settings
Fork
65
Star
302
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Branches
Tags
Open more actions menu
Latest commit
History
239 Commits
239 Commits
Folders and files
Name
Name
Last commit message
Last commit date
custom-stream
custom-stream
deadlock/
src
deadlock/
src
leetcode-221-maximal-square
leetcode-221-maximal-square
review/
src
review/
src
sql
sql
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
LICENSE
LICENSE
README.md
README.md
algorithm.md
algorithm.md
architecture.md
architecture.md
collections.md
collections.md
concurrency.md
concurrency.md
core.md
core.md
ddd.md
ddd.md
git.md
git.md
graalvm.md
graalvm.md
gradle.md
gradle.md
hibernate.md
hibernate.md
javascript.md
javascript.md
kafka.md
kafka.md
kubernetes.md
kubernetes.md
linux.md
linux.md
maven.md
maven.md
microservices.md
microservices.md
patterns.md
patterns.md
quarkus.md
quarkus.md
rabbitmq.md
rabbitmq.md
react.md
react.md
rest.md
rest.md
servlet.md
servlet.md
spring.md
spring.md
sql.md
sql.md
systemdesign.md
systemdesign.md
test.md
test.md
transaction.md
transaction.md
Repository files navigation
README
Code of conduct
MIT license
Table of Contents
Core
Collections
Concurrency
Spring
Servlet
Hibernate
Git
Maven
Gradle
Microservices
JavaScript
Linux
Patterns
DDD
Architecture
REST
SQL
Test
Transactions
RabbitMQ
GraalVM
System Design
Kafka
Kubernetes
Core
What is the difference between JDK and JRE?
What is ClassLoader? What are the types of class loaders?
What's new in Java 8?
What are the memory types in Java?
What is java agent?
Possible Performance Tools for Java?
What is java profiler?
What is stop the world?
What is the default garbage collector?
How does G1 GC work?
What is the difference between int, Integer and AtomicInteger?
How does post-increment work for wrapper classes (for example, Integer)?
What can you say about interface constants?
What is the contract between equals and hashcode?
What are the purposes of inner classes?
Why composition is preferred over inheritance?
Do inner classes have access to private fields from outer class?
What are the differences between static nested classes and non-static nested classes?
What are the methods of Object class?
What is Jmeter?
Possible Ways to Capture Java Heap Dumps?
What is the result of this code:
Are checked exceptions bad?
How var in Java 10 can be used?
What is functional interface?
Functional interfaces vs abstract classes?
Why getters/setters?
Serialization?
Deserialization after changes in class? Possible issues?
What is the difference between cohesion and coupling?
Java modifiers?
Exception Hierarchy?
One exception is thrown by catch block and another one is thrown from finally block, which exception will be thrown by method?
Is it possible to serialize lambda expression?
How is recursion implemented in Java?
Is it needed to document unchecked exceptions?
Java Date classes?
Why Do Local Variables Used in Lambdas Have to Be Final or Effectively Final?
orElse() vs orElseGet() in Optional?
How to filter list of objects using Stream API without .filter()?
What is String Pool? How do Strings get there?
What is the difference between StringBuilder and StringBuffer?
Difference between <? super T> and <? extends T> ?
How does JIT compiler work?
Mutable vs Immutable object?
Provide some examples when a finally block won't be executed in Java?
What is type erasure?
What is built-in mechanism for creating singletons in Java?
How to understand a third-party library without source code?
Collections
What is the complexity for get in Hashmap?
What is the complexity for get in Hashmap for keys with hashcode = 1?
What is the hierarchy of collections?
What is the difference between LinkedList and ArrayList?
What is better to use LinkedList or ArrayList?
What is the implementation of HashMap?
What are the implementations of Map?
What is the complexity of removing the last element from LinkedList?
What are the differences between Set and Map?
What are the possible implementations of Map for concurrency?
What is the main difference between Stream API and Collection?
What should be avoided in parallel stream?
Implement custom version of java.util.stream.Stream with filter/map methods
What is forEach?
When is it better to use foreach loop instead of Iterable.forEach()?
What is SplitIterator?
Why do Java Collections can not directly store Primitives types?
Concurrency
What is usage of wait/notify methods?
Where wait() can be used?
What is the keyword synchronized?
What is the keyword volatile?
How volatile is related to happens before?
What are the concurrent collections?
What is CopyOnWriteArrayList?
What can you say about ConcurrentHashMap?
How did the internal implementation of ConcurrentHashMap change before and after Java 8?
What are the benefits of using ConcurrentHashMap over HashTable?
What is the time complexity of get() operation in ConcurrentHashMap?
What is the synchronized access?
What is the monitor for non-static synchronized method?
What are possible ways for synchronization threads?
How to wait for finish of thread?
What is the result of this code?
Change the code for getting deadlock
What is the Difference between Future and CompletableFuture?
How to handle unsuccessful results of CompletableFuture?
Which executor implementation is used by default when you don't specify an executor for CompletableFuture methods like supplyAsync() or runAsync()?
What are the main methods in CompletableFuture that allow you to define and execute asynchronous tasks?
How do AtomicVariables work?
What is the difference between AtomicInteger and synchronized in Java, and when should you use each?
What do virtual threads mean?
What does pinning mean for virtual threads, which cases introduce it, and how has the behavior changed across Java versions?
What are the best practices for working with ThreadLocal when using virtual threads?
How do you choose between using Virtual Threads (Project Loom) and Reactive Streams frameworks (like Reactor, Mutiny, Akka Streams) for concurrent programming in Java?
Spring
How make spring service thread-safe?
What is bean?
How bean gets into the container?
What are the possible bean scopes?
How to inject a prototype bean into a singleton?
What is the difference between @Component, @Service, @Repository, and @Controller?
What is the difference between @Service and @Bean
How to call a method after bean initialization?
What is the default scope?
What are the possible ways of Dependency Injection?
Where better to use dependency injection via constructor? Where via setter?
How does Spring detect circular dependencies?
How to catch the exceptions for controllers?
What is the difference between BeanFactory and FactoryBean?
What is the difference Spring and Spring Boot?
How to add own auto-configurations?
Where can be stored the list of auto-configurations in META-INF?
What are the possible ways of configurations in Spring?
What is the lookup method?
What is declarative transaction in Spring?
Are there any potential differences between the declarative way (using @Transactional annotation) and the programmatic way (using TransactionTemplate) of using transactions in Spring? Which is preferable?
What are the types of proxy in Spring? Where does each type used?
What creates a proxy?
What is the self-invocation problem with Spring AOP proxies, and how does it affect features like @Transactional?
What is environment?
How does auto-configuration work?
What is the difference between @Resource and @Autowired annotations?
What is the feature in Spring Boot for setting up the dependencies?
Where does Spring Boot application begin?
What is the difference between @Controller and @RestController annotations?
Does @Qualifier annotation can work only with bean name from @Component annotation?
Is it required to put @Repository annotation in the case of extending JpaRepository?
How ResponseEntity can be used?
Does entity from @Transactional method can be updated without executing save method?
What is the difference between physical and logical transactions?
Is it possible to have only one transaction in the case of executing several @Transactional methods?
Anti-patterns of bean validation?
Is it good practice to define interface for Spring bean?
How does @Transactional annotation work?
How to use @NamedEntityGraph with Spring Data JPA?
Quarkus
Why does Quarkus have faster startup time, lower memory footprint, and better native image support compared to Spring Boot?
Servlet
What is servlet?
What is difference between parameters and attributes?
What is the life cycle of servlet?
What is the servlet mapping?
Hibernate
What is detached entity?
What is the use of flush?
What are the cache levels?
What is the first-level cache?
Hibernate inheritance?
Common hibernate mistakes?
Hibernate best practice?
How to Define and Use a @NamedEntityGraph?
Is it required to implement equals and hashcode on JPA entities?
Why is Lombok's @Data annotation dangerous for Java entities?
How lazy loading works in hibernate?
Optimal queries in Hibernate?
Possible enum mapping solutions?
In which cases LazyInitializationException can occur?
There are three SQL statements in one transaction, during the first one exception occurred on DB level, what will happen with others if you catch the first one?
What is the N+1 Query Problem? How to Solve the N+1 Query Problem?
Git
What is the difference between merge and rebase?
What is git reset?
What is the difference between soft reset and hard reset?
How to combine multiple commits into one prior to push?
Maven
What is the difference between Maven and Gradle?
How will work Maven in the case of multiple version of the same dependency?
What is the dependency management in Maven?
Does maven support inheritance for pom files?
Gradle
What is the difference between api and implementation?
Microservices
What are the possible ways for communication between microservices?
What is exchange in message queue?
What are the benefits of microservices?
What are the disadvantages of microservices?
What are the possible issues in microservices
What are the possible solutions for the case when one service is not available?
What is the difference between synchronous and asynchronous communication?
What are possible ways for implementing authentication in microservices?
What is Eventual consistency?
How different types of communication can influence on performance?
What are possible strategies and issues in microservices deployment?
JavaScript
What are possible variable scopes?
What is bind? call & apply?
What is losing of context in js?
Is Javascript single threaded?
What is closure in js?
How to check if element exists in html?
2 functions with the same name but with different number of parameters. Can be the issues in this case?
Linux
How to print the list of processes in terminal Linux?
Patterns
Which architectural patterns you know?
What does it mean single responsibility?
What is the difference between facade and proxy/gateway?
What can we do in the case of constructor with big number of parameters?
How can be implemented builder?
What is pattern Visitor?
What is the issue can be solved by visitor?
What can you say about pattern observer?
How to initialize object depends on type?
Why Dependency Injection is needed?
Should services always return dtos?
The difference between adapter and decorator?
DDD
What is DDD?
Why DDD is needed?
What is aggregate in DDD?
What is anemic domain model?
What is the correct way for having relations between aggregates?
How to update several aggregates during one transaction?
What is event storming?
How domain events are related to eventual consistency?
What is the difference between domain events and event sourcing?
What is CQRS?
What is the best practice for validation in DDD?
What is the best practice for Value Object?
Possible issues with using domain model with public getters/setters and empty constructor?
How to work with large domain models? Is it correct to have a lot of fields in domain model?
How should be published integration events? Inside or outside transaction?
How to define the reference between aggregates?
Where to put validation rule for value object?
Possible integration ways between modules?
Architecture
What are the differences between monolith and microservices? (Performance/Deployability/Failure impact and etc)
Imperative vs functional vs reactive programming?
What is Serverless
What is the difference between native code, machine code and assembly code?
What is the difference between sharding and partitioning for databases?
What is the key difference between 2-phase commit and saga for distributed transactions?
When is server-side rendering technology useful?
REST
What is rest architecture? What are the requirements?
Is there state in rest architecture?
Can be used query params in rest architecture?
What is the difference get and post?
What is the difference between soap and rest?
Is it correct to update something during get request?
Is it possible to use body in get requests?
What are possible types of requests for http protocol?
Why method options is needed?
What is the difference between put and post?
What can be used as rest client?
How http protocol work?
What are the possible solutions in the case of big number of parameters for search method?
What should be the response in the case of DELETE request?
What is the best solution for representing Enum in API?
What is the best practice for getting Unique Resource From Sub-Collection?
How search in sub-collections can be implemented?
What is the best practice for nested resources?
Fine Grained CRUD Resources vs. Coarse Grained Resources?
Best guidelines?
Best practice for PATCH?
Do sessions violate REST?
When to use GraphQL?
What is ElasticSearch?
What are the possible ways of versioning?
Is it good practice to use Map<String, Object> in a model for a REST API?
SQL
What is having in sql?
What are the possible issues with indexes?
When using a composite index, under what conditions will the database use it for a query that filters only on a subset of the indexed columns?
How to verify that an index was used in a query?
Does it make sense to add an index on a column with a highly skewed distribution to selectively query the minority value?
Sql works very slowly, what are the possible improvements (the database is MySQL, for example)?
NoSQL vs SQL Databases
What are the main types of NoSQL databases, and when is each type most useful?
OLAP vs OLTP Databases
By which instruments of DB is ACID supported?
What is Multi-Version Concurrency Control (MVCC)?
What is the difference between keyset and offset pagination?
Test
What is the difference between integration and unit tests?
Unit test executes code from 2 classes, is it correct? Is it unit or integration test?
What can be used for unit tests?
What is better to use randomized or hardcode data for unit tests?
Is it possible to test the architecture of application?
Does TDD include integration tests?
Is it good practice to check in tests that non-state-changing methods were called?
The differences between Spy and Mock in Mockito?
Is it good practice to use in-memory db for tests?
Mockito: doReturn vs thenReturn?
How to mock third party service?
How would you assess the quality and effectiveness of unit tests in a Java codebase? Can you explain what mutation testing is and how tools like PIT can help?
Transactions
What is transaction?
What are the requirements for transactions?
What is a distributed transaction?
What are isolation levels?
What are the possible issues in the case of parallel access by transactions?
What are possible options for implementing transactions in microservices
What is the difference between optimistic and pessimistic locking, and which should you use when?
Is it possible to use transaction for select statements?
What locks are made in the case of using Repeatable Read isolation level?
RabbitMQ
What is RabbitMQ?
What are the advantages/disadvantages of using message brokers?
What is the Exchange in RabbitMQ?
GraalVM
What is GraalVM Native Image?
Where would be better to use AOT cache feature and where would be better to use GraalVM Native Image?
System Design
Design a Messenger
Kafka
What are delivery guarantees in Kafka?
What do in-sync replicas mean in Kafka, and what are the related configs?
What happens if a consumer doesn't process a message in time?
If the number of consumers is greater than the number of partitions, what will happen?
There is increasing Kafka lag, but the service works as expected. What are possible options to solve the issue?
Is it possible to change the number of partitions while downstream components are processing messages?
How to calculate the optimal number of partitions per Kafka topic?
Kubernetes
What are the possible types of deployment? Provide a short description for each type.
About
Java interview
Topics
concurrency
ddd
hibernate
interview
interview-questions
java
java-collections
java-core
java-interview
microservices
patterns
rabbitmq
rest
servlet
spring
spring-boot
transaction
Resources
Readme
MIT license
Code of conduct
Code of conduct
Activity
Stars
302
stars
Watchers
15
watching
Forks
65
forks
Report repository
Releases
Packages
Contributors
Languages
Back
|
FazBrowse Home
|
New Git URL