Programming ↗

Java Level 2 · OOP

One object. One idea. One clear step.

Understand Java OOP one small idea at a time. Start with a class, one object and one method, then practise controlled state, inheritance, interfaces and composition. Finish with collections and class-based file CRUD.

Intermediate3 months suggested path4 learning modes
AI-generated scene: A developer learning object-oriented class design beside a laptopAI-generated image
LEARN IT. PRACTISE IT. EXPLAIN IT.PKR 20,000Course fee · confirm your learning plan
START WITH THE BIG PICTURE

What is this course about?

Understand Java OOP one small idea at a time. Start with a class, one object and one method, then practise controlled state, inheritance, interfaces and composition. Finish with collections and class-based file CRUD.

Learn one OOP idea at a time: 7 guided topics, 350 small Java programs, 70 quiz questions and 3 class-based file CRUD projects. Multiline source, tested reference output and VS Code setup.

Where you can use the skills

  • A class-based student registry.
  • A persistent library catalogue.
  • A help-desk ticket store with an open-ticket queue.

These are application ideas for your learning and portfolio. The published curriculum below shows the actual lessons and projects.

PRACTICAL BENEFITS

What you will work towards

Explain classes and objects using small everyday examples.

Protect valid state and compare inheritance with composition.

Use interfaces, object collections, stacks and queues.

Build three persistent projects with separate domain, repository and menu classes.

FIND YOUR STARTING POINT

Who is this course for?

  • Java Level 1 learners ready for OOP.
  • College students who want clear step-by-step class examples.
  • Learners preparing for further Java application development.

Before you start

Java variables, conditions, loops, methods and basic files, or the Java Level 1 course. Use a compatible local JDK and the included VS Code guide.

THE ROAD AHEAD

Your course curriculum.

7 topics × 50 programs = 350 programs · 70 quiz questions · 3 file-based CRUD projects.

01Classes, Objects & Constructors50 programs +
  1. Meet an empty class
  2. One object remembers a name
  3. Two objects keep different names
  4. Read default field values
  5. A field initializer gives a starting value
  6. Call one object method
  7. Read state inside a method
  8. Return a calculated value
  9. Give a method an argument
  10. Change an object with a method
  11. Start with a no-argument constructor
  12. Pass a name to a constructor
  13. Use this to name the current object
  14. Initialize two fields together
  15. Overload a constructor
  16. Chain constructors with this
  17. Observe constructor order
  18. Count created objects with static
  19. Separate static and instance values
  20. Call a static factory method
  21. Two reference names, one object
  22. Reassign a reference separately
  23. Compare reference identity
  24. Check a missing object
  25. Pass an object to a method
  26. Reassigning a parameter leaves the caller
  27. Return a new object
  28. Return the current object
  29. Make an explicit value copy
  30. Print a useful object description
  31. Store objects in an array
  32. Visit every object in an array
  33. Fill an initially empty object array
  34. Total values from several objects
  35. Find an object by its ID
  36. Read keyboard data into an object
  37. A boolean-returning object method
  38. An object method with a local variable
  39. Call one instance method from another
  40. Reuse an object between calls
  41. Create a fresh object in each loop
  42. Use a named class constant
  43. Overload an instance method
  44. Read a final instance field
  45. Swap references, not objects
  46. Return an object selected by a rule
  47. Keep a simple object snapshot
  48. Reset an object deliberately
  49. Create an array with a factory loop
  50. Explain a tiny object model
