Logo video2dn
  • Сохранить видео с ютуба
  • Категории
    • Музыка
    • Кино и Анимация
    • Автомобили
    • Животные
    • Спорт
    • Путешествия
    • Игры
    • Люди и Блоги
    • Юмор
    • Развлечения
    • Новости и Политика
    • Howto и Стиль
    • Diy своими руками
    • Образование
    • Наука и Технологии
    • Некоммерческие Организации
  • О сайте

Скачать или смотреть Methods Calling Methord

  • Computer World
  • 2020-07-02
  • 272
Methods Calling Methord
JAVA LanguesProgramming LanguesJAVA
  • ok logo

Скачать Methods Calling Methord бесплатно в качестве 4к (2к / 1080p)

У нас вы можете скачать бесплатно Methods Calling Methord или посмотреть видео с ютуба в максимальном доступном качестве.

Для скачивания выберите вариант из формы ниже:

  • Информация по загрузке:

Cкачать музыку Methods Calling Methord бесплатно в формате MP3:

Если иконки загрузки не отобразились, ПОЖАЛУЙСТА, НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если у вас возникли трудности с загрузкой, пожалуйста, свяжитесь с нами по контактам, указанным в нижней части страницы.
Спасибо за использование сервиса video2dn.com

Описание к видео Methods Calling Methord

Control Flow
It may seem like the work computers do is very complicated, but really they are just performing simple tasks very quickly. As you learn to program you are learning how to give computers instructions on how to carry out these tasks. On your journey to becoming a programmer it is important for you to understand how the computer will read and run your instructions. Here are the rules computers use to run your code we've encountered so far:

First, find the main method. If your program doesn’t have a main method to get it started, it won’t run!
Execute each statement in the main method from top to bottom, starting with the one right after the opening curly brace.
If the statement is a method call, jump to that method definition and execute each of the statements in that method from top to bottom.
When you reach the end of a method (represented by its closing curly brace), "return" to where you encountered the method call and continue with the next statement following the method call.
When you reach the end of the main method, end execution and close the program.
These rules control the "flow" of our program from one statement to the next, this is called the "control flow" of the program.

Let’s see how this works by reading through the Java code below. Reading code is an important skill to learn – most software developers spend more time reading code that someone else wrote (or that they wrote a while ago!) than they do writing brand new code.

public static void main(String[] args) {
System.out.println("main method starting...");
message1();
message2();
System.out.println("...done with main");
}

public static void message1() {
System.out.println("All of message1.");
}

public static void message2() {
System.out.println("Start of message2.");
message1();
System.out.println("End of message2.");
}
Step Code
1 Find the main method
2 Do each statement in order
3 If it’s a method call, find that method
4 Do each statement in order
5 When you reach the end of the method, return to the previous method and continue with the next statement there
6 If it’s a method call, find that method
7 Do each statement in order
8 If it’s a method call, find that method
9 Do each statement in order
10 When you reach the end of the method, return to the previous method and continue with the next statement there
11 When you reach the end of the method, return to the previous method and continue with the next statement there
12 When you reach the end of the main method, you’re done!
You can think of method call statements as expanding your program copying the statements of each method in place of its method call. It’s like the program we would have written if we hadn’t decomposed it into methods! Of course, for this very simple example, we could have just written it like this in the first place.

System.out.println("main method starting...");
System.out.println("All of message1.");
System.out.println("Start of message2.");
System.out.println("All of message1.");
System.out.println("End of message2.");
System.out.println("...done with main");
Here is some code that involves methods calling other methods:

public class ControlFlow {
public static void main(String[] args) {
System.out.println("start main");
method1();
method2();
method3();
System.out.println("end main");
}

public static void method1() {
System.out.println("enter method1");
method2();
System.out.println("end method1");
}

Комментарии

Информация по комментариям в разработке

Похожие видео

  • О нас
  • Контакты
  • Отказ от ответственности - Disclaimer
  • Условия использования сайта - TOS
  • Политика конфиденциальности

video2dn Copyright © 2023 - 2025

Контакты для правообладателей [email protected]