Click here to Skip to main content
15,886,725 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
String a[]={"Dell","Sony"};
for(String list : a){
System.out.print("list is"+a);
}
Posted
Comments
Sergey Alexandrovich Kryukov 4-Dec-15 1:36am    
Sorry, this is not a question, not a request for anything, nothing. If you really want some help, use "Improve question", but please understand that if has to be a question.
—SA
Mohibur Rashid 4-Dec-15 1:39am    
First of all this is not a question. Secondly, I know what you have done wrong. About this, I am sorry to inform you that I won't answer you. Rather I would ask you to debug it.
Sergey Alexandrovich Kryukov 4-Dec-15 2:01am    
5! :-)
—SA
Mohibur Rashid 4-Dec-15 2:15am    
:)
DamithSL 4-Dec-15 2:22am    
list is list not a :)

1 solution

If you want samples, just use Google and you will find plenty of help.

Java - Loop Control[^]

The Java™ Tutorials: The for Statement[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900