22 December 2020

#Gradle

#Gradle

Key Concepts


Topic Sub-Topics Basic Intermediate Advanced Expert
Introduction to Gradle What is Gradle, History of Gradle, Maven vs Gradle, Ant vs Gradle, Advantages
Gradle Build Lifecycle Tasks, Phases, Execution Model, Incremental Build, Task Dependencies
Gradle Wrapper What is Wrapper, Creating Wrapper, Using Wrapper, Advantages of Wrapper
Gradle Build Scripts build.gradle, settings.gradle, init.gradle, Script Blocks, Plugins
Gradle Plugins Core Plugins, Java Plugin, Application Plugin, War Plugin, Custom Plugins
Dependency Management Repositories (MavenCentral, JCenter, Ivy), Dependency Configurations, Exclusions
Gradle Tasks Defining Tasks, Default Tasks, Task Graph, Task Ordering, Custom Task Types
Multi-Project Builds Settings.gradle for Multi-Projects, Subprojects, Dependency Between Projects
Gradle DSL Groovy DSL, Kotlin DSL, Differences, When to Use
Custom Plugins Writing Custom Plugins, Applying Custom Plugins, Publishing Plugins
Gradle Performance Build Cache, Parallel Builds, Configuration On Demand, Daemon, Profiling
Gradle with Java Projects Java Plugin, SourceSets, Test Configuration, JAR Tasks, Application Plugin
Gradle with Web Projects War Plugin, Ear Plugin, Spring Boot Plugin, Web Dependency Management
Gradle and Testing JUnit/TestNG Integration, Test Logging, Test Filtering, Code Coverage (Jacoco)
Gradle and CI/CD Integration with Jenkins, GitHub Actions, GitLab CI, Docker, Kubernetes
Gradle Publishing Publishing to Maven Repository, Ivy Repository, Artifactory, Nexus
Gradle Advanced Scripting Custom DSL Extensions, Script Reuse, Convention Plugins, BuildSrc
Gradle API & Internals Gradle API Overview, Task API, Project API, Configuration API
Gradle Troubleshooting Debugging Builds, Logging, Stacktraces, Common Errors
Gradle Best Practices Build Optimization, Dependency Locking, Version Catalogs, Modularization

Interview question

1. Introduction to Gradle

  1. What is Gradle, and why is it used?
  2. How is Gradle different from Maven and Ant?
  3. Explain the advantages of Gradle over other build tools.
  4. What languages can be used for writing Gradle build scripts?
  5. What is the role of Groovy in Gradle?
  6. Can Gradle build scripts be written in Kotlin?
  7. What is the significance of build.gradle file?
  8. Explain the difference between build.gradle and settings.gradle.
  9. What is the init.gradle file used for?
  10. How do you execute a Gradle build?
  11. Explain the default tasks in Gradle.
  12. What is Gradle?s daemon, and why is it used?
  13. How does Gradle provide incremental builds?
  14. What are the limitations of Gradle?
  15. How does Gradle manage backward compatibility?
  16. What is a Gradle script block?
  17. What is Gradle?s execution model?
  18. How does Gradle support polyglot builds?
  19. What is the role of the Gradle Tooling API?
  20. Can Gradle be used without installing it manually?

2. Gradle Build Lifecycle

  1. What are the three main phases of the Gradle build lifecycle?
  2. Explain the initialization phase in Gradle.
  3. What happens during the configuration phase?
  4. What is executed in the execution phase?
  5. What are Gradle tasks?
  6. How can you list all available tasks in a Gradle project?
  7. What is a task dependency in Gradle?
  8. How do you define a custom task in Gradle?
  9. Explain the difference between dependsOn and mustRunAfter.
  10. How do you define default tasks in Gradle?
  11. What are up-to-date checks in Gradle?
  12. How do you skip tasks in Gradle?
  13. Explain task ordering in Gradle.
  14. What is the purpose of the finalizedBy keyword?
  15. How can you configure a task dynamically?
  16. What is the difference between task graph and task execution?
  17. How can you run multiple tasks in Gradle?
  18. What is the use of gradle.projectsEvaluated hook?
  19. How do you create incremental tasks in Gradle?
  20. What is task avoidance API in Gradle?

3. Gradle Wrapper

  1. What is the Gradle Wrapper?
  2. What are the advantages of using the Gradle Wrapper?
  3. How do you generate a Gradle Wrapper?
  4. What files are created when you run gradle wrapper?
  5. What is the role of gradlew and gradlew.bat files?
  6. How does the Gradle Wrapper download the required distribution?
  7. Can the Gradle Wrapper work offline?
  8. How do you upgrade Gradle using the Wrapper?
  9. What is the difference between gradle and ./gradlew?
  10. How do you ensure all team members use the same Gradle version?
  11. How does the Wrapper handle different Gradle versions?
  12. Where is the Gradle distribution downloaded?
  13. How can you verify the Gradle Wrapper version?
  14. Can you customize the Wrapper properties?
  15. What is the gradle-wrapper.jar file?
  16. What happens if the wrapper JAR is missing?
  17. How do you regenerate the wrapper JAR file?
  18. Can you define a custom Gradle distribution URL?
  19. Is it recommended to commit Gradle Wrapper files to VCS?
  20. What are common issues faced with Gradle Wrapper?

4. Dependency Management

  1. What is dependency management in Gradle?
  2. What are repositories in Gradle?
  3. Difference between mavenCentral(), jcenter(), and google()?
  4. How do you declare dependencies in Gradle?
  5. What are dependency configurations?
  6. Explain implementation, api, compileOnly, runtimeOnly.
  7. What is transitive dependency in Gradle?
  8. How do you exclude a transitive dependency?
  9. How do you define project dependencies in Gradle?
  10. What is dependency resolution strategy?
  11. How do you check all dependencies in a Gradle project?
  12. What is dependency conflict resolution in Gradle?
  13. How do you force a specific dependency version?
  14. What is the difference between dynamic and fixed versions?
  15. How does Gradle handle version ranges?
  16. What is dependency locking in Gradle?
  17. How can you manage external vs local dependencies?
  18. How do you configure custom repositories in Gradle?
  19. What is a flatDir repository in Gradle?
  20. How do you troubleshoot dependency resolution errors?

5. Gradle Plugins

  1. What are plugins in Gradle?
  2. Difference between core, community, and custom plugins?
  3. How do you apply a plugin in Gradle?
  4. What is the Java plugin in Gradle?
  5. What does the Application plugin do?
  6. Explain the War plugin in Gradle.
  7. What is the difference between apply plugin: and plugins {} block?
  8. How do you create a custom plugin in Gradle?
  9. What is the purpose of the buildSrc directory?
  10. How do you apply plugins across multiple projects?
  11. What is a convention plugin?
  12. What are script plugins?
  13. How do you publish a custom Gradle plugin?
  14. What is the gradlePlugin DSL?
  15. What is a binary plugin?
  16. Difference between id plugin syntax and legacy plugin application?
  17. How do you apply external plugins?
  18. How do you check which plugins are applied?
  19. What is the role of extensions in plugins?
  20. How do you debug plugin application issues?

6. Multi-Project Builds

  1. What is a multi-project build in Gradle?
  2. What is the role of settings.gradle in multi-project builds?
  3. How do you define subprojects in Gradle?
  4. How do you configure common settings across subprojects?
  5. What is the allprojects block?
  6. What is the subprojects block?
  7. Difference between project dependency and external dependency?
  8. How do you create project dependencies in multi-project builds?
  9. What is the difference between flat and hierarchical project structures?
  10. How do you run a task only for a specific subproject?
  11. How do you build all subprojects in Gradle?
  12. How do you exclude a subproject from the build?
  13. What is composite build in Gradle?
  14. Difference between multi-project and composite builds?
  15. How do you test individual subprojects?
  16. How do you share tasks between subprojects?
  17. What is the role of project() function?
  18. How do you reference another project?s task?
  19. What is project evaluation order in multi-project builds?
  20. How do you optimize large multi-project builds?

7. Gradle DSL (Groovy & Kotlin)

  1. What is Gradle DSL?
  2. Difference between Groovy DSL and Kotlin DSL?
  3. Which DSL should be preferred for new projects?
  4. How do you convert Groovy DSL to Kotlin DSL?
  5. What are closures in Groovy DSL?
  6. How do you define properties in Gradle DSL?
  7. What is the role of ext in Groovy DSL?
  8. How do you use val and var in Kotlin DSL?
  9. What is the difference between = and set methods in Kotlin DSL?
  10. How does IDE support differ between Groovy and Kotlin DSL?
  11. Can you mix Groovy and Kotlin DSL in the same project?
  12. How do you migrate from Groovy to Kotlin DSL?
  13. What is the syntax difference for applying plugins in both DSLs?
  14. How do you configure dependencies in Kotlin DSL?
  15. What is the .kts file extension used for?
  16. What are advantages of Kotlin DSL?
  17. What are disadvantages of Kotlin DSL?
  18. How do you debug DSL errors?
  19. Which DSL provides better type safety?
  20. Which DSL provides more flexibility?

8. Testing & CI/CD Integration

  1. How do you configure JUnit in Gradle?
  2. How do you configure TestNG in Gradle?
  3. What is the role of test task?
  4. How do you configure test logging?
  5. How do you filter specific tests in Gradle?
  6. How do you set system properties for tests?
  7. How do you configure parallel test execution?
  8. How do you generate code coverage reports?
  9. How do you integrate Jacoco with Gradle?
  10. What is the difference between check and test tasks?
  11. How do you configure test reports in Gradle?
  12. How do you fail a build if tests fail?
  13. How do you run specific test classes in Gradle?
  14. How do you integrate Gradle with Jenkins?
  15. How do you configure Gradle in GitHub Actions?
  16. How do you configure Gradle in GitLab CI/CD?
  17. How do you integrate Gradle with Docker builds?
  18. How do you configure Gradle with Kubernetes deployments?
  19. How do you automate publishing artifacts in CI/CD?
  20. How do you optimize Gradle builds in CI/CD environments?

