Source: https://mrcet.com/downloads/digital_notes/ECE/III%20Year/07012023/III-I%20JAVA%20%20DIGITAL%20NOTES.pdf