Enhanced for loop is simple version of for loop for java arrays
Syntax:-
for(datatype variable : array_name)
{
body of loop
}
Example:-
for(int i : value)
variable is required to hold element of array.
datatype is used for declaring variable data type.
array_name is used to defined which array is using enhanced for loop.
Example:-
import java.util.Scanner;
class group{
public static void main(String arng[]){
int value[]= new int[5];
Scanner data = new Scanner(System.in);
float sum =0;
System.out.println("Enter 5 element of array" );
// Enhanced for loop
for(int i : value)
{
i = data.nextInt();
sum = sum+i;
}
System.out.println("Average of array element");
sum = sum/value.length;
System.out.println(sum);
}
}
Here value is array name
Previous Code:-
Length function for array
List Code:-
Java codes
Next Code:-
Java Programs:-
List of Java Programs
Syntax:-
for(datatype variable : array_name)
{
body of loop
}
Example:-
for(int i : value)
variable is required to hold element of array.
datatype is used for declaring variable data type.
array_name is used to defined which array is using enhanced for loop.
Example:-
import java.util.Scanner;
class group{
public static void main(String arng[]){
int value[]= new int[5];
Scanner data = new Scanner(System.in);
float sum =0;
System.out.println("Enter 5 element of array" );
// Enhanced for loop
for(int i : value)
{
i = data.nextInt();
sum = sum+i;
}
System.out.println("Average of array element");
sum = sum/value.length;
System.out.println(sum);
}
}
Here value is array name
Previous Code:-
Length function for array
List Code:-
Java codes
Next Code:-
Java Programs:-
List of Java Programs
Your good knowledge and kindness in playing with all the pieces were
ReplyDeletevery useful. I don’t know what I would have done if I had not
encountered such a step like this.
java Training in Bangalore
java training in chennai
I found your blog while searching for the updates, I am happy to be here. Very useful content and also easily understandable providing.. Believe me I did wrote an post about tutorials for beginners with reference of your blog.
ReplyDeleteSelenium Training in Chennai
Your new valuable key points imply much a person like me and extremely more to my office workers. With thanks from every one of us.
ReplyDeleteBest AWS Training in Chennai | Amazon Web Services Training in Chennai
Best AWS Training in Chennai | Amazon Web Services Training in Chennai
I likable the posts and offbeat format you've got here! I’d wish many thanks for sharing your expertise and also the time it took to post!!
ReplyDeleteClick here:
angularjs Training in online
Click here:
angularjs training in annanagar
Click here:
angularjs training in bangalore
Click here:
angularjs training in chennai
Click here:
angularjs training in velarchery
It has been simply incredibly generous with you to provide openly what exactly many individuals would’ve marketed for an eBook to end up making some cash for their end, primarily given that you could have tried it in the event you wanted.
ReplyDeletedigital marketing training in tambaram
digital marketing training in annanagar
digital marketing training in marathahalli
digital marketing training in rajajinagar
Digital Marketing online training
Thank you for taking the time and sharing this information with us. It was indeed very helpful and insightful while being straight forward and to the point.
ReplyDeleteHadoop Training in Chennai
Hadoop Training in Bangalore
Big data training in tambaram
Big data training in Sholinganallur
Big data training in annanagar
Big data training in Velachery
Big data training in Marathahalli
Great post! I am actually getting ready to across this information, It’s very helpful for this blog.Also great with all of the valuable information you have Keep up the good work you are doing well.
ReplyDeleteDevops training in Chennai
Devops training in Bangalore
Devops training in Pune
Devops Online training
Devops training in Pune
Devops training in Bangalore
Devops training in tambaram
Really very nice blog information for this one and more technical skills are improve,i like that kind of post.
ReplyDeleteangularjs Training in chennai
angularjs Training in chennai
angularjs-Training in tambaram
angularjs-Training in sholinganallur
angularjs-Training in velachery
I would assume that we use more than the eyes to gauge a person's feelings. Mouth. Body language. Even voice. You could at least have given us a face in this test.
ReplyDeletepython training in tambaram | python training in annanagar | python training in jayanagar
Wow it is really wonderful and awesome thus it is very much useful for me to understand many concepts and helped me a lot. it is really explainable very well and i got more information from your blog.
ReplyDeleterpa training in velachery| rpa training in tambaram |rpa training in sholinganallur | rpa training in annanagar| rpa training in kalyannagar
Nice tutorial. Thanks for sharing the valuable information. it’s really helpful. Who want to learn this blog most helpful. Keep sharing on updated tutorials…
ReplyDeleteJava training in Annanagar | Java training in Chennai
Java training in Chennai | Java training in Electronic city
It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
ReplyDeleteData Science training in kalyan nagar | Data Science training in OMR
Data Science training in chennai | Data science training in velachery
Data science training in tambaram | Data science training in jaya nagar
This could be one of the most useful blogs I have ever come across on this technology. I am a newbie to this technology. Great work admin.
ReplyDeleteiOS Training in Chennai
Big Data Training in Chennai
Hadoop Training in Chennai
Android Training in Chennai
Selenium Training in Chennai
Digital Marketing Training in Chennai
JAVA Training in Chennai
Hadoop Course in Chennai
Nice post really informative. Thank you for sharing. You have explained really well.
ReplyDeleteDevops Training in Chennai | Devops Training Institute in Chennai
I am really happy with your blog because your article is very unique and powerful for new reader.
ReplyDeleteaws Training in Bangalore
python Training in Bangalore
hadoop Training in Bangalore
angular js Training in Bangalore
bigdata analytics Training in Bangalore
python Training in Bangalore
aws Training in Bangalore
good
ReplyDeleteinplant training in chennai
inplant training in chennai
inplant training in chennai for it
italy web hosting
afghanistan hosting
angola hosting
afghanistan web hosting
bahrain web hosting
belize web hosting
india shared web hosting
nice...
ReplyDeleteinternship in chennai for ece students
internships in chennai for cse students 2019
Inplant training in chennai
internship for eee students
free internship in chennai
eee internship in chennai
internship for ece students in chennai
inplant training in bangalore for cse
inplant training in bangalore
ccna training in chennai
Really it was an awesome article,very interesting to read.You have provided an nice article,Thanks for sharing.
ReplyDeleteaws Training in Bangalore
python Training in Bangalore
hadoop Training in Bangalore
angular js Training in Bangalore
bigdata analytics Training in Bangalore
python Training in Bangalore
aws Training in Bangalore
Thank you for your post. This is excellent information. It is amazing and wonderful to visit your site.
ReplyDeleteaws Training in Bangalore
python Training in Bangalore
hadoop Training in Bangalore
angular js Training in Bangalore
bigdata analytics Training in Bangalore
python Training in Bangalore
aws Training in Bangalore
Regular visits listed here are the easiest method to appreciate your energy, which is why why I am going to the website everyday, searching for new, interesting info. Many, thank you cursos de ti online
ReplyDeleteMyself so glad to establish your blog entry since it's actually quite instructive. If it's not too much trouble continue composing this sort of web journals and I normally visit this blog. Examine my administrations.
ReplyDeleteGo through these Salesforce Lightning Features course. Found this Salesforce CRM Using Apex And Visualforce Training worth joining. Enroll for SalesForce CRM Integration Training Program and practice well.
I must appreciate you for providing such a valuable content for us. This is one amazing piece of article. Helped a lot in increasing my knowledge.
ReplyDeleteAWS training in chennai | AWS training in annanagar | AWS training in omr | AWS training in porur | AWS training in tambaram | AWS training in velachery
Awesome blog. I enjoyed reading your articles. This is truly a great read for me. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work! cyber security course training in coimbatore
ReplyDeleteAwesome blog. I enjoyed reading your articles. This is truly a great read for me. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work! contact us
ReplyDelete