Java Conceptual issues

Source: Internet
Author: User

Five elements named by a variable

  • Consists of letters, numbers, "_" and "$"
  • The first letter cannot be a number
  • Case sensitive
  • Cannot use Java reserved words and keywords
  • Can be named in Chinese, but it is not recommended

II. basic data types for Java

  • Integer type: Byte, short, int, long
  • Float type: float, double
  • Character type: Char
  • Boolean Type: Boolean

Iii. three elements of circulation

  • Initialization of a cyclic variable
  • Conditions of the cycle
  • Changes in cyclic variables

Four, array

An ordered set of data sources called arrays

Characteristics:

  • The array must be made up of a collection of the same elements
  • Arrays are ordered linearly, and each element has its own unique precursor element except for the first element, and each element has its own unique successor, except for the last element.
  • Array elements can be accessed by a unique subscript, with the subscript starting from 0

V. Methods

method is used to encapsulate a piece of code that has a specific function, independent logic.

Five Elements of the method:

  • Modifier (public, private, protected, static, final)
  • return value type
  • Method name
  • Parameter type
  • Method body (can be omitted)

Vi. what is the function of return in the method?

In a method that has a return value, returns a value of the specified type.

In a method that has no return value (void method), it is used to end the operation of the current method, that is, the terminating method.

Java Conceptual issues

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.