Java Getting started common sense finishing

Source: Internet
Author: User

1. Exception type:

Exceptionin thread "main" Java.lang.NoClassDefFoundError:HelloWorld. ----is usually caused by unnecessary and incorrect classpath.

2. Java Features:

1. Both the characteristics of the compiled language and the characteristics of explanatory language;

2. Automatic garbage collection mechanism; only the memory resources in the heap are recycled; setting the object to null can imply a garbage collection mechanism looking back at resources; Finalize (), System.GC (), the unpredictability of garbage collection;

3. Fully object-oriented: encapsulation, inheritance, polymorphism

4. Single inheritance;

5. Java refuses to use a goto statement, but uses Goto as a reserved word;

6. Java is case-sensitive

7. The Boolean type in Java can only be true or false and cannot be replaced by numbers.

8. An array of Java is a reference type

3. Common functions:

System.out.println ("Hello world!"); ----line wrapping after output

Systtem.out.print ("Hello world!"); No line break after----output

Obj.tostring (); ----Return the object "self-describing information": "Class name [email protected]+hashcode" value to tell the outside world of the state information of the object

4. Common Sense

1. JDK 7 replaces the GMS with the G1 garbage collector (Tag cleanup garbage collector)

2. Ide:eclipse (IBM to Community), Netbeans,wsad (IBM), Jetbrains,intellij idea, VisualAge (IBM), Jdeveloper,symantec

3. Javac: Compiling Java source code

4. Java: Execute a compiled. Class tool

5. Javadoc: Tools to generate the API (the types of parameters are sequential, javadoc-help view details)

6. Java consists of 48 keywords, two reserved words, three special direct quantities (null,true,false)

7. Java uses a 16-bit Unicode character set as the encoding method

5. Why?

1. Why is Java a single-inheritance?

Because multiple inheritance can cause confusion in the inheritance structure and greatly reduce the understandable nature of the program, Java does not support multiple inheritance.

2. Object-oriented and object-based differences?

In general, object-based also uses objects, but it is not possible to generate new object types with existing object templates and then create new objects. That is, there is no "inheritance" and "polymorphic" characteristics.

6. Common classes or methods

instanceof----Determine whether an object referenced by a reference variable is an instance of a type

Java.util.Arrays----A tool class for manipulating arrays, providing a number of static methods

7. Development tool Attention points

Javac Test.java----Generate a compiled file in the current directory and will not automatically build a directory for packaging based on the package, because it is not in the Packages folder, so I do

Javac-d. Test.java----Ibid, but will be in the current directory based on the package directory, if there is a package information must be compiled

Java com.eli.java.Test----To use the full name of a. class file that contains package information to execute

Java Getting started common sense finishing

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.