9. Gradle Performance & Troubleshooting

  1. What is the Gradle build cache?
  2. How do you enable and configure the build cache?
  3. Difference between local and remote build cache?
  4. How do you enable parallel builds in Gradle?
  5. What is configuration on demand in Gradle?
  6. What is Gradle daemon?
  7. How do you enable and disable Gradle daemon?
  8. What are common performance tuning options in Gradle?
  9. How do you analyze build performance?
  10. How do you use --profile in Gradle?
  11. What is dependency resolution caching?
  12. How do you handle slow dependency resolution?
  13. How do you debug a Gradle build failure?
  14. How do you enable debug logs in Gradle?
  15. How do you troubleshoot OutOfMemory errors in Gradle?
  16. How do you handle circular dependencies in Gradle?
  17. What is dependency substitution?
  18. How do you fix version conflict issues?
  19. How do you verify task execution order?
  20. What are common Gradle troubleshooting strategies?

10. Best Practices & Advanced Features

  1. What are best practices for writing Gradle scripts?
  2. How do you modularize large Gradle projects?
  3. How do you reuse common build logic?
  4. What is convention over configuration in Gradle?
  5. How do you enforce dependency versions?
  6. What is a version catalog in Gradle?
  7. How do you implement version catalogs?
  8. What is dependency locking, and why use it?
  9. How do you enforce consistent dependency versions across projects?
  10. What are best practices for multi-project builds?
  11. How do you keep Gradle builds reproducible?
  12. What are common anti-patterns in Gradle builds?
  13. How do you implement security best practices in Gradle?
  14. How do you validate build scripts?
  15. How do you enforce code style checks in Gradle?
  16. How do you automate publishing with Gradle?
  17. How do you implement release automation with Gradle?
  18. How do you configure continuous builds in Gradle?
  19. How do you integrate static analysis tools with Gradle?
  20. What are the latest trends and improvements in Gradle?

Related Topics


#JFrog

#JFrog
Topic / SubTopic Basic Intermediate Advanced Expert
Introduction What is JFrog, Products overview, Benefits
Installation & Setup On-prem, Cloud, Docker, System requirements
Basic Artifact Operations Upload/download artifacts, REST API basics, UI navigation
Authentication & Authorization Users, Groups, Permissions, Roles
Repositories Local, Remote, Virtual, Repository Layouts, Best Practices
Package Management Maven, Gradle, npm, PyPI, Docker registries
Build Integration Jenkins, TeamCity, GitHub Actions, GitLab CI/CD
Security & Compliance Xray scans, Vulnerability detection, License compliance
CI/CD & Pipelines JFrog Pipelines, Artifact promotion, Distribution
Enterprise Setup High availability, Clustering, Disaster recovery, Multi-site replication
CLI Basics JFrog CLI commands, Installation, Configuration
Logging & Troubleshooting Basics UI logs, Error messages
Docker & Kubernetes JFrog as Docker registry, Helm charts integration
Metadata & Properties Artifact metadata, Custom properties
Repository Replication Push/Pull replication, Failover setup
Build Info & Metadata Collecting build info, Integration with CI/CD
Cross-Repo Operations Copy/Move artifacts, Multi-repo search
Custom Plugins Artifactory plugins, Automation extensions
Notifications & Webhooks Artifact events, CI/CD triggers
Community & Resources Documentation, Forums, Support

1. Introduction ? What is JFrog, Products overview, Benefits

  1. What is JFrog and why is it used?
  2. Name the main products under the JFrog ecosystem.
  3. Explain the benefits of using JFrog in DevOps pipelines.
  4. What is the difference between JFrog Artifactory and JFrog Xray?
  5. How does JFrog support CI/CD?
  6. Explain the concept of universal repository in JFrog.
  7. How does JFrog help in artifact versioning?
  8. What are the main advantages of using JFrog for binary management?
  9. How is JFrog used in cloud vs on-prem setups?
  10. What are the supported package types in JFrog Artifactory?
  11. Explain the concept of artifact promotion in JFrog.
  12. How does JFrog integrate with build tools like Maven or Gradle?
  13. What is JFrog Distribution?
  14. How does JFrog ensure reliability and scalability?
  15. Explain the role of JFrog Pipelines.
  16. What is JFrog Mission Control?
  17. How is JFrog different from traditional repository managers?
  18. Explain the JFrog ecosystem architecture at a high level.
  19. How does JFrog Xray enhance security and compliance?
  20. Name some industries or use cases where JFrog is widely used.

2. Installation & Setup ? On-prem, Cloud, Docker, System requirements

  1. How do you install JFrog Artifactory on-premise?
  2. What are the system requirements for JFrog installation?
  3. How to deploy JFrog Artifactory on Docker?
  4. Explain cloud deployment options for JFrog.
  5. What are the differences between OSS and Enterprise editions?
  6. How to configure JFrog repositories after installation?
  7. Explain initial setup steps for JFrog Pipelines.
  8. How to configure storage for JFrog Artifactory?
  9. What is the role of database in JFrog Artifactory setup?
  10. How to upgrade JFrog Artifactory to a newer version?
  11. How to configure reverse proxy for JFrog Artifactory?
  12. What are common installation pitfalls and solutions?
  13. How to configure JFrog for HA setup?
  14. Explain license configuration in JFrog.
  15. How to verify a successful installation of JFrog?
  16. How to configure network settings for Artifactory?
  17. How to backup JFrog configuration during installation?
  18. Explain Docker registry setup in JFrog.
  19. How to configure LDAP/SSO authentication at setup?
  20. How to test JFrog connectivity post-installation?

3. Repositories ? Local, Remote, Virtual, Repository Layouts, Best Practices

  1. What are the types of repositories in JFrog?
  2. Difference between local and remote repositories?
  3. What is a virtual repository?
  4. How do you organize repository layouts?
  5. Explain best practices for repository naming.
  6. How to configure permissions per repository?
  7. How to add a new repository in Artifactory?
  8. Explain repository replication.
  9. How to manage proxy for remote repositories?
  10. How to configure repository cleanup policies?
  11. What is repository caching?
  12. How to configure distributed repositories across sites?
  13. Explain repository mirroring.
  14. What is the maximum number of repositories supported?
  15. How to manage snapshot vs release repositories?
  16. How to configure repository indexing for search?
  17. How to monitor repository storage usage?
  18. Explain the use of generic repositories.
  19. How to handle repository migrations?
  20. Best practices for multi-team repository usage?

4. Package Management ? Maven, Gradle, npm, PyPI, Docker registries

  1. How does JFrog support Maven repositories?
  2. How to configure Gradle builds with JFrog?
  3. How to use npm registry in JFrog?
  4. Explain PyPI repository management in Artifactory.
  5. How to deploy Docker images to Artifactory?
  6. How to manage multiple package types in one repository?
  7. How to configure build info collection?
  8. How to use checksum-based storage?
  9. Explain integration with CI/CD tools for package deployment.
  10. How to manage version conflicts in repositories?
  11. How to configure Maven remote repositories?
  12. How to use virtual repositories for multi-package access?
  13. How to configure npm package scopes?
  14. How to handle Docker image promotion?
  15. Explain promotion of Python packages.
  16. How to secure packages with permissions?
  17. How to automate package uploads using JFrog CLI?
  18. Explain artifact metadata and properties.
  19. How to manage snapshots and releases for multiple package types?
  20. How to integrate JFrog with Helm charts and Kubernetes?

5. CI/CD & Pipelines ? JFrog Pipelines, Artifact promotion, Distribution

  1. What is JFrog Pipelines?
  2. How to create a simple pipeline?
  3. Explain stages and steps in a pipeline.
  4. How to integrate pipelines with Jenkins?
  5. How to trigger pipelines on Git commits?
  6. Explain artifact promotion in pipelines.
  7. How to deploy artifacts via pipelines?
  8. How to distribute artifacts across sites?
  9. How to manage secrets in pipelines?
  10. How to implement conditional steps?
  11. How to perform rollback in pipelines?
  12. How to monitor pipeline execution?
  13. How to integrate pipelines with Docker/K8s?
  14. Explain parallel execution in pipelines.
  15. How to test pipelines before production deployment?
  16. How to implement multi-team pipelines?
  17. How to log and debug pipelines?
  18. How to automate pipeline approval steps?
  19. How to use pipeline templates?
  20. How to optimize pipeline performance?

6. Security & Compliance ? Xray scans, Vulnerability detection, License compliance

  1. What is JFrog Xray?
  2. How does Xray integrate with Artifactory?
  3. How to scan artifacts for vulnerabilities?
  4. Explain license compliance checks.
  5. How to create security policies in Xray?
  6. How to configure watches for repositories?
  7. How to handle security alerts?
  8. How to integrate Xray with CI/CD?
  9. How to generate compliance reports?
  10. How to automate security scans in pipelines?
  11. How to manage CVE updates in Xray?
  12. How to define vulnerable artifact handling rules?
  13. How to perform binary analysis?
  14. How to configure REST API access for Xray?
  15. How to manage user access for Xray policies?
  16. How to integrate Xray with JFrog Mission Control?
  17. How to scan Docker images for vulnerabilities?
  18. How to set up global vs local policies?
  19. How to export security reports?
  20. How to track license violations?

7. Authentication & Authorization ? Users, Groups, Permissions, Roles

  1. How to create users in Artifactory?
  2. How to create groups and assign permissions?
  3. How to manage roles in JFrog?
  4. How to integrate LDAP authentication?
  5. How to enable SSO?
  6. How to configure API keys?
  7. How to manage permissions per repository?
  8. How to implement read/write access rules?
  9. How to audit user activity?
  10. How to restrict artifact downloads?
  11. How to use access tokens?
  12. How to manage external identity providers?
  13. How to handle temporary credentials?
  14. How to implement multi-team access policies?
  15. How to integrate JFrog with OAuth?
  16. How to enforce password policies?
  17. How to monitor login attempts?
  18. How to configure permission targets?
  19. How to segregate duties using roles?
  20. How to enforce fine-grained access control?

