{"id":2113,"date":"2017-05-24T16:48:00","date_gmt":"2017-05-24T16:48:00","guid":{"rendered":"https:\/\/www.testingdocs.com\/questions\/?p=2113"},"modified":"2024-11-16T14:55:53","modified_gmt":"2024-11-16T14:55:53","slug":"can-we-code-a-java-program-using-notepad-editor","status":"publish","type":"post","link":"https:\/\/www.testingdocs.com\/questions\/can-we-code-a-java-program-using-notepad-editor\/","title":{"rendered":"Can we code a Java program using Notepad editor?"},"content":{"rendered":"<h3>Answer:<\/h3>\r\n<p>Yes, we can code a Java program using a text editor like Notepad editor. The prerequisite of running the program is proper JDK installation and setting of environment variables like PATH etc.<\/p>\r\n<p>Basically, this is how we write a simple java program without the help of any IDE like ( Eclipse, IntelliJ, etc) to learn java programming steps.<\/p>\r\n<h3>Open Notepad<\/h3>\r\n<p>Open Run prompt.<\/p>\r\n<p>Type Notepad.exe to launch the Notepad editor.<\/p>\r\n<h3>Code the Java Program<\/h3>\r\n<p>Write a simple Java program in the Notepad editor.<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\/*----------------------------\r\n * Sample Program -\r\n *  in Notepad Editor \r\n *  www.TestingDocs.com\r\n *\/\r\npublic class SampleDemo {\r\npublic static void main(String[] args) {\r\n  System.out.println(\"This program is written in Notepad editor.\");\r\n  }\r\n}<\/pre>\r\n<p>&nbsp;<\/p>\r\n<h3>Save the program<\/h3>\r\n<p>Save the program with the same name as the class name on to your hard disk. i.e SampleDemo.java<\/p>\r\n<h3>Compile the program<\/h3>\r\n<p>Launch command prompt.<\/p>\r\n<p>Change directory to the Java file.<\/p>\r\n<p>Issue the javac command.<\/p>\r\n<p>\/&gt; javac SampleDemo.java<\/p>\r\n<h3>Run the Program<\/h3>\r\n<p>Issue the java command.<\/p>\r\n<p>\/&gt; java SampleDemo<\/p>\r\n<p>&nbsp;<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2117\" src=\"https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Java-Program-Run-Command-Line.png\" alt=\"\" width=\"1902\" height=\"686\" title=\"\" srcset=\"https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Java-Program-Run-Command-Line.png 1902w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Java-Program-Run-Command-Line-300x108.png 300w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Java-Program-Run-Command-Line-1024x369.png 1024w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Java-Program-Run-Command-Line-768x277.png 768w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Java-Program-Run-Command-Line-1536x554.png 1536w\" sizes=\"auto, (max-width: 1902px) 100vw, 1902px\" \/><\/p>\r\n<p>&nbsp;<\/p>\r\n<!--themify_builder_content-->\n<div id=\"themify_builder_content-2113\" data-postid=\"2113\" class=\"themify_builder_content themify_builder_content-2113 themify_builder tf_clear\">\n    <\/div>\n<!--\/themify_builder_content-->\n","protected":false},"excerpt":{"rendered":"<p>Answer: Yes, we can code a Java program using a text editor like Notepad editor. The prerequisite of running the program is proper JDK installation and setting of environment variables like PATH etc. Basically, this is how we write a simple java program without the help of any IDE like ( Eclipse, IntelliJ, etc) to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2113","post","type-post","status-publish","format-standard","hentry","category-automation","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\/2113","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=2113"}],"version-history":[{"count":3,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/posts\/2113\/revisions"}],"predecessor-version":[{"id":19654,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/posts\/2113\/revisions\/19654"}],"wp:attachment":[{"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/media?parent=2113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/categories?post=2113"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/tags?post=2113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}