Android应用程序大多使用Android SDK(软件开发工具包)以JAVA语言开发。其他语言,如C、C++、Scala等,也可以用于开发Android应用程序,但JAVA是Android应用程序开发的首选和主要使用的编程语言。因此,如果您是Android初学者,那么在开始Android开发之前,首先需要学习JAVA语言和完整的OOPS概念知识。
JAVA is a programming language which is used in Android App Development. It is class based and object oriented programming whose syntax is influenced by C++. The primary goals of JAVA is to be simple, object-oriented, robust, secure and high level.
JAVA application runs on JVM (JAVA Virtual Machine) but Android has it’s own virtual machine called Dalvik Virtual Machine (DVM) optimized for mobile devices.
Eclipse:
Being a JAVA programmer you will need some tools or software to code and run it. Lots of tools are available over the web but we recommend you to use Eclipse for learning JAVA since it is the most common tool used for Android Development alongwith Android Studio. So getting habitual with Eclipse and its shortcuts will be bonus in your Android journey. Other then Eclipse you can also prefer IntelliJ or netbeans for learning JAVA.
Other Tools: IntelliJ and Netbeans
Android Studio? Are you thinking of using Android Studio for learning JAVA? Then Android Studio is solely meant for Android programming. IntelliJ, Eclipse and Netbeans are for real Java codings.
Below are the tutorials on JAVA:
Topics (Follow the link to read tutorial) | Description |
---|---|
Variables | Learn about variables and how they are created for storing information in memory |
Data Types | Learn about Data Types (i.e. byte, int, char etc) which is basically a type of information we want to store in variable. |
String | String is nothing but a character array for example “AbhiAndroid” is a string of 11 characters as shown. |
Operators | In computer programming Operator is a symbol that tells the compiler to perform specific action which can be mathematical or logical. |
Keywords | Keywords in JAVA are predefined list of keywords which has a specific meaning and cannot be used in the Java programming language as an identifier, such as the name of a variable, method, class, function, or label. |
类和对象 | 当我们看到周围某种类型的对象或事物时,类的概念就开始发挥作用,这种类型对象背后的共同理念或蓝图被称为类。对象是类的实例。 |
方法 | 方法是执行特定任务的自包含代码块。 |
如果,则否则 | 如果允许我们根据条件控制程序流,无论是否执行代码。 |
For循环 | 在JAVA中,For语句是最常用的lopping语句,它迭代一系列数字。 |
While做While | While是一种先评估条件的循环。如果条件求值为true,则将执行块{}内的代码,如果条件求值为false,则将跳出while循环。 |
阵列 | 数组可以定义为用于存储同构数据类型的连续内存位置。简单地说,它是一个可以存储单一数据类型的多个值的变量。 |
遗产 | 它是一种允许类使用另一个类的状态和行为的机制。 |
抽象 | 这是一个隐藏内部工作并只显示必要细节的过程。 |
方法重写 | 方法重写意味着在具有不同功能的子类中再次重写父类前面描述的方法。 |
方法重载 | 如果括号内的参数列表不同,则允许多个方法具有相同的名称。 |
界面 | 它能够实现100%的抽象,因为它只包含那些没有实现的方法(即没有主体的方法)。 |
封装 | 将数据成员和成员函数打包到单个单元(即类)中称为封装。 |
多态性 | 它意味着一个名字和许多职责。多态性是指一个事物具有多种不同形式的能力(态射)。 |
Constructor | A constructor is a special method that is called whenever an object is created using the new keyword. |
Access Modifier | Java provides us a many number of access modifiers to set access levels for class, variables, methods and constructor. |
Composition | Composition is a special case of aggregation. In other words, a restricted aggregation is called composition. When an object contains the other object and the contained object cannot exist without the other object, then it is called composition. |
List | It is the sequence of elements, or we can say collection of elements, on which user has precise control over where an elements are inserted. |
ArrayList | It is a dynamic data structure in which you can add or remove any number of elements and those elements are stored in ordered sequence. |
LinkedList | It stores data in the forms of nodes, which is divided into two parts, first part stores the data and second part points to the next node by storing the address of that node. |
Vector | It is type of data structure that implements List Interface. It is very much similar to ArrayList as it also maintains insertion order, that is elements are retrieved in same order as they are added into it. |
Map | It is the mapping between a key and a value i.e. it contains values based on the key. Each key value pair is often known as an entry, As Map contains only unique keys, we can also say Map interface maps unique keys to its corresponding values. |
HashMap | It is a type of Collection, that stores our data in a pair such that each element has a key associated with it. The pair of key and value is often known as Entry and these entries can have only unique keys. |
LinkedHashMap | In Addition to all the functionalities of HashMap Class, the functionality of maintaining the insertion is added into LinkedHashMap and to attain this functionality all the entries(key and value) are linked to each other using doubly-linked list. |
树图 | 它只能存储唯一的元素,即不允许重复值,它不能将键存储为null,但可以存储null值。它与HashMap非常相似,关键区别在于它根据键值保持递增顺序。 |
设置 | 它是一组元素,或者我们可以说是元素的集合,永远不可能包含重复的元素。 |
哈希集 | 它是一种实现Set接口并扩展AbstractSet接口的Java集合。它使用哈希表存储数据。 |
LinkedHashSet | 它是一种集合类型,具有HashSet类的所有功能,不允许存储重复的元素,并且允许其中包含null元素。 |
有序树 | 在TreeSet中,所有值都按自然顺序存储,就像所有整数值都按升序存储一样,字符串根据字典值存储。除了添加维护自然排序的功能外,树集不允许空值。 |
迭代器 | Java迭代器是属于集合框架的接口,它允许我们遍历集合对象并访问该集合的元素。 |
列表迭代器 | 仅用于列表接口的特殊类型的迭代器称为ListIterator |