package org.example; public class MyBasics { // Class // if statement public void myIfElse() { //Object method int num; // property num = -10; // assignment int num1 = 20; // prop = assignment if ( num > 0 ) { // true System.out.println("This is a positive number"); } // if else if (num < 0) { System.out.println("This is a negative number"); } // else if else { System.out.println("The number is zero"); } // else } // myIfElse // for loop // accessmodifier returntype public String[] contactNames() { String[] myNames = new String[3]; var fname = new String[]{"Bob", "Mary", "Joe"}; // length 3 0,1,2 var lname = new String[]{"Smith", "Jones", "Doe"}; for (int i = 0; i < 3; i++) { myNames[i] = fname[i] + " " + lname[i]; } // for return myNames; // ["Bob Smith", "Mary Jones", "Joe Doe"] } // contactNames } // MyBasics