To compile and run a Java program using Notepad, follow these steps:
java -version and javac -version. If both commands display version information, Java is set up correctly.
public class MainApp
{
public static void main(String[] args)
{
System.out.println("Hello Deepak");
}
}
MainApp.java d:\JavaPrograms cd /d D:\JavaPrograms javac MainApp.java
java MainApp
Hello Deepak
Your feedback helps us grow! If there's anything we can fix or improve, please let us know.
Weβre here to make our tutorials better based on your thoughts and suggestions.