8. CLI & Automation ? JFrog CLI, REST API scripting, Terraform

  1. What is JFrog CLI?
  2. How to install and configure JFrog CLI?
  3. How to upload/download artifacts using CLI?
  4. How to perform batch operations?
  5. How to automate pipelines with CLI?
  6. How to integrate CLI with CI tools?
  7. How to use REST APIs for automation?
  8. How to perform artifact search via REST API?
  9. How to promote builds using CLI?
  10. How to automate cleanup of old artifacts?
  11. How to integrate CLI with Terraform?
  12. How to script artifact replication?
  13. How to automate metadata updates?
  14. How to retrieve build info programmatically?
  15. How to handle errors in automation scripts?
  16. How to integrate CLI with Docker operations?
  17. How to perform security scans via CLI?
  18. How to use CLI for multi-repo operations?
  19. How to generate audit logs via automation?
  20. How to schedule automation scripts for periodic tasks?

9. Logging & Troubleshooting ? UI logs, Error messages, Monitoring

  1. Where to find Artifactory logs?
  2. How to enable debug logging?
  3. How to troubleshoot failed artifact uploads?
  4. How to analyze pipeline failures?
  5. How to monitor repository storage?
  6. How to check replication logs?
  7. How to monitor CI/CD integration?
  8. How to debug permission issues?
  9. How to trace REST API failures?
  10. How to enable audit logging?
  11. How to collect logs for support?
  12. How to analyze network issues?
  13. How to monitor Xray scans?
  14. How to troubleshoot Docker registry problems?
  15. How to analyze performance bottlenecks?
  16. How to monitor high availability nodes?
  17. How to check license compliance logs?
  18. How to debug automation scripts?
  19. How to check build info logs?
  20. How to monitor security alerts?

10. Enterprise Setup & Scaling ? HA, Clustering, Multi-site Replication

  1. What is High Availability setup in JFrog?
  2. How to configure clustering in Artifactory?
  3. How to perform multi-site replication?
  4. How to scale JFrog for large teams?
  5. How to optimize storage performance?
  6. How to implement disaster recovery?
  7. How to monitor cluster health?
  8. How to replicate builds across sites?
  9. How to manage global repositories?
  10. How to optimize network for replication?
  11. How to perform rolling upgrades in HA setup?
  12. How to implement load balancing for JFrog?
  13. How to configure cross-site artifact distribution?
  14. How to handle failover scenarios?
  15. How to integrate multiple pipelines across clusters?
  16. How to optimize metadata indexing for large scale?
  17. How to secure multi-site replication?
  18. How to monitor performance metrics across clusters?
  19. How to scale JFrog pipelines for enterprise workloads?
  20. How to plan capacity and storage for enterprise deployments?

21 December 2020

#Log4j

#Log4j

Key Concepts


Topic SubTopic Basic ✅ Intermediate ✅ Advanced ✅ Expert ✅
Introduction What is Log4j, Features, Benefits, Logging levels
Installation & Setup Dependencies, Configuration files, Log4j2.xml, Classpath setup
Loggers Logger hierarchy, Root logger, Named logger, Logger levels
Appenders Console, File, RollingFile, Socket, SMTP, Custom Appenders
Layouts PatternLayout, HTMLLayout, JSONLayout, Custom layouts
Filters LevelRangeFilter, ThresholdFilter, Custom filters
Configuration XML, Properties, YAML, JSON configuration, Programmatic config
Asynchronous Logging AsyncAppender, Thread safety, Performance benefits
Logging Performance Buffering, Async logging, Garbage collection impact
Advanced Features Custom appenders, Custom filters, MDC/NDC, Lookups
Error Handling Handling exceptions in logging, Failover strategies
Integration Spring Boot, SLF4J, Logback bridge, Application frameworks
Monitoring & Maintenance Log rotation, Archiving, Log cleanup, Metrics
Security Masking sensitive data, Secure logging, Audit logs
Best Practices Structured logging, Correlation IDs, Logging guidelines

Interview question

1. Introduction ? What is Log4j, Features, Benefits, Logging levels

  1. What is Log4j?
  2. Explain the main features of Log4j.
  3. What are the benefits of using Log4j?
  4. List the logging levels in Log4j.
  5. What is the difference between DEBUG and INFO levels?
  6. What is the difference between WARN and ERROR levels?
  7. How does Log4j help in application debugging?
  8. Can you disable logging in production? How?
  9. What are common use cases for Log4j?
  10. How does Log4j differ from System.out.println logging?

2. Installation & Setup ? Dependencies, Configuration files, Classpath

  1. How do you install Log4j in a Java project?
  2. What are the required dependencies for Log4j2?
  3. What is the default configuration file name for Log4j2?
  4. How to configure Log4j using XML?
  5. How to configure Log4j using Properties file?
  6. How to configure Log4j using JSON or YAML?
  7. How to set the classpath for Log4j configuration?
  8. Can you programmatically configure Log4j? How?
  9. What are common configuration mistakes?
  10. How to verify that Log4j is initialized correctly?

3. Loggers ? Logger hierarchy, Root logger, Named logger, Logger levels

  1. What is a Logger in Log4j?
  2. Explain Logger hierarchy in Log4j.
  3. What is the root logger?
  4. How to create a named logger?
  5. How to set different levels for different loggers?
  6. What is additive behavior in loggers?
  7. How to prevent logger messages from propagating?
  8. Can loggers be defined programmatically?
  9. Difference between Logger and Root Logger?
  10. How to log messages to multiple loggers?

4. Appenders ? Console, File, RollingFile, Socket, SMTP, Custom

  1. What is an Appender in Log4j?
  2. How to configure ConsoleAppender?
  3. How to configure FileAppender?
  4. What is RollingFileAppender and why use it?
  5. How to configure SMTPAppender for email notifications?
  6. How to configure SocketAppender for remote logging?
  7. How to create a custom Appender?
  8. Difference between FileAppender and RollingFileAppender?
  9. How does AsyncAppender work?
  10. What are best practices for choosing appenders?

5. Layouts ? PatternLayout, HTMLLayout, JSONLayout, Custom layouts

  1. What is a Layout in Log4j?
  2. Explain PatternLayout and its placeholders.
  3. How to use HTMLLayout for logging?
  4. How to log in JSON format?
  5. How to create a custom layout?
  6. What is the default layout in Log4j?
  7. How to include timestamp and thread in log pattern?
  8. How to include MDC or NDC values in layout?
  9. Difference between HTMLLayout and PatternLayout?
  10. How to format logs for readability?

6. Filters ? LevelRangeFilter, ThresholdFilter, Custom filters

  1. What is a Filter in Log4j?
  2. How to use LevelRangeFilter?
  3. How to use ThresholdFilter?
  4. How to combine multiple filters?
  5. How to create a custom filter?
  6. Difference between Filter and Appender threshold?
  7. How to filter logs by logger name?
  8. How to filter logs by message content?
  9. Can filters be applied programmatically?
  10. Best practices for using filters?

7. Asynchronous Logging ? AsyncAppender, Thread safety, Performance

  1. What is AsyncAppender in Log4j?
  2. How does asynchronous logging improve performance?
  3. How to configure AsyncAppender?
  4. How to ensure thread safety with AsyncAppender?
  5. Difference between synchronous and asynchronous logging?
  6. How does Log4j handle high-volume logging?
  7. Can AsyncAppender work with multiple appenders?
  8. What is the internal queue in AsyncAppender?
  9. How to monitor dropped log events?
  10. Best practices for async logging?

8. Error Handling ? Handling exceptions in logging, Failover strategies

  1. How does Log4j handle errors during logging?
  2. What happens if a log file is not writable?
  3. How to configure failover appenders?
  4. How to prevent logging from crashing the application?
  5. How to handle exceptions inside custom appenders?
  6. Difference between FailoverAppender and BackupAppender?
  7. How to monitor logging errors?
  8. How to log errors without infinite loops?
  9. How to use ErrorHandler interface?
  10. Best practices for logging failures?

9. Integration ? Spring Boot, SLF4J, Logback bridge, Application frameworks

  1. How to integrate Log4j with Spring Boot?
  2. Difference between Log4j, SLF4J, and Logback?
  3. How to use Log4j through SLF4J?
  4. How to replace Logback with Log4j in Spring Boot?
  5. How to configure logging profiles in Spring Boot?
  6. How to log messages from third-party libraries?
  7. How to bridge java.util.logging to Log4j?
  8. How to integrate Log4j with web applications?
  9. How to log asynchronous processes in frameworks?
  10. How to use MDC/NDC in application frameworks?

10. Best Practices & Advanced Topics ? Structured logging, MDC, Security

  1. What is structured logging?
  2. How to use MDC (Mapped Diagnostic Context)?
  3. How to use NDC (Nested Diagnostic Context)?
  4. How to mask sensitive information in logs?
  5. How to implement correlation IDs for distributed tracing?
  6. Best practices for log file rotation and retention?
  7. How to monitor logs in production?
  8. How to analyze logs efficiently?
  9. How to secure log files?
  10. Advanced configuration tips for large-scale applications?

Related Topics


05 December 2020

#OpenShift

#Openshift

Key Concepts


