Break ve continue komutları döngü komutlarının akışını kontrol etmek için kullanılır. Kısaca, break komutu yapıyı sonlandırırken continue komutu da döngüde belli bir şarta uyan kısmın atlanmasını sağlar.
Break Komutu
Bir Java programında, program çalışırken işlemin veya programın sonlandırılması bu komut ile yapılır.
Break komutu While, Do-While, ve For döngülerinde oldukça kullanılır.
Break komutunu basit bir program üzerinde çalıştıralım.
package kodbloklari.com;
public class break1 {
public static void main(String[] args) {
for(int i = 1; i <= 10; i++)
{
if(i == 4) {
break;
}
System.out.println(i + ".KOD BLOKLARI");
}
}
}
Yukarıdaki programda normalde ekrana 10 defa “KOD BLOKLARI” yazısını yazdırması gerekirken, biz ‘i’ nin değeri 4 olduğu zaman break komutunu kullanarak döngüyü sonlandırdık.
Böylece ekrana 3 defa “KOD BLOKLARI” yazdırmış oldu.
Kodun ekran çıktısı aşağıdaki şekildedir:

Şimdi de Switch-case yapısındaki break komutlarını inceleyelim. Java Dili Switch-Case Yapısı sayfasındaki hesap makinesi örneğimizi kullanalım.
package kodbloklari.com;
import java.util.Scanner;
public class hesapmakinesi {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int sayi1,sayi2;
int islem;
System.out.print("1.Sayıyı giriniz: ");
sayi1 = scan.nextInt();
System.out.print("2.Sayıyı giriniz: ");
sayi2 = scan.nextInt();
System.out.println("\n1.Toplama");
System.out.println("2.Çıkarma");
System.out.println("3.Bölme");
System.out.println("4.Çarpma");
System.out.print("İslemi seçiniz: ");
islem = scan.nextInt();
switch(islem) {
case 1:
System.out.println("Toplama işleminin sonucu = " + (sayi1 + sayi2));
break;
case 2:
System.out.println("Çıkarma işleminin sonucu = " + (sayi1 - sayi2));
break;
case 3:
System.out.println("Çarpma işleminin sonucu = " + ((float)sayi1 / sayi2));
break;
case 4:
System.out.println("Çarpma işleminin sonucu = " + (sayi1 * sayi2));
break;
default:
System.out.println("Yanlış seçim yaptınız !!");
}
}
}
Burada biz işlemimizi seçtikten sonra bizim seçimimize göre bir case ifadesine giriyor ve işlemi yaptıktan sonra break komutuyla döngüyü sonlandırıyor.
Burada işlem değişkenine ‘3’ sayısını girdiğim için case 3: ifadesinin içerisindeki komutları çalıştırdı ve en son program break komutuna geldiği zaman break komutu çalıştırıp switch-case yapısını sonlandırdı.
Kodun çıktısı da aşağıdaki şekildedir:

Eğer case ifadelerinden sonra break komutunu kullanmasaydık,program bir case ifadesini sağladıktan sonra altındaki tüm komutları çalıştırırdı.
Aşağıdaki örnekte, yukarıda yaptığımız hesap makinesi örneğindeki case ifadelerindeki break komutunu kullanmayalım. Programda ne gibi değişiklikler olacağını beraber gözlemleyelim.
package kodbloklari.com;
import java.util.Scanner;
public class hesapmakinesi {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int sayi1,sayi2;
int islem;
System.out.print("1.Sayıyı giriniz: ");
sayi1 = scan.nextInt();
System.out.print("2.Sayıyı giriniz: ");
sayi2 = scan.nextInt();
System.out.println("\n1.Toplama");
System.out.println("2.Çıkarma");
System.out.println("3.Bölme");
System.out.println("4.Çarpma");
System.out.print("İslemi seçiniz: ");
islem = scan.nextInt();
switch(islem) {
case 1:
System.out.println("Toplama işleminin sonucu = " + (sayi1 + sayi2));
//break;
case 2:
System.out.println("Çıkarma işleminin sonucu = " + (sayi1 - sayi2));
//break;
case 3:
System.out.println("Çarpma işleminin sonucu = " + ((float)sayi1 / sayi2));
//break;
case 4:
System.out.println("Çarpma işleminin sonucu = " + (sayi1 * sayi2));
//break;
default:
System.out.println("Yanlış seçim yaptınız !!");
}
}
}
Switch-case yapısındaki case ifadelerinden sonra break komutu kullanmadım. Bu yüzden program herhangi bir case ifadesine girdikten sonra break komutunu göremediği için altındaki case ifadelerini de gerçekleştiriyor.
Kodun ekran çıktısı şu şekildedir:

