i just try to check on your posted code ( what is the JAVA version )
website-archive/CodingChallenges/CC_021_Mandelbrot/Processing/CC_021_Mandelbrot/CC_021_Mandelbrot.pde at main · CodingTrain/website-archive · GitHub ?
and what i see first is that you deleted the
// Daniel Shiffman
// http://codingtra.in
// The Coding Train | creating Creative Coding Videos! | Patreon
// Code for: https://youtu.be/6z7GQewK-Ks
section.
why you do this?