java--Summary

Source: Internet
Author: User

First, write and run the Java program steps:

1. Writing Java source code
Java source code files are already Java as extensions

Java code format:
Class Name {
Main Method}

2, compile, compile the character file into a byte file

  Open the directory where the Java files are located in DOS
Compile: Javac file name (with extension) if no other information is prompted, and there is a. class extension file in the current folder, the compilation succeeds.

3. Running Java byte file
Command: Java file name (does not include extension because all Java bytecode files end with. Class)
4. Comments
Single-line Comment://comment Content
Multi-line Note 1,
/*
Multiline comment: not compiled into class file
*/

/**
* Multiple lines of comments are compiled into the class file
*/
5. Operators
Statement
Constant
Variable
Data type variable name = value;
int score = 89;

Second, heap, stack, method area

  Heap: Instantiating objects, data storage
Stack: How to run
Method zones: Load classes, assign class member variables, and portals of static methods. Contains a constant pool

three major elements of Java: Inheritance, encapsulation, polymorphism

1.

java--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.