Java Basics codes