Android interfaces are generally developed in Java, so for C ++ ,. for net personnel, there is an adaptation process for understanding and writing. Recently, I have referred to the relevant materials and used some of these Java basics as an example.CodeTo record the familiar process of the platform.
File directory (mainly related to Java syntax)
Annotdefine. Java
Annotdemo. Java classdemo. Java
Coderesource_en_us.java collection. Java
Demo. Java example_en_us.properties
Generic. Java initdemo. Java
Io. Java localresource. Java
Nest. Java prefsdemo. Java
Threaddemo. Java
:
Http://cid-56b433ad3d1871e3.office.live.com/self.aspx/.Public/AndroidJava.rar
For the syntax differences between Java and C #, refer to an interesting website:
Http://www.harding.edu/fmccown/java_csharp_comparison.html
The following are some brief descriptions (JDK). For specific usage and descriptions, refer to the above examples.
Collections framework
Package: Java. util
Interface
Core and hierarchical relationships
Iterable, collection, list, set, sortedset, queue, map, and sortedmap.
Implementation class
Implementation conventions:
Abstract begins with an abstract class, used to reduce repeated code for multiple implementations
The specific class ends with the interface name, such as the list interface implemented by arraylist
The following is a list of implementation classes in JDK:
Abstractcollection, abstractlist, abstractqueue, abstractsequentiallist, abstractset,
Keywords, arraydeque, arraylist, attributelist, concurrentlinkedqueue, queue, delayqueue, enumset, hashset, delimiter, linkedblockingdeque, delimiter, linkedhashset, sorted list, delimiter, role, rolelist, role, stack, synchronousqueue, treeset, Vector
Tool
Array and container traversal methods
Collection <string> Col =...
Iterator iter = col. iterator ();
While (ITER. hasnext ())
System. Out. println (ITER. Next ());
For (string S: COL)
System. Out. println (s );
Nested type nested type
There are four kinds of Nested classes: static member classes, nonstatic member classes, anonymous classes, and local classes. The latter three categories are known as inner classes.
Annotation type annotations
Java. Lang
Deprecated
Override
Suppresswarnings
Java. Lang. Annotation
Documented
Inherited
Retention
Target
Javax. Annotation
Generated
Postconstruct
Predestroy
Resource
Resources