{"id":518,"date":"2023-11-23T23:23:41","date_gmt":"2023-11-23T23:23:41","guid":{"rendered":"https:\/\/javigomez.org\/?p=518"},"modified":"2025-09-29T20:33:55","modified_gmt":"2025-09-29T20:33:55","slug":"u04-03-bucle-for-en-java","status":"publish","type":"post","link":"https:\/\/javigomez.org\/index.php\/2023\/11\/23\/u04-03-bucle-for-en-java\/","title":{"rendered":"U04-03-Bucle for en Java"},"content":{"rendered":"\n<p>En Java, el bucle <code>for<\/code> es una estructura de control de flujo que permite ejecutar un bloque de c\u00f3digo un n\u00famero espec\u00edfico de veces. Se utiliza especialmente cuando se conoce de antemano el n\u00famero exacto de iteraciones que se deben realizar.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public class BucleForEjemplo {\n    public static void main(String&#91;] args) {\n        \/\/ Bucle for que imprime los n\u00fameros del 0 al 4\n        for (int i = 0; i &lt; 5; i++) {\n            System.out.println(\"N\u00famero: \" + i);\n        }\n\n        System.out.println(\"Bucle for terminado.\");\n    }\n}\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Java U04 03 for\" width=\"1200\" height=\"675\" src=\"https:\/\/www.youtube.com\/embed\/Ura2nlpgDp8?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>En Java, el bucle for es una estructura de control de flujo que permite ejecutar un bloque de c\u00f3digo un n\u00famero espec\u00edfico de veces. Se &hellip; <\/p>\n","protected":false},"author":1,"featured_media":519,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[59,161,203],"class_list":["post-518","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java","tag-bucle","tag-for","tag-java"],"_links":{"self":[{"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/posts\/518","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/comments?post=518"}],"version-history":[{"count":1,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/posts\/518\/revisions"}],"predecessor-version":[{"id":919,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/posts\/518\/revisions\/919"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/media\/519"}],"wp:attachment":[{"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/media?parent=518"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/categories?post=518"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/tags?post=518"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}