Topic Sub-Topics Basic Intermediate Advanced Expert
OpenShift Basics Introduction, Features, Architecture, Components
Installation & Configuration Prerequisites, CLI Tools, Cluster Setup, Authentication
Pods & Deployments Pods, ReplicaSets, Deployments, DeploymentConfig
Services & Networking Services, Routes, Ingress, DNS, Load Balancing
Storage Management Persistent Volumes, PVC, Storage Classes, Dynamic Provisioning
Security & RBAC Authentication, Authorization, SCC, RBAC Policies
Build & Image Management BuildConfig, ImageStream, Source-to-Image (S2I), Dockerfiles
CI/CD Integration Jenkins Pipeline, GitOps, Webhooks, Tekton Pipelines
Operators & CRDs Operators, OperatorHub, Custom Resource Definitions
Logging & Monitoring Cluster Logging, Metrics, Prometheus, Grafana, Alerts
Scaling & Auto-healing HPA, VPA, Cluster Autoscaler, Self-healing
Multi-tenancy & Projects Namespaces, Quotas, Limits, Resource Management
Cluster Administration Node Management, Master/Worker Nodes, Certificates
Upgrades & Maintenance Patching, Version Upgrades, Backup/Restore, Disaster Recovery
Hybrid & Multi-cloud OpenShift on AWS, Azure, GCP, Hybrid Cloud, OpenShift Virtualization
Service Mesh & Networking Istio, Service Mesh, Sidecar, Traffic Management
Advanced Security OAuth, LDAP, NetworkPolicies, Compliance, Security Scanning
Performance & Optimization Resource Tuning, Node Affinity, Pod Scheduling, QoS
Troubleshooting & Debugging Pod Debugging, Node Issues, Network Issues, Logging Analysis
Real-world Use Cases Enterprise Deployments, Microservices, Event-driven Apps

Interview question

1. OpenShift Basics & Architecture

  1. What is OpenShift, and how does it differ from Kubernetes?
  2. Explain the core components of OpenShift architecture.
  3. What is the role of the Master Node in OpenShift?
  4. What is the role of the Worker Node in OpenShift?
  5. Explain the purpose of etcd in OpenShift.
  6. What is an OpenShift Project vs Namespace?
  7. What are the advantages of OpenShift over vanilla Kubernetes?
  8. Explain OpenShift API Server functionality.
  9. What is OpenShift CLI (oc), and how does it differ from kubectl?
  10. What are Templates in OpenShift?
  11. Explain the Source-to-Image (S2I) concept.
  12. How does OpenShift support multi-tenancy?
  13. What are the default roles in OpenShift?
  14. How does OpenShift support hybrid cloud environments?
  15. Explain OpenShift Routes.
  16. What is the difference between OpenShift Online, Dedicated, and Container Platform?
  17. What is the OperatorHub in OpenShift?
  18. Explain Service Catalog in OpenShift.
  19. What is OpenShift Virtualization?
  20. How does OpenShift integrate with DevOps practices?

2. Installation & Configuration

  1. What are the prerequisites for installing OpenShift?
  2. How do you install OpenShift on-premises?
  3. How do you install OpenShift on AWS, Azure, or GCP?
  4. What is the difference between IPI and UPI installation in OpenShift?
  5. How do you set up the OpenShift CLI (oc)?
  6. How do you verify OpenShift cluster installation?
  7. How do you configure authentication providers in OpenShift?
  8. Explain the bootstrap node in OpenShift installation.
  9. How do you configure networking during installation?
  10. What is the role of the installer-provisioned infrastructure (IPI)?
  11. How do you upgrade an OpenShift cluster?
  12. How do you perform a rolling upgrade of nodes?
  13. How do you back up etcd before upgrading OpenShift?
  14. Explain the role of kubeconfig in OpenShift.
  15. How do you add new worker nodes to an OpenShift cluster?
  16. How do you configure custom certificates in OpenShift?
  17. How do you enable FIPS mode in OpenShift?
  18. Explain single-node OpenShift use cases.
  19. How do you configure Ingress Controllers during installation?
  20. How do you integrate OpenShift with LDAP or Active Directory?

3. Pods, Deployments & Workloads

  1. What is a Pod in OpenShift?
  2. How do you create a Pod using CLI in OpenShift?
  3. Explain DeploymentConfig in OpenShift.
  4. What is the difference between Deployment and DeploymentConfig?
  5. What are ReplicaSets in OpenShift?
  6. How do you perform a rolling update in OpenShift?
  7. What are StatefulSets, and when do you use them?
  8. How do you restart a Pod in OpenShift?
  9. Explain the Pod lifecycle in OpenShift.
  10. What are DaemonSets in OpenShift?
  11. How do you debug a failed Pod?
  12. How do you check Pod logs in OpenShift?
  13. What is an Init container?
  14. How do you run Jobs and CronJobs in OpenShift?
  15. What is the difference between stateless and stateful workloads?
  16. How do you run batch jobs in OpenShift?
  17. Explain horizontal scaling of Pods in OpenShift.
  18. How do you configure Pod affinity and anti-affinity?
  19. What are labels and selectors in OpenShift Pods?
  20. How do you expose an application Pod to external traffic?

4. Services & Networking

  1. What are Services in OpenShift?
  2. What is the difference between ClusterIP, NodePort, and LoadBalancer?
  3. What is OpenShift Route, and how is it different from Ingress?
  4. How do you configure TLS termination on Routes?
  5. What is the default network plugin in OpenShift?
  6. Explain the OpenShift SDN.
  7. How do you troubleshoot networking issues in OpenShift?
  8. How do you connect Pods across multiple nodes?
  9. What is Multus CNI in OpenShift?
  10. How do you assign static IPs to Pods?
  11. What are NetworkPolicies in OpenShift?
  12. How do you secure inter-Pod communication?
  13. What is DNS resolution in OpenShift networking?
  14. How do you configure load balancing in OpenShift?
  15. What is Egress IP in OpenShift?
  16. How do you configure External IPs in OpenShift?
  17. How does OpenShift handle service discovery?
  18. What is MetalLB in OpenShift?
  19. What are service meshes in OpenShift networking?
  20. How does Istio integrate with OpenShift?

5. Storage & Persistent Data

  1. What are Persistent Volumes (PV) in OpenShift?
  2. What are Persistent Volume Claims (PVC)?
  3. How do you dynamically provision storage in OpenShift?
  4. What is a StorageClass in OpenShift?
  5. How do you mount a PVC to a Pod?
  6. What is ephemeral storage in OpenShift?
  7. How do you configure NFS storage in OpenShift?
  8. How do you configure Ceph or GlusterFS with OpenShift?
  9. What is OpenShift Container Storage (OCS)?
  10. How do you back up Persistent Volumes?
  11. How do you share storage between multiple Pods?
  12. What is ReadWriteMany (RWX) mode in PVCs?
  13. How do you expand PVC size?
  14. How do you reclaim Persistent Volumes?
  15. How do you migrate storage across clusters?
  16. What is dynamic volume provisioning?
  17. How do you use CSI drivers in OpenShift?
  18. What are ephemeral vs persistent volumes?
  19. How do you monitor storage utilization in OpenShift?
  20. How do you troubleshoot PVC binding issues?

6. Security & RBAC

  1. How does OpenShift manage authentication?
  2. What are Security Context Constraints (SCC) in OpenShift?
  3. How do you restrict container privileges in OpenShift?
  4. What is RBAC in OpenShift?
  5. How do you assign roles to users?
  6. What are the default roles in OpenShift?
  7. How do you create a custom role in OpenShift?
  8. What is OAuth in OpenShift?
  9. How do you integrate OpenShift with Keycloak?
  10. What is the difference between ClusterRole and Role?
  11. How do you apply NetworkPolicies for security?
  12. What are secrets in OpenShift?
  13. How do you mount secrets into Pods?
  14. How do you encrypt data at rest in OpenShift?
  15. How do you enable audit logging in OpenShift?
  16. What is SELinux in OpenShift security?
  17. How do you enforce image signing in OpenShift?
  18. What are compliance operators in OpenShift?
  19. How do you secure container images in OpenShift?
  20. What is PodSecurityPolicy (PSP) vs SCC in OpenShift?

7. CI/CD & DevOps Integration

  1. How does OpenShift support CI/CD?
  2. What is Source-to-Image (S2I) in OpenShift?
  3. How do you integrate Jenkins with OpenShift?
  4. What are OpenShift Pipelines (Tekton)?
  5. How do you trigger builds using webhooks in OpenShift?
  6. How do you configure GitOps in OpenShift?
  7. How does ArgoCD integrate with OpenShift?
  8. How do you implement Blue-Green deployments in OpenShift?
  9. How do you implement Canary deployments in OpenShift?
  10. How do you roll back failed deployments in OpenShift?
  11. How do you integrate SonarQube with OpenShift CI/CD?
  12. How do you build Docker images inside OpenShift?
  13. How do you automate testing with OpenShift Pipelines?
  14. How do you integrate Nexus or Artifactory with OpenShift?
  15. What are BuildConfigs in OpenShift?
  16. How do you use Jenkins agents in OpenShift?
  17. How do you schedule pipeline runs in OpenShift?
  18. How do you manage pipeline secrets securely?
  19. What are triggers in BuildConfig?
  20. How do you monitor CI/CD pipelines in OpenShift?

8. Operators & Custom Resources

  1. What is an Operator in OpenShift?
  2. What is the OperatorHub?
  3. How do you deploy an Operator in OpenShift?
  4. What are Custom Resource Definitions (CRDs)?
  5. How do you write a custom Operator?
  6. What is OLM (Operator Lifecycle Manager)?
  7. How do you upgrade Operators?
  8. How do you monitor Operator health?
  9. What is the difference between cluster-scoped and namespace-scoped Operators?
  10. How do Operators simplify application management?
  11. How do you manage Operator dependencies?
  12. How do you troubleshoot Operator failures?
  13. What are the advantages of Operators over Helm charts?
  14. What is Operator SDK?
  15. How do you secure Operators in OpenShift?
  16. What are day-2 operations in Operators?
  17. How do you configure CRDs in OpenShift?
  18. What are built-in OpenShift Operators?
  19. How do you rollback Operator versions?
  20. How do you use Operators for monitoring and logging?

