Java: Tutorial, Projects & Course Syllabus
Core Java, OOP, collections, concurrency, testing and backend fundamentals.
Who this is for
Students, engineers and job seekers
Before you start
JDK 17 or later; basic variables and arithmetic.
Build a tuition fee calculator with Java
Use a record to represent a lesson without mutable fields.
A collection can be filtered and reduced to a total. Store whole rupees as integers in this exercise; use an exact decimal or minor units for fractional money.
Set up your practice environment
Save as FeeDemo.java and run java FeeDemo.java.
import java.util.List;
public class FeeDemo {
record Lesson(int hours, int rate, boolean completed) {}
public static void main(String[] args) {
var lessons = List.of(new Lesson(2, 500, true),
new Lesson(1, 700, false), new Lesson(3, 400, true));
int total = lessons.stream().filter(Lesson::completed)
.mapToInt(l -> l.hours() * l.rate()).sum();
System.out.println(total);
}
}Expected result
Walk through the example
- The filter excludes the uncompleted lesson.
- mapToInt converts each remaining lesson into a charge: 1000 and 1200.
- sum returns 2200; the original list is unchanged.
Common mistake
Do not compare String values using ==; use equals. Avoid floating-point arithmetic for financial totals.
Try it yourself
Add a completed lesson of 2 hours at ₹600. What is the total? How would you reject a negative rate?
Reveal suggested solution
The total becomes 3400. Add a compact record constructor that throws IllegalArgumentException if hours or rate is negative.
Portfolio project brief
Create a monthly tuition ledger with immutable lesson records, student IDs, completed/cancelled status and a CSV summary.
Acceptance criteria
- Reject invalid hours and rates.
- Separate totals by student.
- Test empty, cancelled and completed lesson cases.
This is a project specification, not a completed downloadable project. Build and test it independently or with a mentor.
Quick self-test
Choose one answer per question, then check your score. No sign-in required.
Complete learning roadmap
These are suggested course modules, not a claim that every module has a full tutorial on this site.
- 01Java foundations
- 02OOP & clean design
- 03Collections & generics
- 04Exceptions & I/O
- 05Concurrency
- 06Testing & project
Learning outcomes
- Write production-style Java
- Apply OOP correctly
- Build a portfolio project
Continue with official documentation
Original PCDS learning material. Check the official documentation for your installed software version; these guides are not vendor-endorsed courses.
Need help learning Java?
Choose a city and describe your learning goal in the enquiry form. Mention Java, your current level and whether you prefer home or online learning. Tutor availability and pricing are subject to confirmation.
Browse Java tutoring options in Mira Road or select a city above.
