1

I have written a java code, it is inside the java programs folder on my desktop. How can I compile and run it ?

1
  • 2
    The program you want is javac Commented Jan 26, 2021 at 5:55

1 Answer 1

0
  1. Open command prompt
  2. Go to your java programs folder i.e. type cd java programs
  3. Compile your code i.e. type javac YOUR_JAVA_PROGRAM_NAME.java
  4. Above command generates a java class file which is your executable file, to run it type java YOUR_PROGRAM_NAME
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.