Oracle Java Foundations study materials
Oracle Java Foundations study resources

Oracle Java Foundations case studies

Oracle Java Foundations · Put your knowledge to work in context.

The Oracle Certified Foundations Associate, Java credential - associated with exam code 1Z0-811 - is Oracle's entry-level Java certification. It is aimed at people who are starting out with the language: students, career changers, and developers who want a structured, vendor-recognized benchmark for fundamental Java knowledge before moving on to professional-level certification. The Oracle Java Foundations case studies are 5 cases and about 3,018 words.

1

The Payroll Average That Lost Its Fractions

A payroll module keeps headcount and totals as int . With int total = 17; int count = 4; the line double avg = total / count; stores 4.0, and the printed report shows 4.00 where the analyst expects 4.25.

564 words, about 3 min
2

Telemetry Arrays: Aliases, Failed Resets and a Bad Lookup

A monitoring class holds a six-element int[] telemetry . Two helpers exist: bump(int[] a) does a[0]++ , and reset(int[] a) does a = new int[a.length] .

544 words, about 3 min
3

Static Hiding, Field Shadowing and a Constructor That Prints Too Early

A team is reviewing these classes before a refactor. The snippet under review is Base b = new Child(); followed by System.out.print(b.kind() + b.who() + b.size); .

606 words, about 3 min
4

Finally Blocks That Outvote Return Statements

A utility class contains this method: Callers get 3 even though the finally block ran last and left x at 4. A reviewer's variant puts return x; inside the finally block instead of the assignment, and the method then returns 4 while the thrown exception never surfaces.

637 words, about 3 min
5

The Meter That Leaked Its Array and Boxed Its Arguments

A class Meter has a private final int[] samples , a constructor that assigns the incoming array reference directly, and a getter public int[] getSamples() { return samples; } . A caller runs int[] s = m.getSamples(); s[0] = 99; and the meter's reading changes although no setter exists.

667 words, about 3 min