logotransparent.png

Legion of Learners

www.lol-101.com

  • Home

  • Classrooms

  • Courses

  • About Us

    • Executive Team
    • Board Members
  • Resources

  • More

    Use tab to navigate through the menu items.
    To see this working, head to your live site.
    • Categories
    • All Posts
    • My Posts
    clarkipeng
    Jun 19

    6/19 If statements and for loops

    in Java for ACSL

    Today we went over if statements and for loops in Java. In java and c-based languages, the for loop contains an initialization, conditional, and an updating condition. Usually, a variable is altered until it doesn't satisfy the conditional statement anymore and the loop is terminated. Likewise, the if statement executes its given code if the boolean condition is satisfied. There are many caveats when it comes to boolean operators. primitives can be compared using the == operator. In contrast, objects like strings and ArrayLists can only be compared with the .equals() function that checks the contents of the object instead of the pointer to the memory of that object.


    info

    HW (submit a repl.it link)

    slides



    0 comments
    0
    0 comments

    Questions? Email us at legionoflearners@gmail.com or join our WeChat group!

    • lol-101dotcom

    ©2020 Legion of Learners