9. Logging, Monitoring & Troubleshooting

  1. What are the logging options in OpenShift?
  2. How do you configure EFK stack (Elasticsearch, Fluentd, Kibana) in OpenShift?
  3. How do you configure Prometheus in OpenShift?
  4. How do you configure Grafana in OpenShift?
  5. How do you monitor cluster health?
  6. What are metrics exposed by OpenShift?
  7. How do you collect application logs in OpenShift?
  8. How do you troubleshoot Pod crashes?
  9. How do you troubleshoot failed Deployments?
  10. How do you debug networking issues?
  11. What is oc describe command used for?
  12. How do you trace resource usage of a Pod?
  13. How do you enable audit logging in OpenShift?
  14. What is cluster logging operator?
  15. How do you set up alerts in OpenShift?
  16. How do you troubleshoot failed Builds in OpenShift?
  17. How do you analyze etcd performance issues?
  18. How do you monitor control plane nodes?
  19. How do you troubleshoot Route errors?
  20. How do you diagnose API server performance issues?

10. Scaling, Performance & Best Practices

  1. How do you scale Pods in OpenShift?
  2. What is Horizontal Pod Autoscaler (HPA)?
  3. What is Vertical Pod Autoscaler (VPA)?
  4. What is Cluster Autoscaler in OpenShift?
  5. How do you configure resource requests and limits?
  6. What is Quality of Service (QoS) in OpenShift?
  7. How do you implement Pod affinity rules for performance?
  8. How do you optimize container images for OpenShift?
  9. How do you monitor resource utilization in OpenShift?
  10. How do you tune etcd performance?
  11. What is the best practice for managing namespaces?
  12. How do you configure node selectors in OpenShift?
  13. How do you configure taints and tolerations in OpenShift?
  14. What is pod disruption budget in OpenShift?
  15. How do you optimize scheduling policies?
  16. How do you design OpenShift for high availability?
  17. How do you optimize networking performance?
  18. How do you manage large-scale OpenShift clusters?
  19. What are some best practices for OpenShift upgrades?
  20. What are enterprise-level best practices for OpenShift adoption?


Related Topics


12 November 2020

#My-SQL

#My_SQL
Level Topic Subtopics
Basic Introduction to MySQL Overview, Features, Installation, MySQL Workbench, Basic Commands
Database Basics Databases, Tables, Primary Keys, Foreign Keys, Constraints
Data Types Numeric, String, Date & Time, JSON, ENUM & SET
SQL Queries SELECT, INSERT, UPDATE, DELETE, Filtering with WHERE
Joins INNER JOIN, LEFT JOIN, RIGHT JOIN
Intermediate Indexing Clustered, Non-clustered, Composite, Unique, Covering Index
Transactions COMMIT, ROLLBACK, SAVEPOINT, Isolation Levels, ACID Properties
Stored Procedures & Functions Creating Procedures, Parameters, Functions, Recursive Functions, Cursors
Triggers BEFORE Trigger, AFTER Trigger, Row-level Trigger, Statement-level Trigger, Use Cases
Views Creating Views, Updating Views, Indexed Views, Security with Views, Performance Impact
Advanced Query Optimization EXPLAIN, Query Execution Plan, Index Hints, Optimizer Hints, Caching
Replication Master-Slave, Master-Master, GTID Replication, Semi-synchronous Replication, Conflict Handling
Partitioning Range, List, Hash, Key, Subpartitioning
Security User Management, Roles, Privileges, Authentication, SSL/TLS
Backup & Recovery mysqldump, Enterprise Backup, Point-in-Time Recovery, Binary Logs, Restore Strategies
Expert High Availability Clustering, NDB Cluster, Group Replication, InnoDB Cluster, Failover
Scaling Vertical Scaling, Horizontal Scaling, Sharding, ProxySQL, Load Balancing
MySQL with Applications JDBC, PHP, Python (PyMySQL), Node.js (mysql2), ORM Integration
JSON & NoSQL Features JSON Functions, Virtual Columns, Generated Columns, Document Store, X DevAPI
Latest Features Window Functions, CTEs, GIS, Performance Schema, MySQL 8 Enhancements

Introduction & Basics

  1. What is MySQL and how is it different from other RDBMS?
  2. Explain the advantages of using MySQL.
  3. How do you install MySQL on Linux/Windows?
  4. What is the default port number for MySQL?
  5. Explain the difference between MySQL Community and Enterprise editions.
  6. How do you check the version of MySQL installed?
  7. What are MySQL storage engines?
  8. Difference between MyISAM and InnoDB?
  9. Explain ACID properties in MySQL.
  10. What are constraints in MySQL?
  11. How do you create a database in MySQL?
  12. How do you create a table with a primary key?
  13. What is a composite key in MySQL?
  14. How do you describe the structure of a table?
  15. What are the common MySQL data types?
  16. Difference between CHAR and VARCHAR?
  17. Explain ENUM and SET data types in MySQL.
  18. What is AUTO_INCREMENT in MySQL?
  19. How do you drop a database in MySQL?
  20. How do you backup and restore a database in MySQL?

SQL Queries

  1. Explain the SELECT statement with an example.
  2. What is the difference between WHERE and HAVING clauses?
  3. Explain the GROUP BY clause with an example.
  4. What is the difference between DISTINCT and GROUP BY?
  5. How do you use LIMIT in a query?
  6. How do you perform sorting in MySQL?
  7. Explain the LIKE operator with examples.
  8. What are wildcard characters in MySQL?
  9. How do you insert multiple rows into a table?
  10. Explain the difference between UNION and UNION ALL.
  11. What is a subquery in MySQL?
  12. Explain correlated subquery with an example.
  13. What are derived tables in MySQL?
  14. How do you update rows in a table?
  15. How do you delete rows in a table?
  16. Explain the REPLACE INTO command.
  17. What is the difference between IS NULL and IS NOT NULL?
  18. Explain the BETWEEN operator in MySQL.
  19. What is the difference between ANY and ALL operators?
  20. Explain EXISTS operator with an example.

Joins

  1. What is a JOIN in MySQL?
  2. Explain INNER JOIN with an example.
  3. Explain LEFT JOIN with an example.
  4. Explain RIGHT JOIN with an example.
  5. Does MySQL support FULL OUTER JOIN? If not, how to simulate it?
  6. Explain CROSS JOIN with an example.
  7. What is a SELF JOIN? Provide an example.
  8. What is the difference between INNER JOIN and OUTER JOIN?
  9. When would you use a NATURAL JOIN?
  10. What is an equi join?
  11. What is a non-equi join?
  12. How can you join more than two tables in MySQL?
  13. Explain performance considerations with joins.
  14. Difference between JOIN and SUBQUERY?
  15. When should you prefer JOINs over subqueries?
  16. Explain STRAIGHT_JOIN in MySQL.
  17. Can you perform joins on different databases?
  18. What is a USING clause in JOIN?
  19. How do you handle NULL values in joins?
  20. Explain join optimizations in MySQL.

Indexes

  1. What is an index in MySQL?
  2. What are the types of indexes in MySQL?
  3. Difference between primary key and unique index?
  4. What is a clustered index?
  5. What is a non-clustered index?
  6. What is a composite index?
  7. Explain the difference between HASH and BTREE indexes.
  8. How do indexes improve query performance?
  9. Can indexes slow down performance? Why?
  10. How do you create an index on a column?
  11. How do you drop an index?
  12. What is a covering index?
  13. How do you find unused indexes?
  14. Explain functional indexes in MySQL 8.
  15. What are full-text indexes?
  16. How do you perform a full-text search in MySQL?
  17. What are spatial indexes?
  18. How do you optimize index usage?
  19. Explain the difference between unique and non-unique indexes.
  20. What is index selectivity? Why is it important?

Transactions

  1. What is a transaction in MySQL?
  2. Explain COMMIT and ROLLBACK.
  3. What is a SAVEPOINT?
  4. Explain the concept of isolation levels.
  5. List the four isolation levels in MySQL.
  6. Explain READ UNCOMMITTED with an example.
  7. Explain READ COMMITTED with an example.
  8. Explain REPEATABLE READ with an example.
  9. Explain SERIALIZABLE with an example.
  10. What is a dirty read?
  11. What is a non-repeatable read?
  12. What is a phantom read?
  13. How do you start and end a transaction in MySQL?
  14. How do you set isolation levels for a session?
  15. What is autocommit in MySQL?
  16. How do you disable autocommit?
  17. Explain ACID properties in transactions.
  18. How are transactions handled in InnoDB?
  19. Can MyISAM support transactions? Why not?
  20. Explain deadlocks in MySQL transactions.

Stored Procedures & Functions

  1. What is a stored procedure in MySQL?
  2. How do you create a stored procedure?
  3. What are the advantages of using stored procedures?
  4. How do you call a stored procedure in MySQL?
  5. How do you pass parameters to stored procedures?
  6. Difference between IN, OUT, and INOUT parameters?
  7. How do you create a user-defined function in MySQL?
  8. Difference between stored procedure and function?
  9. Can functions return tables in MySQL?
  10. How do you drop a stored procedure?
  11. Can stored procedures call other procedures?
  12. How do you handle errors in stored procedures?
  13. What are deterministic functions?
  14. Difference between deterministic and non-deterministic functions?
  15. How do you debug stored procedures in MySQL?
  16. Can stored procedures be recursive?
  17. How do you use cursors in stored procedures?
  18. What are the limitations of stored procedures in MySQL?
  19. How do stored procedures affect performance?
  20. Explain practical use cases of stored procedures.

Views

  1. What is a view in MySQL?
  2. How do you create a view?
  3. Difference between simple and complex views?
  4. Can you update data through a view?
  5. How do you drop a view?
  6. What are updatable views?
  7. Difference between materialized view and normal view?
  8. Does MySQL support materialized views?
  9. How do you restrict access using views?
  10. Can views improve security?
  11. Can views improve performance?
  12. How do you use views in joins?
  13. Can views be nested?
  14. What are limitations of views in MySQL?
  15. Can you use indexes on views?
  16. How do you rename a view?
  17. How do you list all views in a database?
  18. Explain WITH CHECK OPTION in views.
  19. How do you refresh a view?
  20. Give real-time use cases of views in MySQL.

