Cart 0

Monsters University - Java

“And to no more NullPointerExceptions,” Mike added, shuddering.

Mike let out a squeak of joy. Sulley gave him a furry high-five that nearly knocked him out of his chair.

“That’s not how Java works!” Mike snapped. monsters university java

No errors. No exceptions. Clean. Simple. Terrifying.

Professor Derek “Scare-Code” Clawson, a grizzled old scarer with a missing claw and a coffee mug that said “I Debug in My Sleep,” prowled the computer lab. “Listen up, monsters!” he growled. “The new Scream Extractor 2.0 runs on Java. If you can’t write a recursive method to simulate a child’s nightmare, you’ll be filing paperwork, not scaring.” “That’s not how Java works

public class ScareReport implements Comparable { private int terrorLevel; private String childName; public int compareTo(Object o) { ScareReport other = (ScareReport) o; return this.terrorLevel - other.terrorLevel; } }

“Trust me.”

“Okay,” Mike whispered to himself. “Break it down. The ScareReport class needs to implement Comparable so we can sort scares by terror-level. Simple.”

Sulley shrugged, causing the desks to shake. “I just… think about scaring. The code writes itself.” Simple.” Sulley shrugged