Java Final Summary

Source: Internet
Author: User

The difference between Javac.exe and Java.exe:,

Javac.exe is a compiled . Java file that will be compiled into a . class file ( generated after Javac.exe compilation). Class file is byte code )
Java.exe is a . class file that runs a . Java file after it is compiled.

(Javac.exe compiles java source files into bytecode files , while java.exe is interpreted to run bytecode files ) interpreter or run tool

What type of language does Java belong to:

Compiled language: A ready-to-run program that compiles all the good source programs into binary code. Then, you can run the program directly.

Interpreted language: Translate a good source program into one sentence, then execute one sentence until the end!

Java is very special, Java programs also need to compile, but not directly compiled called machine language, but rather compiled called bytecode, and then interpreted to execute bytecode.

About abstract methods and concepts of abstract classes:

The abstract method must be declared in the abstract class, but there can be no abstract method in the abstract class definition (this is correct, there can be no abstraction in the abstraction Class) but the class of the abstract method must be an abstract method.

Final class: The final decorated class cannot be inherited.

Sting is a final modified class that we can only use without inheriting

Final can not only modify the class, but also can repair

decoration variable, the final modified variable is a constant, can only be assigned once

Notice The difference between final and finally, final is a decorated class or variable, and finally is used in exception handling, such as:

try{}catch () {}finally{}, the role of finally is generally used for things that must be handled, such as closing a connection

Java Final Summary

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.