Query Optimization

  1. What is query optimization in MySQL?
  2. How do you analyze queries in MySQL?
  3. What is EXPLAIN in MySQL?
  4. How do you use query execution plans?
  5. What is the difference between EXPLAIN and EXPLAIN ANALYZE?
  6. What are optimizer hints?
  7. How do you identify slow queries?
  8. What is the slow query log?
  9. How do indexes help in optimization?
  10. How do you optimize joins?
  11. What is query caching?
  12. How do you optimize subqueries?
  13. Difference between EXISTS and IN for optimization?
  14. How do you rewrite queries for performance?
  15. How does partitioning improve performance?
  16. How do you handle large datasets efficiently?
  17. What are common performance bottlenecks?
  18. How do you tune buffer pool size in MySQL?
  19. Explain query profiling in MySQL.
  20. Best practices for writing optimized SQL queries?

Security

  1. What are users and roles in MySQL?
  2. How do you create a new user?
  3. How do you grant privileges in MySQL?
  4. Explain REVOKE command in MySQL.
  5. What are global vs database-level privileges?
  6. How do you secure passwords in MySQL?
  7. Difference between authentication plugins?
  8. What is SSL/TLS in MySQL?
  9. How do you enable SSL in MySQL?
  10. How do you audit user activity?
  11. What are security risks in MySQL?
  12. How do you implement least privilege principle?
  13. Explain role-based security in MySQL.
  14. How do you prevent SQL injection?
  15. What is secure_file_priv in MySQL?
  16. How do you lock down MySQL server for production?
  17. What are best practices for user management?
  18. How do you encrypt data in MySQL?
  19. What is Transparent Data Encryption (TDE)?
  20. How do you secure backups in MySQL?

Replication & Scaling

  1. What is replication in MySQL?
  2. Difference between master-slave and master-master replication?
  3. What is GTID replication?
  4. What is semi-synchronous replication?
  5. How do you set up replication in MySQL?
  6. How do you monitor replication?
  7. What are replication lag issues?
  8. How do you resolve replication conflicts?
  9. What is read/write splitting?
  10. What is MySQL NDB Cluster?
  11. How does Group Replication work?
  12. Explain InnoDB Cluster architecture.
  13. What is sharding in MySQL?
  14. Difference between vertical and horizontal scaling?
  15. What is ProxySQL and how is it used?
  16. How do you load balance MySQL?
  17. What are challenges with scaling MySQL?
  18. Explain partitioning as a scaling method.
  19. What are cloud-based scaling solutions?
  20. Future trends in MySQL scaling?

#Postgresql

#PostgreSql
Level Topic Subtopics
Basic Installation & Setup Download, initdb, configuration, pg_ctl, pgAdmin
Architecture Overview Processes (postmaster, bgwriter, wal writer), memory, WAL, storage engine
Data Types Numeric, Text, Boolean, Date/Time, UUID, Arrays
Schema & Tables CREATE, ALTER, DROP, constraints, tablespaces
Basic Queries SELECT, INSERT, UPDATE, DELETE
Constraints PRIMARY KEY, FOREIGN KEY, UNIQUE, CHECK
psql Client Meta commands (\d, \i, \dt), scripting
Import/Export COPY, pg_dump, pg_restore, \copy
Basic Functions String, Math, Aggregate, Conversion
Transactions BEGIN, COMMIT, ROLLBACK, savepoints
Intermediate Joins & Subqueries INNER, LEFT, RIGHT, FULL, Nested queries, CTEs
Indexing B-Tree, Hash, GIN, GiST, covering indexes
Views Simple Views, Materialized Views, refresh strategies
Triggers & Rules BEFORE/AFTER triggers, INSTEAD OF triggers, Rules
Functions & PL/pgSQL SQL functions, PL/pgSQL basics, error handling
Window Functions RANK, ROW_NUMBER, PARTITION BY, LEAD, LAG
Sequences & Identity SERIAL, BIGSERIAL, GENERATED ALWAYS, currval(), nextval()
JSON & JSONB Storage, operators, indexing (GIN), functions
Error Handling EXCEPTION blocks, raise notice/error/warning
Data Modeling Normalization, relationships, schema design
Advanced Query Optimization EXPLAIN, ANALYZE, query planner
Partitioning Range, List, Hash, default partitions
Table Inheritance Parent-child tables, constraints, performance
Locks & Concurrency Row locks, Deadlocks, MVCC
Vacuum & Analyze Autovacuum, statistics, bloat removal
Extensions PostGIS, pg_stat_statements, hstore, uuid-ossp
Full Text Search tsvector, tsquery, dictionaries, ranking
Parallel Query Parallel scan, joins, aggregate
Advanced Security Row-Level Security (RLS), Policies, GRANT/REVOKE
Large Objects BYTEA, TOAST, pg_largeobject API
Expert High Availability Streaming replication, Logical replication, failover
Backup & Recovery pg_dump, PITR, WAL archiving, pgBackRest, Barman
Sharding & Scaling Citus, FDWs, partitioned scaling
Advanced Indexing BRIN, Bloom, Expression indexes, Partial indexes
Monitoring & Tuning pg_stat_statements, logs, auto_explain, tuning params
System Catalogs pg_class, pg_attribute, pg_index, pg_roles
Advanced PL/pgSQL Packages, dynamic SQL, performance best practices
Cross-DB Integration dblink, postgres_fdw, foreign data wrappers
Migration Tools pg_upgrade, logical replication for migration, data migration strategies
Enterprise Deployment Kubernetes, cloud deployment, scaling strategies

1. Basics of PostgreSQL

  1. What is PostgreSQL and how does it differ from other RDBMS?
  2. Explain PostgreSQL?s architecture.
  3. What are the advantages of PostgreSQL over MySQL?
  4. How do you install PostgreSQL on Linux/Windows?
  5. What is the role of postmaster in PostgreSQL?
  6. Explain the significance of WAL (Write-Ahead Logging).
  7. What is the difference between a database, schema, and table in PostgreSQL?
  8. How do you list all databases in PostgreSQL?
  9. What are system catalogs in PostgreSQL?
  10. How does PostgreSQL handle multi-version concurrency control (MVCC)?
  11. What are tablespaces in PostgreSQL?
  12. How do you connect to PostgreSQL using psql?
  13. What is the default port for PostgreSQL and can it be changed?
  14. Explain the role of postgres superuser.
  15. How do you create and drop a database?
  16. What is the difference between CHAR, VARCHAR, and TEXT in PostgreSQL?
  17. How does PostgreSQL handle NULL values?
  18. What are arrays in PostgreSQL?
  19. Explain PostgreSQL?s support for JSON and JSONB.
  20. How do you enable extensions in PostgreSQL?

2. SQL Queries

  1. How do you write a basic SELECT query in PostgreSQL?
  2. How do you filter rows using WHERE?
  3. What is the difference between DISTINCT and GROUP BY?
  4. How do you implement pagination in PostgreSQL queries?
  5. What are aggregate functions? Give examples.
  6. How do you use CASE statements in queries?
  7. What is the difference between LIMIT and FETCH FIRST?
  8. How do you update multiple rows in PostgreSQL?
  9. How do you delete rows conditionally?
  10. How do you insert multiple rows in one query?
  11. How do you perform pattern matching in PostgreSQL?
  12. What is the difference between ILIKE and LIKE?
  13. How do you handle NULL-safe comparisons?
  14. How do you use COALESCE?
  15. Explain the difference between EXISTS and IN.
  16. How do you create computed columns?
  17. How do you write recursive queries in PostgreSQL?
  18. What are Common Table Expressions (CTEs)?
  19. How do you combine results from multiple SELECT queries?
  20. What is the difference between UNION and UNION ALL?

3. Joins & Subqueries

  1. Explain INNER JOIN with an example.
  2. Explain LEFT JOIN with an example.
  3. Explain RIGHT JOIN with an example.
  4. Explain FULL OUTER JOIN with an example.
  5. What is a CROSS JOIN?
  6. What is the difference between JOIN and UNION?
  7. What are self-joins in PostgreSQL?
  8. How do correlated subqueries work?
  9. What is the difference between EXISTS and IN in subqueries?
  10. How do you optimize subqueries?
  11. What is a lateral join?
  12. Explain the difference between scalar subquery and table subquery.
  13. How do you handle NULLs in joins?
  14. How can you simulate FULL OUTER JOIN if it?s not available?
  15. What is the difference between NATURAL JOIN and INNER JOIN?
  16. How do you write multi-table joins?
  17. How do you use CTEs instead of subqueries?
  18. What is the performance impact of subqueries vs joins?
  19. How do you debug slow joins?
  20. Explain the difference between correlated and non-correlated subqueries.

4. Indexing & Performance

  1. What are indexes in PostgreSQL?
  2. What types of indexes are available in PostgreSQL?
  3. Explain B-Tree index with example.
  4. When should you use Hash indexes?
  5. What is a GIN index?
  6. What is a GiST index?
  7. What is a BRIN index?
  8. Explain partial indexes.
  9. What are covering indexes?
  10. How do indexes affect performance?
  11. How do you check if a query is using an index?
  12. How do you create composite indexes?
  13. What is the impact of too many indexes?
  14. Explain index-only scans.
  15. What is index bloat?
  16. How do you rebuild or reindex tables?
  17. How do you drop an index?
  18. What are unique indexes?
  19. How do you choose the right index for a query?
  20. How do you analyze query performance using EXPLAIN?

5. Transactions & Concurrency Control

  1. What is a transaction in PostgreSQL?
  2. What commands are used to manage transactions?
  3. What is ACID in the context of PostgreSQL?
  4. What is MVCC in PostgreSQL?
  5. Explain isolation levels in PostgreSQL.
  6. What is the default isolation level?
  7. What is a deadlock?
  8. How do you detect and resolve deadlocks?
  9. What are savepoints?
  10. How do you rollback to a savepoint?
  11. What is the difference between COMMIT and ROLLBACK?
  12. What is a two-phase commit?
  13. How does PostgreSQL implement concurrency control?
  14. What are advisory locks?
  15. What is row-level locking?
  16. What is the difference between optimistic and pessimistic locking?
  17. How do you test concurrency issues?
  18. What is the difference between SERIALIZABLE and REPEATABLE READ?
  19. How do you monitor transaction conflicts?
  20. How does autovacuum affect transactions?

