Which of the following declare an array of string objects? (Select Multiple)

A) String[ ] s;
B) String [ ]s:
C) String[ s]:
D) String s[ ]:

Showing Answers 1 - 34 of 34 Answers

A B D are the correct answers.All these are valid declarations.The C is not as the limit cannot be specified while creating a refernce for a class(String is also a class).

  Was this answer useful?  Yes



 

String s[] ={"HAPPY DAYS"};String []s1 ={

"SMILE FOR EVER"};

String[] s2 ={"WISH ALL THE BEST"};

//String [s] = {"ITS WONT WORKS"}



The above three statements works properly

  Was this answer useful?  Yes

jo

  • Oct 30th, 2012
 

d

  Was this answer useful?  Yes

gogula

  • May 19th, 2013
 

d

  Was this answer useful?  Yes

Shanu

  • May 25th, 2015
 

A,B,D

  Was this answer useful?  Yes

Vuyyuri Naga Tejaswi

  • Jun 4th, 2015
 

C) String[ s]:

  Was this answer useful?  Yes

sumit

  • Jul 5th, 2015
 

Only A) String[ ] s;

  Was this answer useful?  Yes

Mallikarjun Reddy

  • Sep 23rd, 2015
 

Except 2nd one all are correct, but 1st one is used widely in the industry.

  Was this answer useful?  Yes

Manjeet Kumar

  • Mar 2nd, 2016
 

Only (C) option is inCorrect.

  Was this answer useful?  Yes

Ajay

  • Aug 1st, 2019
 

a, b and d

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions