package org.example; public class Main { // Class public static void main(String[] args) { // MAIN Object MyBasics myB = new MyBasics(); // myB local prop myB.myIfElse(); // for loop String[] localNames = myB.contactNames(); // ["Bob Smith", "Mary Jones", "Joe Doe"] //Print for (String name : localNames) { // for ( x in: ys ) // x local var of the loop {} // ys dataset //// 1. local static variable Class localNames //// 2. Object passed myB.contactNames() System.out.println(name); } // end for loop // Execute a class object SumCalculator sumCalculator = new SumCalculator(); int number = 7; // 28 int result = sumCalculator.sum(number); System.out.println("Result: " + result); // 28 // Override Methods Persons persons = new Persons(); Student student = new Student(); // only student members Teacher teacher = new Teacher(); // call method persons.typeofPerson(); student.typeofPerson(); teacher.typeofPerson(); // Polymorphism Persons persons1 = new Student(); // Persons 7 > Student 2 new 1 or end up with 9 members persons1.typeofPerson(); // student // execute Interface Contact contact = new EmailContact("philipm@onlc.com"); contact.displayContactInfo(); // interface } // main } // Main