6. Stored Procedures & Functions

  1. What are functions in PostgreSQL?
  2. What languages can be used for writing functions?
  3. How do you create a SQL function?
  4. How do you create a PL/pgSQL function?
  5. What is the difference between functions and procedures?
  6. How do you pass parameters to functions?
  7. How do you return multiple values from a function?
  8. How do you handle exceptions in PL/pgSQL?
  9. What is the difference between VOLATILE, STABLE, and IMMUTABLE functions?
  10. How do you call a function in a query?
  11. How do you drop a function?
  12. How do you overload functions in PostgreSQL?
  13. What are set-returning functions?
  14. How do you debug PL/pgSQL functions?
  15. How do you secure functions?
  16. What are triggers in PostgreSQL?
  17. How do you write trigger functions?
  18. How do you associate triggers with tables?
  19. What is the difference between BEFORE and AFTER triggers?
  20. How do you disable or drop triggers?

7. Views & Triggers

  1. What are views in PostgreSQL?
  2. How do you create a view?
  3. What are materialized views?
  4. How do you refresh a materialized view?
  5. What are the benefits of using views?
  6. What are the limitations of views?
  7. How do you update data through views?
  8. What are INSTEAD OF triggers?
  9. How do you secure views?
  10. How do you drop a view?
  11. What are triggers in PostgreSQL?
  12. How do you create a trigger?
  13. What are row-level and statement-level triggers?
  14. What are BEFORE and AFTER triggers?
  15. How do you disable triggers?
  16. How do you test triggers?
  17. How do you use conditional triggers?
  18. What are recursive triggers?
  19. What is the impact of triggers on performance?
  20. How do you monitor trigger execution?

8. Query Optimization & Execution Plans

  1. How do you analyze queries in PostgreSQL?
  2. What is the EXPLAIN command?
  3. What does ANALYZE add to EXPLAIN?
  4. What is the difference between sequential scan and index scan?
  5. What is a bitmap index scan?
  6. What is a nested loop join?
  7. What is a hash join?
  8. What is a merge join?
  9. How do you optimize slow queries?
  10. What are query planner statistics?
  11. How do you update planner statistics?
  12. What is the role of autovacuum in query optimization?
  13. How do you optimize ORDER BY queries?
  14. How do you optimize GROUP BY queries?
  15. What is query caching in PostgreSQL?
  16. How do you use pg_stat_statements?
  17. How do you rewrite queries for better performance?
  18. What is a CTE optimization fence?
  19. How do you detect performance regressions?
  20. What is parallel query execution in PostgreSQL?

9. Security & User Management

  1. How do you create a new user in PostgreSQL?
  2. What is the difference between USER and ROLE?
  3. How do you assign privileges to a user?
  4. What is the purpose of pg_hba.conf?
  5. How do you configure authentication methods?
  6. What is SCRAM authentication?
  7. How do you revoke privileges?
  8. What is Row-Level Security (RLS)?
  9. How do you enable RLS?
  10. How do you create and use policies?
  11. What is the difference between GRANT and REVOKE?
  12. How do you secure passwords in PostgreSQL?
  13. What is the default authentication method?
  14. How do you check user roles and privileges?
  15. What is the difference between superuser and regular user?
  16. How do you prevent SQL injection in PostgreSQL?
  17. How do you audit user activities?
  18. What is SSL/TLS in PostgreSQL?
  19. How do you enforce encryption in PostgreSQL?
  20. How do you handle privilege escalation?

10. Replication, Backup & Scaling

  1. What is replication in PostgreSQL?
  2. What is streaming replication?
  3. What is logical replication?
  4. What is the difference between physical and logical replication?
  5. How do you set up streaming replication?
  6. What is WAL archiving?
  7. How do you configure WAL archiving?
  8. What is a replication slot?
  9. How do you monitor replication lag?
  10. How do you perform failover?
  11. What is the difference between hot standby and warm standby?
  12. What is PITR (Point-in-Time Recovery)?
  13. How do you perform PITR?
  14. What tools are used for backup and restore in PostgreSQL?
  15. How do you use pg_dump and pg_restore?
  16. What is base backup?
  17. How do you scale PostgreSQL horizontally?
  18. What is sharding in PostgreSQL?
  19. What is Citus and how does it help in scaling?
  20. How do you deploy PostgreSQL in a cloud environment?

11 November 2020

#CoreJava_08

#CoreJava_08

Key Concepts


Topic Sub-Topics Basic Intermediate Advanced Expert
Lambda Expressions Syntax, Scope, Variable capture, Method references, Constructor references ✔️ ✔️ ✔️ ✔️
Functional Interfaces Predicate, Consumer, Supplier, Function, BiFunction, UnaryOperator, BinaryOperator, Custom FI ✔️ ✔️ ✔️ ✔️
Stream API - Basics Creating streams, map(), filter(), forEach(), count(), collect() ✔️ ✔️
Stream API - Intermediate distinct(), sorted(), limit(), skip(), peek(), Optional + Streams ✔️ ✔️
Stream API - Advanced reduce(), flatMap(), groupingBy(), partitioningBy(), joining(), summarizing, parallelStream() ✔️ ✔️ ✔️
Stream API - Expert Custom collectors, Stream performance tuning, Spliterator, Lazy evaluation, Infinite streams ✔️ ✔️
Optional Class of(), ofNullable(), empty(), isPresent(), ifPresent(), orElse(), orElseGet(), orElseThrow() ✔️ ✔️
Date and Time API (java.time) LocalDate, LocalTime, LocalDateTime, Instant, ZoneId, OffsetDateTime, Period, Duration ✔️ ✔️ ✔️
Date and Time Formatting DateTimeFormatter, Custom patterns, Parsing, Timezone conversions ✔️ ✔️
Default & Static Methods in Interfaces Default methods, Static methods, Diamond problem, Multiple inheritance resolution ✔️ ✔️ ✔️ ✔️
CompletableFuture & Concurrency supplyAsync(), runAsync(), thenApply(), thenAccept(), thenCombine(), allOf(), anyOf() ✔️ ✔️ ✔️
Asynchronous Programming Exception handling in CompletableFuture, Non-blocking computations, Chaining futures ✔️ ✔️
Nashorn JavaScript Engine Script execution, Bind Java Objects, Invoke Java methods, External JS files, Performance ✔️ ✔️
Collections Enhancements forEach(), removeIf(), replaceAll(), computeIfAbsent(), computeIfPresent(), merge() ✔️ ✔️ ✔️
Map API Improvements getOrDefault(), putIfAbsent(), replaceAll(), compute(), replace(), new traversal APIs ✔️ ✔️ ✔️
StringJoiner & Collectors joining(), delimiters, prefix & suffix, Collectors.toList(), toSet(), toMap() ✔️ ✔️ ✔️
Base64 Encoding/Decoding Basic, URL, MIME encoding & decoding ✔️ ✔️
Arrays Enhancements parallelSort(), setAll(), parallelPrefix(), Arrays.stream() ✔️ ✔️ ✔️
Annotations (Java 8) @FunctionalInterface, @Repeatable, Type Annotations, @Target, @Retention ✔️ ✔️ ✔️
Method References Reference to static methods, instance methods, constructors ✔️ ✔️ ✔️
Parallel Programming Parallel streams, ForkJoinPool, Performance considerations ✔️ ✔️ ✔️
Spliterator API tryAdvance(), forEachRemaining(), characteristics(), estimateSize(), parallel iteration ✔️ ✔️
Security & Java 8 SecureRandom with streams, Optional null-safety, Immutable Date-Time API ✔️ ✔️ ✔️ ✔️
Miscellaneous Utilities Objects.requireNonNullElse(), Files.lines(), Instant.now(), Comparator.comparing() ✔️ ✔️ ✔️ ✔️
Performance Tuning Streams vs loops, Parallel stream overhead, Memory considerations ✔️ ✔️
Testing with Java 8 Testing Lambdas, Streams, and CompletableFuture, Mocking functional interfaces ✔️ ✔️ ✔️

Interview question


1. Lambda Expressions (25 Questions)

  1. What is a lambda expression in Java 8?
  2. Why were lambda expressions introduced in Java?
  3. Explain the syntax of a lambda expression with an example.
  4. How does a lambda expression differ from an anonymous class?
  5. Can lambda expressions access local variables from the enclosing scope?
  6. What is variable capture in lambdas?
  7. What are the restrictions on accessing variables inside lambdas?
  8. How does this behave inside a lambda expression?
  9. Can lambdas be recursive? How?
  10. How do you use lambdas with functional interfaces?
  11. What is the target type of a lambda expression?
  12. Can you overload methods with lambda parameters?
  13. How does type inference work in lambda expressions?
  14. Can lambdas throw checked exceptions?
  15. Can lambdas have multiple return statements?
  16. Difference between -> and :: operators in Java 8.
  17. What are the advantages of using lambdas?
  18. How are lambdas internally implemented in Java?
  19. Can lambdas be serialized?
  20. How do you debug lambda expressions?
  21. Can you assign a lambda to a variable?
  22. How do lambdas improve iteration over collections?
  23. Give an example of using a lambda with Runnable.
  24. How does the compiler determine the type of a lambda?
  25. What are some real-world use cases of lambdas?