Take the 10-question topic quiz →
02Encapsulation & Validation50 programs +
  1. A private name · first step
  2. A private name · build a read-only label
  3. Rename through an operation · first step
  4. Rename through an operation · trace two renames
  5. Reject a blank name · first step
  6. Reject a blank name · reject blank input
  7. Keep marks in range · first step
  8. Keep marks in range · protect the previous mark
  9. Validate during construction · first step
  10. Validate during construction · reject an invalid object
  11. Deposit with a rule · first step
  12. Deposit with a rule · reject a negative deposit
  13. Withdraw without overdrawing · first step
  14. Withdraw without overdrawing · leave funds unchanged
  15. Reserve the last seat · first step
  16. Reserve the last seat · reject a second reservation
  17. Increase stock through restock · first step
  18. Increase stock through restock · reject empty restock
  19. Sell only available stock · first step
  20. Sell only available stock · reject overselling
  21. Expose a calculated total · first step
  22. Expose a calculated total · recalculate after a change
  23. Read-only identity · first step
  24. Read-only identity · list stable identities
  25. Immutable coordinates · first step
  26. Immutable coordinates · keep the original coordinate
  27. Copy an incoming array · first step
  28. Copy an incoming array · change the caller array
  29. Copy an outgoing array · first step
  30. Copy an outgoing array · change the returned array
  31. Return an immutable list snapshot · first step
  32. Return an immutable list snapshot · reject snapshot modification
  33. Reject duplicate names · first step
  34. Reject duplicate names · handle a duplicate join
  35. Control a state transition · first step
  36. Control a state transition · reject repeated completion
  37. Set a date pair atomically · first step
  38. Set a date pair atomically · preserve both old values
  39. Use a private helper · first step
  40. Use a private helper · reject a null argument
  41. Bound a counter · first step
  42. Bound a counter · stop at the maximum
  43. Normalize before storing · first step
  44. Normalize before storing · compare normalized values
  45. Final reference with mutable state · first step
  46. Final reference with mutable state · trace allowed mutation
  47. Return a domain result · first step
  48. Return a domain result · read a rejected result
  49. Separate objects preserve separate rules · first step
  50. Separate objects preserve separate rules · reject an overfill
Take the 10-question topic quiz →
03Inheritance & Reuse50 programs +
  1. A child inherits a method · first step
  2. A child inherits a method · compare parent and child calls
  3. Add a child-only method · first step
  4. Add a child-only method · combine inherited and added behaviour
  5. Construct the parent with super · first step
  6. Construct the parent with super · construct two children
  7. Parent runs before child · first step
  8. Parent runs before child · trace separate constructions
  9. Pass shared and special values · first step
  10. Pass shared and special values · read the child detail
  11. Override one instance method · first step
  12. Override one instance method · compare implementations
  13. Extend parent work with super · first step
  14. Extend parent work with super · keep the base message separate
  15. Keep parent fields private · first step
  16. Keep parent fields private · preserve another child state
  17. Use a protected helper · first step
  18. Use a protected helper · reuse the protected calculation
  19. Inherit from one direct parent · first step
  20. Inherit from one direct parent · read shared and specific behaviour
  21. Follow a three-level chain · first step
  22. Follow a three-level chain · trace all three levels
  23. Create sibling subclasses · first step
  24. Create sibling subclasses · compare sibling reuse
  25. A child is assignable to its parent · first step
  26. A child is assignable to its parent · check the shared identity
  27. A parent reference exposes parent members · first step
  28. A parent reference exposes parent members · keep the child reference for its extra method
  29. Check a subtype with instanceof · first step
  30. Check a subtype with instanceof · handle a plain parent
  31. Overload does not override · first step
  32. Overload does not override · call both signatures
  33. A final method remains inherited · first step
  34. A final method remains inherited · use the fixed inherited method
  35. A final class ends a branch · first step
  36. A final class ends a branch · use a final child through its parent
  37. Static methods are hidden · first step
  38. Static methods are hidden · compare the two class methods
  39. Fields are not overridden methods · first step
  40. Fields are not overridden methods · compare field selection
  41. Call an inherited method from a child · first step
  42. Call an inherited method from a child · mix base and child operations
  43. Validate in the parent constructor · first step
  44. Validate in the parent constructor · reject invalid shared data
  45. Delegate between child constructors · first step
  46. Delegate between child constructors · choose the named constructor
  47. Override toString from Object · first step
  48. Override toString from Object · use the Object reference
  49. Choose is-a carefully · first step
  50. Choose is-a carefully · total related objects
