High efficiency of program execution in compiled languages

Source: Internet
Author: User

Compiled language written by the program before the execution, need a special compilation process, the program compiled into machine language files, such as EXE files, later to run without re-translation, directly using the results of the compilation (EXE file), because the translation is done only once, the runtime does not need to translate, Therefore, the program execution efficiency of the compiled language is high.

1  Packagecom.table;2 3 4 classPenson5 {6     protectedString name;7     protectedString addr;8     protectedString sex;9     protected intAge ;Ten   One      PublicString GetName () { A         returnname; -     } -   the      Public voidsetName (String name) { -          This. Name =name; -     } -   +      PublicString getaddr () { -         returnaddr; +     } A   at      Public voidsetaddr (String addr) { -          This. addr =addr; -     } -   -      PublicString Getsex () { -         returnsex; in     } -   to      Public voidsetsex (String sex) { +          This. Sex =sex; -     } the   *      Public intGetage () { $         returnAge ;Panax Notoginseng     } -   the      Public voidSetage (intAge ) { +          This. Age =Age ; A     } the   +     voidShowitems () -     { $System.out.println ("Name:" +GetName () $+ "Address:" +getaddr () -+ "Gender:" +Getsex () -+ "Age:" +getage ()); the     } - }Wuyi   the classStudentextendsPenson - { Wu     intMathscore; -     intEnglishscore; About   $      PublicStudent (string name, String addr, String sex,intAgeintMathscore,intEnglishscore) { -          This. Mathscore =Mathscore; -          This. Englishscore =Englishscore; -          This. Name =name; A          This. addr =addr; +          This. Sex =sex; the          This. Age =Age ; -     } $   the     voidShowitems () the     { theSystem.out.println ("Name:" +GetName () the+ "Address:" +getaddr () -+ "Gender:" +Getsex () in+ "Age:" +getage () the+ "Math Score:" +Mathscore the+ "English score:" +englishscore); About     } the } the  Public classfourteentable { the      Public Static voidMain (String []args) +     { -Student stu =NewStudent ("Borter", "Beijing", "Boy", 22, 80, 90); the Stu. Showitems ();Bayi     } the } the  

High efficiency of program execution in compiled languages

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.