Page 1 of 1

About Question enthuware.ocajp.i.v8.2.1214 :

Posted: Sun May 02, 2021 4:27 pm
by elboukhari
Hi,
I'm not OK with the response for this example :

Consider the following program:

Code: Select all

public class TestClass{   
public static void main(String[] args){     
String tom = args[0];     
String dick = args[1];     
String harry = args[2];   
}
 }  
What will be the value of 'harry' if the program is run from the command line: java TestClass 111 222 333

As there is no System.out.println the response should be "None of abode" not "333" !

Re: About Question enthuware.ocajp.i.v8.2.1214 :

Posted: Sun May 02, 2021 9:44 pm
by admin
The question does not ask you what will be printed. It only asks you the value of harry. Just because there is no print statement doesn't mean the code will not be executed.

Re: About Question enthuware.ocajp.i.v8.2.1214 :

Posted: Sun May 02, 2021 10:38 pm
by elboukhari
confusing

Re: About Question enthuware.ocajp.i.v8.2.1214 :

Posted: Sun May 02, 2021 11:09 pm
by admin
We have updated the question to make it clearer.
thank you for your feedback!

Re: About Question enthuware.ocajp.i.v8.2.1214 :

Posted: Mon May 03, 2021 3:09 am
by elboukhari
Thank you !