Explain me please why the method main contains the methods calls and it isn't correct to use the logic without using methods?
12/26/2019 6:28:19 PM
Nastya Shetska5 Answers
New AnswerIt is because in Java the main method is considered as the entry point for every program that you write. Since it is an OOP language we use classes, objects and methods very often and only components like these make up the whole language.
you can write small code without methods if you want. Methods are good for repeated actions, or for operate data in objects.
Java OOP da asosan eng ko'p foydalaniladigan kodlarni qayta-qayta yozib yurmaslik uchun asosan bunday usullar o'ylab topilgan. Keyinchalik haliConstructor, meros olish, polimarphisim mavzularida bularga to`liq tushunib olasiz
Learn Playing. Play Learning
SoloLearn Inc.
4 Embarcadero Center, Suite 1455Send us a message