“islem” değişkenini 2 olarak belirledik. Switch yapısındaki ilgili case ifadesi çalıştırıldıktan sonra program, herhangi bir break komutunu göremediği için yapıyı sonlandırana kadar çalışmaya devam etti.
Continue Komutu
Program, bir döngü içerisinde continue komutu ile karşılaşılırsa, ondan sonraki komutları atlar ve döngünün bir sonraki değerinden devam eder.
Continue komutunu basit bir örnek üzerinde programımızda uygulayalım.
package kodbloklari.com;
public class continue1 {
public static void main(String[] args) {
for(int i = 1; i < 6; i++)
{
if(i == 2) {
continue;
}
System.out.println(i + " .KOD BLOKLARI");
}
}
}
Bu döngü normal koşullarda ekrana 5 defa “KOD BLOKLARI” yazdırması gerekirken “i = 2” değeri olunca program 10. satırdaki continue komutunu görür ve direk 7. satırdan yani döngünün bir sonraki değerinden devam eder. Böylece ekrana 4 defa yazı yazdırmış olur.
Kodun ekran çıktısı da şu şekildedir:

Şimdi de continue komutunu kullanarak farklı bir örnek yapalım.
1 den 10 a kadar olan sayıları döngü yardımıyla toplayalım ama arasından 6 değerini bu toplamaya katmayalım.
Bunun için döngü 6 değerini aldığı zaman toplama işlemini gerçekleştirmeden bir sonraki değerden devam etmesini istiyoruz. Bunu da continue komutuyla yapacağız.
package kodbloklari.com;
public class continue2 {
public static void main(String[] args) {
int toplam = 0;
for(int i = 0; i < 10; i++)
{
if(i == 6) {
continue;
}
toplam += i;
}
System.out.println("Toplam = " + toplam);
}
}
Yukarıdaki kod da program 12.satıra geldiği zaman continue ifadesini gördüğü için alt satırdaki toplama işlemini yapamadan döngünün başına dönüyor. Bu şekilde 6 değerini aralarına katmadan 1 den 10 a kadar olan sayıların toplamını bulmuş olduk.
Kodun ekran çıktısı aşağıdaki şekildedir:

