Joke Collection Website - Joke collection - How to compile java
How to compile java
1. First, create a new text document and enter your own java program.
Here I write a simple java program to demonstrate.
Import java.util. *;
Public class HelloDate {
Public static void main(String[] args)
{
System.out.println ("Hello, yes");
system . out . println(new Date());
}
}
2. Then save it as a java file.
1. select the file-> save as-> with the name "hello.java"->; Select all files.
2. Remember the storage location of this file. (Easy to talk! )
3. open the program-> attachments-> command prompt.
4. Because my java text is saved under F:/java/ (in the java folder under F drive), if you want to compile, you need to enter the java folder through the command prompt first. The specific steps are as follows:
1. Enter disk f: Enter f: and press Enter.
2. enter cd java and press enter.
This has entered. The cd here means to enter.
5. Then call the java compiler to compile.
Enter javac HelloDate. Java, and then press enter.
Then run the results.
Type java HelloDate, and then press Enter.
Experience summary: The general process of running a java program is:
Write source code-> compile-> run-> end.
Precautions:
1. Please be case-sensitive when entering.
Please make sure that your computer is configured with java running environment before operation.
- Previous article:100m 18 How many meters does it run per second?
- Next article:What kind of animation is Bender?
- Related articles
- 4 anime jokes and 4 short stories
- How do you say people's commune in English?
- What kind of person does the "Zongzi" in Super Girl refer to?
- A cynical sentence refuses to fall in love.
- These car inventions, once regarded as a laughing stock, were later found to be very powerful technologies!
- 16-year-old rich girl still needs her mother to support her. She spends 10,000 yuan a day. Why?
- The Story Behind Ten Common Trademarks
- Kneel for Baidu Cloud resources starring Hao Shaowen released by Super Private 1997.
- How to distinguish the original foreign trade children's clothing?
- What does locker room talk mean?