TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
A very simple java program for Break Statement
Alagunila Meganathan
Aug 08
2016
Code
684
0
2
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
Break.rar
public
class
Break{
public
static
void
main(String[] args){
int
i,j;
System.out.println(
"Prime numbers between 1 to 50 : "
);
for
(i =
1
;i <
50
;i++ ){
for
(j =
2
;j < i;j++ ){
if
(i % j ==
0
)
{
break
;
}
}
if
(i == j)
{
System.out.print(
" "
+ i);
}
}
}
}
java
break