- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Java continue statement with Loop
Example
Following is an example
public class Tester { public static void main(String args[]) { int[] array = {1,2,3,4,5}; for (int i = 0; i < array.length; i++) { if(i == 3){ continue; } System.out.print(array[i]); } } }
The output will be 1235 as it will skip the loop when i is 4 and continue will move the control back to for loop.
- Related Articles
- How to use continue statement in Python loop?
- break, continue and label in Java loop
- How do we use continue statement in a while loop in C#?
- PHP continue Statement
- Loop control statement in Java
- Continue Statement in C/C++
- The continue statement in JavaScript
- Continue statement in Dart Programming
- Continue Statement in C/C++ Programming
- What is continue statement in JavaScript?
- How can I use a label with continue statement in JavaScript?
- What is a continue statement in Java and how to use it?
- Can a for statement loop infinitely in java?
- Why does Lua have no “continue” statement?
- Using else conditional statement with for loop in python

Advertisements