Cognizant Angular + Java Interview Questions for Not specified
Shared question set for Not specified of experience, Java Full Stack. Topics and wording follow the supplied notes; these are questions, not official company guidance.
- What is wildcard routing in Angular?
- What is the difference between lazy loading and eager loading?
- How does Angular routing work?
- What is polymorphism? Explain method overriding with code.
- What happens with Parent p = new Child() followed by a method call?
- Why is Child c = new Parent() invalid?
- What is the difference between Comparator and Comparable?
- What are the important Java 8 features?
- What is a functional interface? Is @FunctionalInterface mandatory for an interface that contains a single abstract method?
- Can a class have the static keyword?
- Explain association and aggregation.
- Write Java Stream programs to find missing numbers in a sequence.
- What is the use of CompletableFuture?
- Write a Java program to print odd and even numbers using two threads.
- Explain synchronized, wait(), notify() and notifyAll().
- What is the difference between Runnable and Callable?
- What is the difference between execute() and submit()?
- How does ExecutorService work?
- What is RejectedExecutionException, and how is it handled?
- What are race conditions, deadlocks, starvation and livelocks?
- How do you safely process tasks using a thread pool?
- How do you configure Kafka producers and consumers?
- How do you send multiple messages to a Kafka topic?
- Explain consumer groups, partitions, offsets and polling.
- What happens if a consumer polls messages, submits them to executor threads, and immediately polls again?
- How do you prevent committing offsets before successful processing?
- How do you handle retries, custom exceptions and Dead Letter Topics (DLT)?
- How do you handle duplicate messages and failed payment events?
- What is role-based access control and how does it work?
- What things exist in a JWT token?
- What is a circuit breaker, and why is it needed?
- How do you handle service failures, retries and timeouts?
- How do you prevent cascading failures?
- How do you maintain consistency across microservices?
- How do you troubleshoot slow APIs and production issues?
- What is the use of the Saga design pattern?