Take the 10-question topic quiz →
04Polymorphism, Abstract Classes & Interfaces50 programs +
  1. Dispatch through a parent reference · first step
  2. Dispatch through a parent reference · dispatch inside a loop
  3. Two shapes answer the same request · first step
  4. Two shapes answer the same request · total different shapes
  5. A polymorphic parameter · first step
  6. A polymorphic parameter · reuse one caller
  7. Return an abstraction · first step
  8. Return an abstraction · choose another implementation
  9. Shared code in an abstract class · first step
  10. Shared code in an abstract class · compare raw and wrapped content
  11. Construct an abstract base through a child · first step
  12. Construct an abstract base through a child · combine base state and child behaviour
  13. Meet one small interface · first step
  14. Meet one small interface · call the ability on several objects
  15. Implement two interfaces · first step
  16. Implement two interfaces · view the second ability
  17. An interface can extend another · first step
  18. An interface can extend another · use the smaller contract
  19. A default interface method · first step
  20. A default interface method · compare required and default methods
  21. Override a default method · first step
  22. Override a default method · compare default and replacement
  23. Resolve two default methods explicitly · first step
  24. Resolve two default methods explicitly · use the resolved method through an interface
  25. Call a static interface utility · first step
  26. Call a static interface utility · check an empty cleaned label
  27. Replace a strategy object · first step
  28. Replace a strategy object · compare strategies on one input
  29. Inject a notifier contract · first step
  30. Inject a notifier contract · reuse the same notifier
  31. Use a test implementation · first step
  32. Use a test implementation · check the recorded call
  33. Anonymous implementation of a contract · first step
  34. Anonymous implementation of a contract · trace the boundary
  35. A lambda for one abstract method · first step
  36. A lambda for one abstract method · filter with the same rule
  37. Use a method reference · first step
  38. Use a method reference · reject the nonpositive cases
  39. Overload selection uses declared types · first step
  40. Overload selection uses declared types · compare a parent-typed argument
  41. Runtime dispatch inside an inherited method · first step
  42. Runtime dispatch inside an inherited method · verify the inherited caller
  43. A covariant return type · first step
  44. A covariant return type · use the parent declaration
  45. Provide an equality contract · first step
  46. Provide an equality contract · use equality in a set
  47. Keep a consistent contract · first step
  48. Keep a consistent contract · test the contract on invalid input
  49. Add an implementation without changing the loop · first step
  50. Add an implementation without changing the loop · extend the plan
Take the 10-question topic quiz →
05Composition & Object Relationships50 programs +
  1. A car has an engine · first step
  2. A car has an engine · construct two owners
  3. Pass a collaborator to a constructor · first step
  4. Pass a collaborator to a constructor · share one collaborator
  5. Delegate a small job · first step
  6. Delegate a small job · check delegated behaviour
  7. Compose a student address · first step
  8. Compose a student address · reuse an immutable value
  9. One invoice contains several lines · first step
  10. One invoice contains several lines · total two owned parts
  11. Reject a missing required collaborator · first step
  12. Reject a missing required collaborator · reject a missing engine
  13. An optional collaborator · first step
  14. An optional collaborator · choose self-study
  15. Sharing a mutable helper shares changes · first step
  16. Sharing a mutable helper shares changes · observe a shared update
  17. Copy a mutable helper for ownership · first step
  18. Copy a mutable helper for ownership · isolate an outside change
  19. A shallow copy still shares elements · first step
  20. A shallow copy still shares elements · observe an element change
  21. A deep-enough copy duplicates mutable parts · first step
  22. A deep-enough copy duplicates mutable parts · protect the copied element
  23. Build a report from data and formatting · first step
  24. Build a report from data and formatting · check the composed output
  25. Replace one implementation of a helper · first step
  26. Replace one implementation of a helper · replace only the formatter
  27. Compose instead of inheriting from a list · first step
  28. Compose instead of inheriting from a list · use the narrow register API
  29. Keep coordination in one service · first step
  30. Keep coordination in one service · verify the coordination
  31. Contain a stack for undo · first step
  32. Contain a stack for undo · undo the most recent edit
  33. Contain a queue for service · first step
  34. Contain a queue for service · handle an empty desk
  35. Define equality for a contained value · first step
  36. Define equality for a contained value · compare identity separately
  37. Connect objects with IDs · first step
  38. Connect objects with IDs · resolve the ID relation
  39. A composed object can calculate a derived value · first step
  40. A composed object can calculate a derived value · isolate the delivery component
  41. Own a simple state machine · first step
  42. Own a simple state machine · finish the class
  43. Use a clock collaborator in a test · first step
  44. Use a clock collaborator in a test · advance a controlled clock
  45. Decorate a collaborator · first step
  46. Decorate a collaborator · trace nested wrappers
  47. Compose a validation rule · first step
  48. Compose a validation rule · exercise the rejected branch
  49. Keep a course and its lessons separate · first step
  50. Keep a course and its lessons separate · update only one owned lesson
