Java Tutorial

Index

  1. About platform
    1. JDK/JRE/JVM
    2. JVM Internals Architecture
    3. JIT
    4. GCTypes
    5. GC algos
    6. JVM Config
  2. Java Core basics
    • Rules for identifiers
    • Auto-conversion
    • Static Keyword in java
    • this and super keyword
    • foreach syntax(enhanced for loop)
  3. Inheritance
    1. Diamond problem
    2. Polymorphism
      1. Static
      2. Dynamic
    3. instanceof keyword
    4. abstract keyword
    5. final keyword
    6. Special note on protected
    7. Access modifiers
  4. Class and interface
    1. Interface
    2. Abstract class vs interface
    3. Inner classes
      1. Instance inner class
      2. Static inner class
      3. method local inner class
    4. Enum
  5. String class
  6. Date-Time Handling (come up with exact method of using it)
  7. day-8 -Collections readme
  8. Collection

Introduction

Index

  1. Introduction – Note : released every 6 months i.e in march and September every year
    • LTS are generally supported for 4 years – it is more oriented towards stability than features ans had been in past versions
SnoJava VersionRelease DateSupport-DateLTS/STSMain-feature Additioncomment
1Java 5.0LTS – Covariant
– var-arg
2Java 8.0March 2014extended support until December 2030*LTS– Lambda
– Stream
– Optional
– Interface -Default/Static addition
3Java -11Released- Sept 2018extended support until September 2026LTS– HTTP Client (Standardized)
– var keyword
– String Methods (isBlank, lines, etc.)
Focused on APIs, performance, and GC;
4Java -17 Released- September 2021*extended support until September 2029LTS– Sealed classes
– record classes
Modern Java syntax (records, sealed classes), security tightening, pattern matching,
5Java-21Sept2023LTSMajor LTS with virtual threads, structured concurrency, foreign memory API, and pattern matching finalization—a powerful upgrade.
6Java-25Sept2025LTS– Full support for generics over primitives (Valhalla)
– Finalized string templates
– Universal generics
– Foreign function and memory API (Final)
– Pattern matching (Final)

Features in a version are release under one of following category:

  1. GA (General release)
    • production-ready versions containing all the finalized features
  2. Preview Features:These features are not considered final and could be changed, removed, or have their APIs modified in future releases.

Note- LTS has only GA release

Official release Notes:

Cloud certification

AWS Certification Levels:

  1. Cloud practitioner(6 months knowledge) : AWS Certifies the level of 6 months knowledge
  2. AWS Certified Solutions Architect – Associate(goal : Attain this) this credential demonstrates your ability to design and deploy effective solutions on the Amazon Web Services platform. This certification is intended for individuals who can design distributed applications in AWS.
  3. AWS Certified Developer – Associate validates your ability to design and maintain AWS applications.
  4. AWS Certified Solutions Architect – Professional are recommended to have 2+ years of experience in the design and deployment of cloud architecture on Amazon Web Services.

Interview Prep

Topics to be covered

  1. Low Level Design
  2. High Level Design
  3. Resources

System Design Resources

Books for HLD

  1. Designing Data-Intensive Application
    • By Martin Klepmann
    • Very Good book for HLD
  2. Insider Guide to SD
    • By Alex xu
    • More specific to Interviews
    • it gives a framework that helps approach a problem
  3. Insider Guide to SD
    • By Maurice Jayson
  4. Solutions Architect
    • Saurabh and Nilanjali Srivastav (pakt publication)
    • more inclined towards architect
    • can refer a few chapters for enhancing knowledge
  5. Fundamentals of Software Architecture
    • Mark Richards (Oreilly publication)
    • more on architecture

Books for LLD (same order can be refereed)

  1. The Object Oriented Thought process
    • By Matt westfield (5TH EDITION)
    • for VERY BEGINNER Who don’t understand class and object and build on Design pattern and SOLID Pattern
  2. Design Pattern: Elements of reusable Object Oriented Software
    • By Gang of four
    • Categorization of patterns
    • How implementation of different pattern can be used
  3. Head First design patterns -Building extensible and maintainable Object oriented software
    • By Eric freeman and Elizabeth
    • with each pattern solve one problem
    • and gives some problem to solve and gives solution to you
  4. Clean Code- A Handbook for Agile Software
    • By Robert martin or uncle bob
    • It talks about maintainable and reusable code
  5. Head First Object-Oriented Analysis and design
    • How in real world the problem is solved is included – extensible and usable to end user.

FAQ
  1. Design BookMyShow kind of App(HashedIn)
    1. based on your input
      • what caching/db to use and why?
  2. Simple in-memory cache,(S)
  3. Design LLD for instagram/Photosharing App
  4. Design a cron jo bscheduler
  5. Design HLD for Twitter system
  6. automated parking lot to minimise the entry and exit times.,(S)
  7. Trafic
    • how will you handle multiple concurrent request not in cache still all going to bacckend
    • search – optimal way to search and partition
    • token generation and submission in optimal way

https://www.geeksforgeeks.org/system-design-url-shortening-service/

Restful Services

Following topics are covered

  1. PUT vs POST
  2. [System Design]Caching at which layer .. which data to be cached [same data shouldn’t be cached at different layer]
  3. Api Design
    1. data can be send at 3 different part path param/Query Param/Header..what’s the difference?

Resources []Books for referebce:

  1. RESTful Web Services by Leonard Richardson [Best as mentioned]
    1. You will learn what URI is, how HTTP can be used as an application-level protocol, and not just a transport protocol to transfer data between client and server.
    2. Complementry Tutorial https://www.udemy.com/course/restful-web-service-with-spring-boot-jpa-and-mysql/?ranMID=39197&ranEAID=JVFxdTr9V80&ranSiteID=JVFxdTr9V80-JwlMFe5sTRDlo0zYN7GLpg&LSNPUBID=JVFxdTr9V80&utm_source=aff-campaign&utm_medium=udemyads

Other Books

  1. https://www.java67.com/2017/06/top-10-rest-api-and-restful-web-services-book.html
  2. https://medium.com/javarevisited/top-5-books-and-courses-to-learn-restful-web-services-in-java-using-spring-mvc-and-spring-boot-79ec4b351d12 [S[rong Specific]
  3. https://medium.com/javarevisited/top-5-books-to-learn-web-services-in-java-soap-rest-22d92adbefc1

REST Architectural Constraints

  1. https://restfulapi.net/rest-architectural-constraints/
  2. https://www.geeksforgeeks.org/rest-api-architectural-constraints/
  3. https://restfulapi.net/hateoas/

Methods

Memory map

Objective

Following rules are described
  1. Item 49: Check parameters for validity
  2. Item 50: Make defensive copies when needed
  3. Item 51: Design method signatures carefully
  4. Item 52: Use overloading judiciously
  5. Item 53: Use varargs judiciously
  6. Item 54: Return empty collections or arrays, not nulls
  7. Item 55: Return optionals judiciously
  8. Item 56: Write doc comments for all exposed API elements