Operators, Control Structures
ExamsWithAnswers
https://www.stuvia.com/user/
ExamsWithAnswers
01/03/2022
, Operators, Control Structures
Engineering Mechanics
This document was created and verified by ExamsWithAnswers
1.00 Lecture 3
Operators, Control
Reading for next time: Big Java: sections 5.1-5.4 Skip all
the advanced topics
main()
In each Java program there is a just a single main() method, no matter how many classes there are.
() method is often in a class that has no other methods, by convention. It can be in any class, though some choices would see
ells Java where to start the program; it s just a naming convention
asily have been called startHere()
examples we have only one class, so it will seem there s a main() method in each class. Not so.
at a later point in the term will be minimalist:
es the least possible work to get the program running and then hands off all the remaining work to objects and their methods.
since we haven t covered classes and objects, we ll do everything in main() for a little while longer.
2