Тесты
Язык сайта: Русский
Українська
English
Русский
Тесты по программированию
Вход
Регистрация
Тесты по программированию
Теория
сниппеты
Статьи
Главная
Android
Цены
FAQ
История Cosmo
Правила и условия сервиса
Политика конфиденциальности
Политика в отношении файлов cookie
Обратная Связь
visibility and scope
:
Язык контента: English
Русский
What is the result of the following program compilation and execution? public class Test { public static void main(String[] args) { int i = 1; long j = 1; if (i == 1) { int k = 1; if (i == k) { System.out.println("i equals k"); } } else if (j == k) { System.out.println("j equals k"); } } }
visibility and scope
What is the following program`s execution result? class Tack { static short s = 17; public Tack(short ss) { new Tack(); s *= ss; } public Tack() { ; } } public class Bridle extends Tack { public Bridle(int s) { System.out.println(s + 1); } public static void main(String[] args) { Bridle b = new Bridle(3); } }
visibility and scope
What will be the result of the main method in the Main class execution? public class Main { private int anInt = 4; public Main() { anInt = 5; } public static void main(String[] args) { Main m = new Main(); int anInt = 6; m.print(anInt); } public void print(int anInt){ System.out.println(anInt); } }
visibility and scope
← Предыдущая
1
Следующая →
Зарегистрируйся сейчас
или
Подпишись на будущие тесты