Take the 10-question topic quiz →
06Object Collections, Stacks & Queues50 programs +
  1. A typed list of students · first step
  2. A typed list of students · iterate over objects
  3. Insert at a chosen list position · first step
  4. Insert at a chosen list position · replace an existing position
  5. Find a student by ID · first step
  6. Find a student by ID · report a missing ID
  7. Remove matching objects safely · first step
  8. Remove matching objects safely · leave nonmatching items intact
  9. Remove through an iterator · first step
  10. Remove through an iterator · empty the list through traversal
  11. Sort objects by one property · first step
  12. Sort objects by one property · sort marks descending
  13. Break a sorting tie · first step
  14. Break a sorting tie · keep the primary order
  15. Value equality controls list membership · first step
  16. Value equality controls list membership · check a different value
  17. Use a set for unique values · first step
  18. Use a set for unique values · preserve first insertion order
  19. Keep sorted unique codes · first step
  20. Keep sorted unique codes · read the sorted extremes
  21. Look up objects in a map · first step
  22. Look up objects in a map · handle a missing key
  23. Create without overwriting a map value · first step
  24. Create without overwriting a map value · reject an existing key
  25. Update and delete map entries · first step
  26. Update and delete map entries · delete a keyed record
  27. Iterate map entries · first step
  28. Iterate map entries · list only the keys
  29. Group an object list · first step
  30. Group an object list · separate two groups
  31. Push and pop a stack · first step
  32. Push and pop a stack · drain the stack in order
  33. Peek without changing a stack · first step
  34. Peek without changing a stack · inspect an empty stack safely
  35. Implement one-level undo · first step
  36. Implement one-level undo · leave state when history is empty
  37. Queue tickets in arrival order · first step
  38. Queue tickets in arrival order · serve every ticket
  39. Inspect a queue safely · first step
  40. Inspect a queue safely · handle an empty poll
  41. Use both ends of a deque · first step
  42. Use both ends of a deque · remove from the other end
  43. Choose priority instead of arrival order · first step
  44. Choose priority instead of arrival order · define a priority tie-breaker
  45. Write a generic box · first step
  46. Write a generic box · use a different type safely
  47. Write a bounded generic helper · first step
  48. Write a bounded generic helper · accept a decimal number
  49. Protect a returned object collection · first step
  50. Protect a returned object collection · compare snapshot and later state
Take the 10-question topic quiz →
07Classes, Files & Repository CRUD50 programs +
  1. Write one object field · first step
  2. Write one object field · save inside a data folder
  3. Load text into a new object · first step
  4. Load text into a new object · normalize loaded text
  5. Handle a first run without a file · first step
  6. Handle a first run without a file · read an existing store
  7. Store one record as a delimited line · first step
  8. Store one record as a delimited line · inspect the two stored fields
  9. Parse a stored integer field · first step
  10. Parse a stored integer field · reject a nonnumeric ID
  11. Validate field count · first step
  12. Validate field count · reject a missing field
  13. Reject blank loaded values · first step
  14. Reject blank loaded values · reject an invalid loaded object
  15. Frame arbitrary text with Base64 · first step
  16. Frame arbitrary text with Base64 · round-trip the encoded value
  17. Store multiple record lines · first step
  18. Store multiple record lines · persist an empty collection
  19. Add a format header · first step
  20. Add a format header · reject an unknown header
  21. Reject duplicate stored IDs · first step
  22. Reject duplicate stored IDs · reject a duplicate fixture
  23. Load into temporary state · first step
  24. Load into temporary state · preserve live state on a corrupt row
  25. Put file access in a repository · first step
  26. Put file access in a repository · reopen through a new repository
  27. Create only if the record is absent · first step
  28. Create only if the record is absent · protect an existing record
  29. Read a record without changing the store · first step
  30. Read a record without changing the store · search a missing record without mutation
  31. Update a matching record · first step
  32. Update a matching record · reject update of a missing ID
  33. Delete a matching record · first step
  34. Delete a matching record · keep records when ID is absent
  35. Write a replacement through a temporary file · first step
  36. Write a replacement through a temporary file · leave the target before committing
  37. Request an atomic replacement when supported · first step
  38. Request an atomic replacement when supported · trace the non-atomic fallback operation
  39. Back up before a deliberate change · first step
  40. Back up before a deliberate change · restore a backup fixture
  41. Close a reader with try-with-resources · first step
  42. Close a reader with try-with-resources · read until end of file
  43. Do not hide a load error · first step
  44. Do not hide a load error · follow the successful load branch
  45. Inject a repository path · first step
  46. Inject a repository path · isolate two repositories
  47. Use an in-memory repository contract · first step
  48. Use an in-memory repository contract · test replacement without file I/O
  49. Verify a complete CRUD cycle · first step
  50. Verify a complete CRUD cycle · persist the CRUD cycle