2. Functional Interfaces (25 Questions)

  1. What is a functional interface in Java 8?
  2. Explain the @FunctionalInterface annotation.
  3. Give 5 examples of built-in functional interfaces.
  4. Difference between Predicate and Function.
  5. Difference between Consumer and Supplier.
  6. What is a UnaryOperator? Example?
  7. What is a BinaryOperator? Example?
  8. How do you chain functional interfaces like Predicate and Function?
  9. Can functional interfaces have default methods?
  10. Can functional interfaces have static methods?
  11. Can a functional interface extend another interface?
  12. What happens if you declare two abstract methods in a functional interface?
  13. How does type inference work with functional interfaces?
  14. Can a functional interface be generic?
  15. What are primitive specializations of functional interfaces?
  16. Can functional interfaces throw exceptions?
  17. How do you implement a custom functional interface?
  18. How do you use method references with functional interfaces?
  19. What is the difference between apply() in Function and test() in Predicate?
  20. Can functional interfaces be Serializable?
  21. What is the role of java.util.function package?
  22. When should you explicitly use @FunctionalInterface?
  23. Can functional interfaces override equals() and hashCode()?
  24. How do functional interfaces enable functional programming in Java?
  25. Real-world use case of functional interfaces?

3. Stream API Basics (25 Questions)

  1. What is the Stream API in Java 8?
  2. Difference between a Collection and a Stream?
  3. How do you create a stream from a list?
  4. What are intermediate operations in streams?
  5. What are terminal operations in streams?
  6. Explain lazy evaluation in streams.
  7. Difference between map() and flatMap().
  8. What does the filter() operation do?
  9. How do you sort a stream?
  10. What is the use of forEach() in streams?
  11. Difference between sequential and parallel streams.
  12. How do you collect stream results into a list?
  13. How do you collect stream results into a set?
  14. What is the reduce() operation in streams?
  15. Difference between findFirst() and findAny().
  16. How do you use limit() and skip() in streams?
  17. How does distinct() work in streams?
  18. Explain peek() and its use case.
  19. Can you reuse a stream after a terminal operation?
  20. How do you create an infinite stream?
  21. How does performance differ between loops and streams?
  22. Can streams work on primitive types?
  23. How do you debug a stream pipeline?
  24. How does short-circuiting work in streams?
  25. Real-world use case of streams?

4. Optional Class (25 Questions)

  1. What is Optional in Java 8?
  2. Why was Optional introduced?
  3. How do you create an Optional object?
  4. Difference between Optional.of() and Optional.ofNullable().
  5. What does Optional.empty() return?
  6. How do you check if a value is present in Optional?
  7. Difference between isPresent() and ifPresent().
  8. How do you provide a default value with Optional?
  9. Difference between orElse() and orElseGet().
  10. Difference between orElse() and orElseThrow().
  11. How do you transform values inside Optional using map()?
  12. Difference between map() and flatMap() in Optional.
  13. How do you filter values in Optional?
  14. Can Optional itself be null?
  15. Can Optional be used for method parameters?
  16. What are drawbacks of using Optional excessively?
  17. Can Optional be serialized?
  18. How do you return Optional from repository methods?
  19. Can you use Optional with Streams?
  20. How do you combine multiple Optionals?
  21. Is Optional thread-safe?
  22. Can Optional hold collections?
  23. What is the difference between Optional in Java and Maybe in other FP languages?
  24. Should Optional be used in DTOs?
  25. Real-world use cases of Optional?

5. Date and Time API (25 Questions)

  1. What is the new Date/Time API in Java 8?
  2. Why was it introduced when we already had Date and Calendar?
  3. What is LocalDate?
  4. What is LocalTime?
  5. What is LocalDateTime?
  6. What is ZonedDateTime?
  7. How do you parse and format dates in Java 8?
  8. Difference between DateTimeFormatter and SimpleDateFormat?
  9. What is Period in Java 8?
  10. What is Duration in Java 8?
  11. How do you calculate the difference between two dates?
  12. How do you add or subtract days from a date?
  13. How do you check if a year is a leap year?
  14. How do you handle time zones in Java 8?
  15. Difference between Instant and LocalDateTime.
  16. How do you convert between old Date and new DateTime API?
  17. What is Clock in Date/Time API?
  18. What is TemporalAdjuster?
  19. What is TemporalUnit?
  20. How do you get the start and end of a day?
  21. What is the difference between OffsetDateTime and ZonedDateTime?
  22. How do you compare two dates in Java 8?
  23. Can LocalDate represent time?
  24. Can LocalTime represent date?
  25. Real-world use cases of Date/Time API?

6. Default & Static Methods in Interfaces (25 Questions)

  1. What are default methods in Java 8?
  2. Why were default methods introduced?
  3. Can interfaces have method implementations in Java 8?
  4. How do you define a default method?
  5. Can a class override a default method?
  6. What happens if two interfaces have the same default method?
  7. How do you resolve conflicts in multiple inheritance with default methods?
  8. Can interfaces have static methods?
  9. How do you call a static method in an interface?
  10. Can default methods be abstract?
  11. Can interfaces have private methods in Java 8?
  12. How do default methods impact backward compatibility?
  13. Can constructors be default methods?
  14. How do you use default methods with collections?
  15. Can default methods call abstract methods?
  16. Can default methods be overridden by subclasses?
  17. What is the difference between default methods and abstract classes?
  18. Can default methods be synchronized?
  19. Can default methods throw exceptions?
  20. Can default methods call other default methods?
  21. Are static methods inherited in interfaces?
  22. Can you override static methods from interfaces?
  23. Can static methods in interfaces be private?
  24. Real-world use case of default methods?
  25. Real-world use case of static methods in interfaces?

7. CompletableFuture & Concurrency (25 Questions)

  1. What is CompletableFuture in Java 8?
  2. How is CompletableFuture different from Future?
  3. How do you create a CompletableFuture?
  4. How do you run asynchronous tasks with CompletableFuture?
  5. Difference between runAsync() and supplyAsync().
  6. What is thenApply() in CompletableFuture?
  7. What is thenAccept()?
  8. What is thenRun()?
  9. Difference between thenCompose() and thenCombine().
  10. How do you handle exceptions in CompletableFuture?
  11. What is exceptionally() method?
  12. What is handle() method?
  13. How do you combine multiple CompletableFutures?
  14. Difference between allOf() and anyOf().
  15. How do you cancel a CompletableFuture?
  16. How do you block and get the result?
  17. What is join() in CompletableFuture?
  18. Difference between join() and get().
  19. How do you implement timeouts in CompletableFuture?
  20. Is CompletableFuture thread-safe?
  21. How do you use custom thread pools with CompletableFuture?
  22. Difference between synchronous and asynchronous callbacks?
  23. How does CompletableFuture improve parallelism?
  24. How do you test CompletableFutures?
  25. Real-world use cases of CompletableFuture?

8. Collections & Map Enhancements (25 Questions)

  1. What enhancements were made to collections in Java 8?
  2. What is the forEach() method in collections?
  3. How do you use removeIf()?
  4. What is the replaceAll() method?
  5. What is the sort() method in List?
  6. How do you use computeIfAbsent() in Map?
  7. How do you use computeIfPresent()?
  8. How do you use compute()?
  9. What is merge() in Map?
  10. How do you use getOrDefault() in Map?
  11. What is putIfAbsent()?
  12. What is replace() in Map?
  13. How do you use forEach() in Map?
  14. Difference between entrySet() iteration and forEach().
  15. How do you sort a Map by values?
  16. Can you use streams with collections directly?
  17. What is Spliterator?
  18. How is Spliterator different from Iterator?
  19. What is trySplit() in Spliterator?
  20. How do you estimate size in Spliterator?
  21. What is the ORDERED characteristic in Spliterator?
  22. What is the CONCURRENT characteristic?
  23. What is the DISTINCT characteristic?
  24. What is the IMMUTABLE characteristic?
  25. Real-world use case of collection enhancements?

9. Streams Advanced (25 Questions)

  1. What are parallel streams?
  2. How do you create a parallel stream?
  3. Difference between sequential and parallel stream performance?
  4. What are the pitfalls of parallel streams?
  5. How does fork-join framework work with parallel streams?
  6. What is Collectors.groupingBy()?
  7. What is Collectors.partitioningBy()?
  8. Difference between groupingBy() and partitioningBy().
  9. What is Collectors.mapping()?
  10. How do you join strings using Collectors.joining()?
  11. How do you count elements using Collectors.counting()?
  12. What is Collectors.summarizingInt()?
  13. What is Collectors.averagingDouble()?
  14. What is Collectors.reducing()?
  15. What is a custom collector?
  16. How do you implement your own collector?
  17. What is a downstream collector?
  18. Difference between reduce() and collect().
  19. Can streams be infinite?
  20. How do you use Stream.iterate()?
  21. How do you use Stream.generate()?
  22. What is flatMapToInt()?
  23. What is boxed() in streams?
  24. What is parallelism level in parallel streams?
  25. Best practices for using advanced streams?

10. Miscellaneous Java 8 Features (25 Questions)

  1. What is Nashorn in Java 8?
  2. How do you execute JavaScript with Nashorn?
  3. What is StringJoiner in Java 8?
  4. How do you join strings with a delimiter using StringJoiner?
  5. What enhancements were made to String in Java 8?
  6. What is the new Base64 API in Java 8?
  7. Difference between Encoder and Decoder in Base64.
  8. How do you encode and decode a string with Base64?
  9. What enhancements were made to Arrays in Java 8?
  10. How do you sort an array with a custom comparator in Java 8?
  11. What is Arrays.parallelSort()?
  12. What is SplittableRandom?
  13. How is SplittableRandom different from Random?
  14. What enhancements were made to Comparator in Java 8?
  15. How do you use comparing() method in Comparator?
  16. How do you use thenComparing()?
  17. What are annotation enhancements in Java 8?
  18. What is repeating annotations?
  19. What is type annotation in Java 8?
  20. How do you declare type-use annotations?
  21. Can annotations be applied to generics in Java 8?
  22. Can annotations be inherited in Java 8?
  23. What is method parameter reflection in Java 8?
  24. What are compact profiles?
  25. Summary of miscellaneous features introduced in Java 8?

Related Topics


   Lambda Expressions   
   Functional Interfaces   
   Stream API