Java methods | SoloLearn: Learn to code for FREE!


Java methods

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 Shetska

5 Answers

New Answer


It 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



Sayhello Is a method who write text hello??