Note: Write and output the Java program. Note the java program output.

Source: Internet
Author: User

Note: Write and output the Java program. Note the java program output.

Create a file named demo. java

// Write the framework File

Public class Demo {

// Write the entry file

Public static void main (String [] args ){

System. out. print ("In fact, in this world, nothing can be successful as long as you work hard. After all, there are a lot of people who work hard. in a big city, the only thing that is lacking is the dream, and the best is the excellent people. However, if you are good, what can you do? Everyone has different comments on excellence. If you are not good enough, you can leave yourself irreplaceable. There are two alternative ways: one is to do what others do not want to do, and the other is to do what others can do well to do excellence. "); // Output to the screen

}

}

 

Note: The class name must be consistent with the file name. {And} correspond to each other one by one, which is indispensable.

The following code runs the program. Open cmd and check that java is installed under the drive letter.

Enter d: Press enter and enter javac Demo. java press enter and enter java Demo, for example:

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.