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
Зареєструйся Зараз
або Підпишись на майбутні тести