Fundamentals of Java Programming

Source: Internet
Author: User

1.classpath environment variable * When a Java virtual machine needs to run a class, the basic syntax for the required class file 2.java is found under the path defined in the CLASSPATH environment variable * Java language is strictly case-sensitive * Java program      Consecutive strings in a sentence cannot be written in two lines, for example: System.out.println ("This is the first Java program!");    If you want to write a long string in two lines for readability, you can concatenate the two strings with a plus sign (+), for example: System.out.println ("This is the first" + "Java program!"); Naming rules in 3.java * Package name all letters are lowercase for example: Cn.java.test * class name and interface name capitalize the first letter of each word for example: ArrayList, Iterator * variable name, and method name lowercase, starting with a second word Start each word capitalize for example: Getlinenumber * Constant name All letters are capitalized, and words are underlined between them. For example: Day_of_month4.java variable data type * basic data type 1. numeric Type A.                Integer type (byte,short,int,long) byte:8 bit (1 bytes) short:16 bit (2 bytes) int:32 bit (4 bytes)                long:64 bit (8 bytes) b. Floating-point type (float,double) float:32 bit (4 bytes) double:64 bit (8 bytes) In Java, a decimal number is defaulted to a double type, so when assigning a value to a variable of type float, you must precede the value with the letter f (or lowercase letter f) 2. Character type (char) each char type variable consumes 2 byte 3.     Boolean (Boolean) * reference data type 1. Class 2. Interface (interface)   3. Array 4. Enumeration (enum) 5. Annotations (annotation) 5. Overloading of Methods * The method name is the same in the same class, but the parameter type or the number of parameters in the method with the same name is different 

Fundamentals of Java Programming

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.