{"id":2223,"date":"2018-06-03T14:32:00","date_gmt":"2018-06-03T14:32:00","guid":{"rendered":"https:\/\/www.testingdocs.com\/questions\/?p=2223"},"modified":"2024-08-09T09:03:08","modified_gmt":"2024-08-09T09:03:08","slug":"how-to-create-a-package-in-eclipse-ide","status":"publish","type":"post","link":"https:\/\/www.testingdocs.com\/questions\/how-to-create-a-package-in-eclipse-ide\/","title":{"rendered":"How to create a package in Eclipse IDE?"},"content":{"rendered":"<h2>How to create a package in Eclipse IDE?<\/h2>\r\n<p>In this post, we will learn how to create a package using Eclipse IDE. Using packages resolves name conflicts of Java classes in the application source code. We can have Java classes with the same name in different packages.<\/p>\r\n<h3>Create a Package<\/h3>\r\n<p>Right click on the Project in the Project Explorer.<\/p>\r\n<p><strong>New &gt;&gt; Package<\/strong><\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2227\" src=\"https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Create-Java-Package.png\" alt=\"Java Package\" width=\"1306\" height=\"810\" title=\"\" srcset=\"https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Create-Java-Package.png 1306w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Create-Java-Package-300x186.png 300w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Create-Java-Package-1024x635.png 1024w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Create-Java-Package-768x476.png 768w\" sizes=\"auto, (max-width: 1306px) 100vw, 1306px\" \/><\/p>\r\n<p>Give a package name and click on the Finish button to create package in the Eclipse IDE.<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2228\" src=\"https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Package-Name-Eclipse.png\" alt=\"\" width=\"1693\" height=\"918\" title=\"\" srcset=\"https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Package-Name-Eclipse.png 1693w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Package-Name-Eclipse-300x163.png 300w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Package-Name-Eclipse-1024x555.png 1024w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Package-Name-Eclipse-768x416.png 768w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Package-Name-Eclipse-1536x833.png 1536w\" sizes=\"auto, (max-width: 1693px) 100vw, 1693px\" \/><\/p>\r\n<h3>Package-info<\/h3>\r\n<p>Alternatively, you can create package-info.java by checking the checkbox ( Create package-info.java)\u00a0<\/p>\r\n<p>&nbsp;<\/p>\r\n<p>&#8212;<\/p>\r\n<p>Java Tutorial on this website: <strong><a href=\"https:\/\/www.testingdocs.com\/java-tutorial\/\">https:\/\/www.testingdocs.com\/java-tutorial\/<\/a><\/strong><\/p>\r\n<p>For more information on Java, visit the official website :<\/p>\r\n<p><strong><a href=\"https:\/\/www.oracle.com\/in\/java\/\" rel=\"noopener\">https:\/\/www.oracle.com\/in\/java\/<\/a><\/strong><\/p>\r\n","protected":false},"excerpt":{"rendered":"<p>How to create a package in Eclipse IDE? In this post, we will learn how to create a package using Eclipse IDE. Using packages resolves name conflicts of Java classes in the application source code. We can have Java classes with the same name in different packages. Create a Package Right click on the Project [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29],"tags":[],"class_list":["post-2223","post","type-post","status-publish","format-standard","hentry","category-eclipse","has-post-title","has-post-date","has-post-category","has-post-tag","has-post-comment","has-post-author",""],"_links":{"self":[{"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/posts\/2223","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/comments?post=2223"}],"version-history":[{"count":9,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/posts\/2223\/revisions"}],"predecessor-version":[{"id":23839,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/posts\/2223\/revisions\/23839"}],"wp:attachment":[{"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/media?parent=2223"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/categories?post=2223"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/tags?post=2223"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}