{"id":1058,"date":"2025-12-05T16:33:55","date_gmt":"2025-12-05T16:33:55","guid":{"rendered":"https:\/\/javigomez.org\/?p=1058"},"modified":"2025-12-05T16:33:55","modified_gmt":"2025-12-05T16:33:55","slug":"nombres-por-pantalla","status":"publish","type":"post","link":"https:\/\/javigomez.org\/index.php\/2025\/12\/05\/nombres-por-pantalla\/","title":{"rendered":"Nombres por pantalla"},"content":{"rendered":"\n<pre class=\"wp-block-preformatted\">Pedir nombres por pantalla hasta que se deje vac\u00edo. Sacar los nombres por orden alfab\u00e9tico.<\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>import java.util.Arrays;\nimport java.util.Scanner;\n\npublic class Tr01 {\n    public static void main(String&#91;] args) {\n        \/*\n        Pedir nombres por pantalla hasta que se deje vac\u00edo.\n        Sacar los nombres por orden alfab\u00e9tico.\n         *\/\n        Scanner sc = new Scanner(System.in);\n        String nombres&#91;]=new String&#91;0];\n\n        System.out.println(\"Nombre:\");\n        String nom=sc.nextLine();\n\n        while (!nom.equals(\"\")) {\n            nombres= Arrays.copyOf(nombres,nombres.length+1);\n            nombres&#91;nombres.length-1]=nom;\n            System.out.println(\"Nombre:\");\n            nom=sc.nextLine();\n        }\n        Arrays.sort(nombres);\n        System.out.println(Arrays.toString(nombres));\n\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-4-3 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Nombres por pantalla\" width=\"1200\" height=\"900\" src=\"https:\/\/www.youtube.com\/embed\/GestO63qPZI?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>Pedir nombres por pantalla hasta que se deje vac\u00edo. Sacar los nombres por orden alfab\u00e9tico.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[203],"class_list":["post-1058","post","type-post","status-publish","format-standard","hentry","category-java","tag-java"],"_links":{"self":[{"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/posts\/1058","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=1058"}],"version-history":[{"count":1,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/posts\/1058\/revisions"}],"predecessor-version":[{"id":1059,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/posts\/1058\/revisions\/1059"}],"wp:attachment":[{"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/media?parent=1058"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/categories?post=1058"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/tags?post=1058"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}