Break ve continue komutlarını kullanarak farklı örnekler yapabiliriz. Java Dili Örnekleri sayfasını ziyaret ederek farklı örnekleri inceleyebilirsiniz.
211 Yorum
I like this blog very much, Its a really nice situation to read and receive information.
Great, thanks for sharing this post. Much obliged.
Really enjoyed this article.Really looking forward to read more. Really Great.
fenofibrate 160mg cheap buy fenofibrate pills for sale fenofibrate online order
Aw, this was an extremely good post. Taking the time and actual effort to produce a very good articleÖ but what can I sayÖ I procrastinate a lot and never manage to get anything done.
I am curious to find out what blog platform you happen to be utilizing? I’m experiencing some minor security problems with my latest blog and I would like to find something more risk-free. Do you have any recommendations?
silkroad online pharmacy – erectile dysfunction medications online pharmacy or the canadian pharmacy
Hello my friend! I wish to say that this article is awesome, nice written andinclude almost all vital infos. I would like to see extra posts like this .
order zaditor 1 mg generic tofranil 75mg sale buy tofranil 25mg online
This is a topic that’s close to my heart… Take care! Exactly where are your contact details though?
Aw, this was an incredibly good post. Taking the time and actual effort to generate a really good articleÖ but what can I sayÖ I hesitate a lot and don’t seem to get nearly anything done.
order precose sale fulvicin pill order generic fulvicin 250mg
buy cheap minoxytop cheap tadalafil 20mg mens ed pills
how to get aspirin without a prescription cheap aspirin order imiquad
antacid omeprazole pepcid vs zantac vs prilosec
fantastic issues altogether, you simply won a logo new reader. What might you recommend in regards to your post that you made a few days in the past? Any certain?
generic dipyridamole order gemfibrozil sale cheap pravastatin 10mg
Thanks for sharing, this is a fantastic blog.Thanks Again. Fantastic.
I am so grateful for your blog post.Really thank you! Really Great.
melatonin 3 mg generic cost desogestrel buy danazol 100 mg without prescription
Hello there! I could have sworn Iíve been to your blog before but after going through some of the posts I realized itís new to me. Anyways, Iím definitely delighted I came across it and Iíll be bookmarking it and checking back often!
wow, awesome blog article.Much thanks again. Awesome.
Oh my goodness! an incredible article dude. Thank you Nonetheless I am experiencing problem with ur rss . Don’t know why Unable to subscribe to it. Is there anybody getting similar rss problem? Anyone who is aware of kindly respond. Thnkx
I truly appreciate this article post.Really thank you! Fantastic.
buspirone hydrochlor buspirone monotherapy buspirone hydrocwellbutrin buspar buspar overdose buspar experience
????? ?????? ??????? ??? ????? ???????? ?? ?????????!Loading…
Very neat article post.Much thanks again. Cool.
Hi there, just wanted to say, I liked this article. It was inspiring. Keep on posting!
buy cheap generic duphaston buy generic forxiga 10 mg buy empagliflozin 25mg generic
buy generic fludrocortisone imodium 2 mg for sale buy loperamide pills
There is clearly a bunch to know about this. I feel you made some good points in features also.Feel free to surf to my blog … Cool Portable Air Conditioner
buy generic prasugrel prasugrel 10 mg cost tolterodine ca
oral monograph order mebeverine 135 mg without prescription buy cilostazol 100 mg online cheap
I will immediately seize your rss feed as I can’t in finding your e-mail subscription link or newsletter service.Do you’ve any? Kindly let me recognise in order that I may subscribe.Thanks.
ivermectin generic name ivermectin 1 cream generic
ed pills sold at walmart — lng ed pills does guy ferrari sponser ed pills
You carry a wonderful ability. Your penning abilities are exceptional. All the bests for uploading material via the internet and training your users.
brand ferrous 100mg ascorbic acid 500 mg tablet sotalol 40 mg us
generic pyridostigmine 60 mg mestinon 60 mg for sale brand rizatriptan 10mg
betahistine over the counter order betahistine 16 mg generic benemid ca
buy zovirax generic xalatan online order exelon for sale online
generic prilosec buy generic singulair for sale metoprolol tablet
premarin 0.625mg cost generic dostinex 0.25mg purchase viagra generic
wow, awesome article.Really looking forward to read more. Cool.
purchase micardis pill buy molnupiravir 200mg online cheap order molnunat 200mg
Looking forward to reading more. Great post.Really thank you! Want more.
I value the article post.Really thank you! Fantastic.
Fantastic blog. Awesome.
purchase cenforce generic order cenforce online cheap buy chloroquine cheap
generic cialis india buy generic viagra viagra 50mg cheap
My relatives always say that I am wasting mytime here at net, however I know I am gettingknow-how everyday by reading thes fastidious articlesor reviews.
I cannot thank you enough for the blog article.Much thanks again. Much obliged.
buy cefdinir no prescription brand prevacid 15mg lansoprazole over the counter
Very informative article post.Really looking forward to read more. Really Cool.
Good blog you have got here.. Itís hard to find high quality writing like yours nowadays. I seriously appreciate individuals like you! Take care!!
buy provigil medication order provigil 100mg without prescription prednisone 10mg generic
ama hydroxychloroquine hydroxychloroquine uses
order generic isotretinoin 40mg cheap azithromycin zithromax tablet
wow, awesome blog.Really looking forward to read more. Really Great.
azithromycin 250mg price omnacortil 20mg tablet order neurontin 800mg pills
Great post.Really looking forward to read more. Fantastic.
legit canadian pharmacy austria pharmacy online – canadian pharmacy world coupons
casino slot games lasix 100mg us lasix generic
protonix medication buy phenazopyridine for sale buy pyridium generic
I appreciate you sharing this blog article.Really looking forward to read more. Really Great.
no deposit free spins buy cheap doxycycline buy generic albuterol for sale
Very informative article.Much thanks again. Cool.
Thanks-a-mundo for the article. Fantastic.
Thank you ever so for you post.Much thanks again. Awesome.
symmetrel 100 mg canada amantadine order avlosulfon tablet
win real money online casino order stromectol 12mg for sale ivermectin 8 mg
I really liked your article.Much thanks again. Great.
This is one awesome article.Much thanks again. Really Great.
I loved your article post. Want more.
Really appreciate you sharing this article post.Thanks Again. Keep writing.
Really informative post.Really thank you! Cool.
Appreciate you sharing, great post.Really thank you! Awesome.
I really liked your blog post.Thanks Again. Will read on…
I value the article. Great.
replica rolex structure is really serious workable never ever crucial nice.
best online casino for money order synthroid online cheap levothyroxine sale
Really enjoyed this article.Thanks Again. Want more.
medrol 8mg for sale buy medrol no prescription where can i buy triamcinolone
order clomid 50mg online buy cheap azathioprine order azathioprine without prescription
buy vardenafil 10mg sale buy tizanidine pills for sale cost tizanidine
coversyl canada purchase allegra online cheap fexofenadine online order
dilantin 100mg cost cyclobenzaprine for sale oxytrol without prescription
Novomatic games are known for their spectacular graphics, which are amongst the best in the online casino industry. They’re also famed for their bonus features and big jackpots. You can play these and many other titles from the Austrian developer in any Novomatic online casino. Free play Novomatic slots should be your starting point – it’s best to try the goods before you buy them. You can find top slot sites with Novamatic software on our list compiled by a team of experts. If you’re wondering which of its slots to try first, the best Novomatic slots, based on popularity, theme, features and payouts, are: Here is a list of the top ten Novomatic slots games ranked by RTP: Playtech developed this slot machine, featuring a lovely chill beach bar theme. Of course, in this article, we are just showing you some available slot machines, but there are many other options at the best USA online casinos. If you want to know more about Drinks on the Beach, know that this lovely slot machine can make you enjoy the vibes of summer by experiencing the relaxation of the setting and the simplicity of the game functions.
https://wiki-saloon.win/index.php?title=Oneida_bingo_hall
Enjoy up to S$150 cash reward when you open your OCBC 360 Account and credit your salary within 2 months. Valid till 31 August 2023. Limited redemptions available. Warning: Amazon Slots Casino IE has certain sections of Terms and Conditions that we consider to be unfair to the casino’s players. Because of this, we advise you to look for a casino with fair rules or at least pay special attention to this casino’s Terms and Conditions if you decide to play at it. Smazon Slots Casino only publish the house edge RTP figures for the slots games that have them already inbuilt into their game files – this is in violation of the terms of their UKGC license which stipulates that the RTP figures must be provided for ALL games offered. Further to this even the RTPs given can only be viewed once a player had opened an account with this operator – not best practice.
claritin sale buy claritin 10mg without prescription priligy online buy
purchase ozobax generic ozobax brand buy generic toradol online
lioresal us buy amitriptyline generic toradol 10mg for sale
amaryl 4mg cost etoricoxib 60mg without prescription etoricoxib where to buy
Very informative article.Much thanks again. Awesome.
order alendronate 35mg for sale purchase colcrys order furadantin pills
I think this is a real great post.Much thanks again. Great.
Really enjoyed this article.Really thank you! Fantastic.
I cannot thank you enough for the blog.Really looking forward to read more. Want more.
Thanks so much for the blog.Thanks Again. Great.
Thanks a lot for the article post.Really looking forward to read more. Really Great.
Im thankful for the blog post.
Im grateful for the blog post.Thanks Again.
generic inderal 10mg buy inderal sale plavix generic
Wow! This blog looks exactly like my old one! It’s on aentirely different topic but it has pretty much the same layout anddesign. Great choice of colors!
I appreciate you sharing this article.Thanks Again. Cool.
A round of applause for your article post.Thanks Again. Great.
Thanks for the post.Really looking forward to read more. Keep writing.
This is one awesome article post.Really looking forward to read more. Fantastic.
order pamelor buy methotrexate 10mg paracetamol oral
order xenical 60mg generic buy asacol online diltiazem cheap
coumadin 5mg usa reglan over the counter order metoclopramide 20mg online
azelastine ca acyclovir us irbesartan price
pepcid 20mg pills pepcid 40mg cost oral tacrolimus 1mg
buy nexium generic buy remeron 30mg without prescription buy topamax tablets
Thanks-a-mundo for the article post.Thanks Again. Cool.
purchase allopurinol online cheap allopurinol sale buy crestor 20mg pill
I think this is a real great article. Keep writing.
buy imitrex generic order dutasteride generic order avodart online cheap
Appreciate you sharing, great blog post.Thanks Again. Awesome.
buspar 10mg without prescription order zetia 10mg online cheap cordarone 100mg over the counter
I am so grateful for your blog. Will read on…
ranitidine without prescription purchase zantac generic brand celecoxib 200mg
motilium order tetracycline drug tetracycline 500mg tablet
order tamsulosin 0.4mg for sale where to buy simvastatin without a prescription simvastatin order
I cannot thank you enough for the blog post. Cool.
Thanks for the post. Fantastic.
I loved your article post. Really Great.
do my research paper cheap research paper writers assignment sites
I loved your blog.Much thanks again. Will read on…
Im grateful for the blog article.Thanks Again. Much obliged.
order aldactone sale propecia 5mg for sale purchase proscar for sale
Hey, thanks for the article post.Really looking forward to read more. Keep writing.
Im thankful for the post.Thanks Again. Cool.
Really appreciate you sharing this blog.Much thanks again. Much obliged.
Im thankful for the blog article. Fantastic.
Really appreciate you sharing this article post.Really thank you! Keep writing.
aurogra 50mg without prescription order estradiol 1mg pills buy estradiol 1mg generic
I loved your article.Really thank you! Great.
order forcan online ampicillin online buy order generic ciprofloxacin 1000mg
Very neat article post. Awesome.
Thanks a lot for the article.Really looking forward to read more. Will read on…
Major thanks for the article post.Really thank you! Cool.
buy lamictal generic lamotrigine 50mg us vermox 100mg ca
Awesome article.
flagyl cheap order metronidazole cephalexin 250mg for sale
Hey, thanks for the post. Much obliged.
Wow, great blog.Really looking forward to read more.
Enjoyed every bit of your article post.Really looking forward to read more. Really Cool.
retin canada order tretinoin generic avanafil oral
cleocin us buy sildenafil 50mg generic fildena price
I am so grateful for your blog article.Much thanks again. Will read on…
buy nolvadex 20mg online cheap buy tamoxifen pills for sale symbicort over the counter
tadalafil 10mg generic order diclofenac 50mg online cheap buy indomethacin 75mg online
I really like and appreciate your post. Fantastic.
I really enjoy the post. Awesome.
Thanks-a-mundo for the post.Really thank you! Fantastic.
Hello! I’ve been reading your blog for a while now and finally got the courage to go ahead and give you a shout out from Houston Tx! Just wanted to tell you keep up the good work!
I really like and appreciate your article post.Thanks Again. Much obliged.
buy cheap axetil robaxin oral buy methocarbamol cheap
buy generic lamisil 250mg list online gambling real money poker online cash
trazodone without prescription desyrel 50mg pills order clindamycin generic
Wow, great article post.Thanks Again. Fantastic.
buy aspirin generic online casino gambling ladbrokes uk
pay essay writing easy essay outline buy cefixime tablets
I think this is a real great blog article.Really looking forward to read more. Much obliged.
Looking forward to reading more. Great blog article. Keep writing.
I really liked your article post.Really looking forward to read more. Want more.
Thanks so much for the post.Really thank you! Really Cool.
help write my paper best online casinos slot casino
brand amoxicillin 500mg arimidex us macrobid online buy
A big thank you for your blog article. Cool.
Im obliged for the blog.Really looking forward to read more. Great.
Great, thanks for sharing this blog.Much thanks again. Will read on…
I appreciate you sharing this post. Fantastic.
Its not my first time to pay a quick visit
this web page, i am browsing this site dailly and take fastidious facts from
here everyday.
calcitriol for sale online fenofibrate 160mg canada generic tricor 200mg
catapres medication clonidine brand order tiotropium bromide 9 mcg sale
I needed to thank you for this wonderful read!! I definitely enjoyed every little bit of it. I’ve got you bookmarked to look at new stuff you postÖ
Really appreciate you sharing this blog post.Thanks Again. Really Great.
Im thankful for the article post.Much thanks again. Great.
city house apartments rentberry scam ico 30m$ raised monterey lakes apartments
Howdy! I simply wish to offer you a huge thumbs up for the excellent information you have here on this post. I’ll be coming back to your blog for more soon.
tear you apart arbor place apartments parkhouse apartments
Great, thanks for sharing this blog post.Thanks Again. Really Cool.
prescription acne treatment products oxcarbazepine 300mg usa purchase oxcarbazepine generic
Thanks so much for the blog post.Much thanks again. Want more.
In 2007, Sony Online Entertainment produced a PC version of the show titled Wheel of Fortune Deluxe, sharing publishing duties with Encore, Inc. Encore followed that up with a “Super Deluxe” version of the game in 2008. Wheel of Fortune Casino is loaded with exciting Wheel of Fortune slots featuring 7-figure + progressive jackpots! There are thousands of games to choose from, including poker, roulette, blackjack, and the latest video slots. Of all the games, our favorite is Wheel of Fortune Megaways. This exciting, interactive slot machine allows you to enjoy the buzz of the classic game show. Wheel of Fortune Megaways has free spins, puzzles, and shopping! It features 6 reels, up to 10 wheels, and 1 million + paylines! This slot is great for high rollers and recreational players, with a min bet of just $0.2 and a crazy $500 max bet.
https://www.instapaper.com/p/13167352
Prizes pokemoncoders pokemon-firered-extended-cheats To kickstart the solver, though, I decided to try every machine four times, and use the results to initialize the posterior probabilities. With only four pulls it was hard to draw any conclusions about which were good or bad machines, since the probability distributions overlapped greatly — when they weren’t identical. Copyright © 2023 ROMSFUN.COM – All rights reserved What the the odds of the various slot machines in the Game Corner? Which machines have the best odds? As far as I know, I don’t think there is any difference between the slot machines in LeafGreen. There is speculation that the machine on the far left has slightly better odds, but there is no concrete evidence for this.
order minocin 100mg capsules terazosin drug requip ca
ivermectin for pig lice ivermectin injection for sheep
buy uroxatral 10mg pills oral uroxatral 10 mg best thing for heartburn
Fantastic blog article.Much thanks again. Great.
oral femara 2.5 mg buy abilify without prescription aripiprazole cost
best sleep aids for seniors fda approved hair loss products 100 guaranteed weight loss pills
This was an outstanding article. I loved it. I’ll be back to see some more. Thanks !
order medroxyprogesterone 10mg sale order biltricide 600 mg pill generic hydrochlorothiazide 25 mg
Great blog post.Really looking forward to read more. Really Great.
drugs that help stop smoking best painkillers for arthritis nhs buy prescription online pain medication
pharmacy technician continuing education free online canada pharmacy sarasota fl
I am so grateful for your post. Great.
Appreciate you sharing, great blog post.Thanks Again. Cool.
order periactin generic buy ketoconazole 200 mg online order ketoconazole 200 mg sale
buy medication for herpes online recent diabetic drug commercial new diabetic pill commercial
I think this is a real great blog article.Much thanks again. Fantastic.
Great blog.Really looking forward to read more. Keep writing.
Muchos Gracias for your post.Much thanks again. Really Great.
order duloxetine 20mg online buy modafinil 100mg without prescription modafinil 200mg pills
anti fungal tablets for skin prescription strength antifungal cream blood pressure medication equivalent chart
I really enjoy the post. Really Cool.
phenergan without prescription where to buy promethazine without a prescription ivermectin cream cost
Thanks for the post.Really looking forward to read more. Will read on…
relieve stomach ulcer pain fast erosions in the stomach location how to get rid of a urine infection fast
Thank you ever so for you blog.