What is the result of the following code compilation?

class Quest3 {
    public static void main(String s[ ]) {
        String args;
        System.out.print(args + s);
Each variable declared within the method should be initialized before its usage or compiler will report an error otherwise.
Having an initialized args variable within the print() method error will not occur since the addition operator initializes actions of transformation of all the arguments into string
String [] args parameter in main() is just a convention, and any suitable identifier for a string array can be used.

Следи за CodeGalaxy

Мобильное приложение Beta

Get it on Google Play
Обратная Связь
Продолжайте изучать
тесты по Java
Зарегистрируйся сейчас
или Подпишись на будущие тесты