Take the 10-question topic quiz →
08Projects3 projects +
PLAN BEYOND THE CLASSROOM

Scope in Pakistan, the Gulf and abroad

Use these directions to plan your next steps. They are learning and portfolio suggestions, not a list of current vacancies or a guarantee of employment.

Java OOP learning pathwayFurther application-development preparationFoundation for later backend framework study
01

Pakistan

Use clear class-based projects to strengthen programming studies and portfolio discussions with local teams. Add databases, testing and framework experience for professional application roles.

02

Gulf countries

Build towards enterprise or backend application work through further Java projects and framework study. Review the actual role requirements, portfolio expectations and experience requested by employers.

03

Other countries & remote work

OOP, interfaces and collections are foundations for broader Java application work. The occupation wage context is a longer-term comparison, not promised earnings after this course.

INTERNATIONAL PAY CONTEXT · USD / HOUR

Software Developers — United States

A broader occupation to research as you build experience. These figures describe U.S. employees across experience levels, not earnings after this course.

2025 U.S. hourly wages · source: BLS via O*NET
10th percentileMedian90th percentile
$39.64/hr$65.38/hr$103.21/hr

Percentiles show points in a wage distribution; they are not minimum or maximum offers. This is not beginner pay or a freelance quote. Pakistan and Gulf offers depend on the actual role, experience and package; no universal local USD/hour rate is claimed.

View the original occupation wage table ↗Source checked 2 November 2026.

For current Gulf-market research, see the Hays GCC Salary Guide 2026. Confirm the specific employer’s duties, required experience and entry conditions before relying on an offer.

CLEAR ANSWERS BEFORE YOU APPLY

Frequently asked questions

How much practice is included?

Seven topics with 50 small programs each: 350 programs, seven opening lectures, 70 quiz questions and three class-based file CRUD projects.

Will Java edits run live in the browser?

The website does not host a JVM. Study and edit online, view tested reference output, and compile your changes locally using the VS Code guide.

Should I finish Java Level 1 first?

Yes, or already understand Java variables, conditions, loops, methods and basic file handling. Each OOP topic then starts with a simple everyday example.

Which learning modes can I request?

Self-study, tutor support, onsite classes near GPO in Sadar, Rawalpindi Cantt, and online classes via Google Meet. Admin confirms available guided class slots before payment.

What is the course fee?

PKR 20,000 is the listed total course fee. Confirm the agreed fee, duration, learning mode and schedule with Cody.pk before paying.

What can I see before enrolling?

The course description, curriculum outline, fees and public guides are available to browse. The editor, exercises and study materials require the relevant active enrollment, including any free place assigned by admin.

How do I apply and get access?

Apply with this course selected, your name, email and WhatsApp number. Choose your mode and, where required, an available class slot. Submit payment details through checkout. Access opens after admin verifies the payment and activates the enrollment.

Can I download study materials?

The student workspace shows materials for your enrolled course. Course-bundle downloads are available when admin enables download permission for your enrollment.

Are the international hourly figures a job or income promise?

No. They are 2025 U.S. employee occupation statistics, covering different experience levels. They are not beginner pay, freelance billing rates, Pakistan or Gulf offers, or a prediction of income after this course.

ASK. SHARE. LEARN TOGETHER.

Course conversation

Questions and learning experiences about Java Level 2 · OOP.

Community comments

Start a useful conversation.

No published comments yet. Ask about the course or share your learning experience.

Join the conversation

Keep it helpful and relevant. Comments appear after admin review. Your public name and comment may be displayed; your account email is visible only to admin. Please leave out phone numbers and private details.

YOUR NEXT STEP

Choose your pace. Make a start.

PKR 20,000Listed total course fee

Request self-study, tutor support, onsite classes or online Google Meet classes. Guided modes use admin-managed class slots. Confirm your agreed fee and schedule before payment.

  1. ApplySend your name, email, WhatsApp and learning goals.
  2. Confirm the planAgree your mode, available slot and fee with Cody.pk.
  3. Pay & startPayment verification and activation open the enrolled course.

Manual Easypaisa: Rashid Irshad · 03145366708. Raast ID: 03145366708. Use the course checkout to confirm the amount and submit your payment reference for verification.

YOUR NEXT STEP

Keep building your skills

Explore a related path, read a practical guide or discuss your next course.

Explore all pages
WhatsApp
My learning ↗