JAVA Report
JAVA Report
A REPORT ON
COURSE
SUBMITTED BY
20201214582
TO
i
DEDICATION
I dedicate this project to GOD, in spite of all the obstacles I‘ve faced, he has led me this far in
ii
ACKNOWLEDGEMENTS
I want to thank The Head of department ; Dr. (Mrs) J.N. Odii, and all other lecturers and
organizers of this important course for devoting their efforts to make sure we could learn and get
the experience we needed to get ready for the industry in our field of study.
iii
ABSTRACT
This report provides a comprehensive exploration of how continuous and label works in JAVA
program.
Iv
TABLE OF CONTENT
Title page
Dedication
Acknowlegment
Abstract
Table of content
Introduction
Labels
Differences
Summary
Reference
v
INTRODUCTION
Java Continue Statement
The continue statement is used in loop control structure when you need to jump to
the next iteration of the loop immediately. It can be used with for loop or while
loop.
The Java continue statement is used to continue the loop. It continues the current
flow of the program and skips the remaining code at the specified condition. In
case of an inner loop, it continues the inner loop only.
We can use Java continue statement in all types of loops such as for loop, while
loop and do-while loop.
i.e
jump-statement;
continue;
THE OUTPUT:
1
2
3
4
6
7
8
9
10
As you can see in the above output, 5 is not printed on the console. It is because the
loop is continued when it reaches to 5.
LABELS
A Label object is a component for placing text in a container. A label displays a
single line of read-only text. The text can be changed by the application, but a user
cannot edit it directly.
ContinueExample3.java
THE OUTPUT:
1 1
1 2
1 3
2 1
3 1
3 2
3 3
An unlabelled continue is used to skip the iteration of the nearest closing loop but
labeled continue is used to skip the iteration of the desired closing loop.
SUMMARY
A continue goes to the end of the loop in which it resides.
A labelled break exits (goes to the end of) the labelled block
.
REFERENCES
Continues and labels on java on youtube.com Author: Simply coding
How java works on youtube.com Author: Telusko
Java: A Beginner's Guide. Author: Herbert Schildt.
Effective Java. Author: Joshua Bloch