how to run java program in notepad

0 votes
how to run java program in notepad
Oct 17, 2023 in Java by Avinash
• 520 points
2,964 views

1 answer to this question.

0 votes

To run a Java program in Notepad:

  1. Write your Java code in Notepad.
  2. Save the file with a .java extension.
  3. Open Command Prompt.
  4. Navigate to the directory containing the Java file.
  5. Compile with javac YourFileName.java.
  6. Run with java YourFileName.
answered Oct 17, 2023 by anonymous
• 520 points