Introduction To Android Development - Part1
Introduction To Android Development - Part1
Simple app
Create a app that will show your first name, Last Name, Email after typing these information and
click on the button in the screen (As in the figure shown below).
Java code:
Variables and Arithmetic operations
➔ for java We need IDE
➔ Video: Android Studio doesn’t support plain java code any more what to do Now!
➔ Another IDE: Eclips, Intellij IDEA install it
➔ Open Intellij IDEA
↳ Create new process
↳ select java path to JDK
↳ Uncheck Project template Game
↳ Project Name: Hello world Right click res → new package →
org.mycode.helloworld
↳ Right click package Java Class Hellow
↳ pvsm : Public Static void main
↳ sout :System.out.print
↳ Right click curly brace - Run
↳ //Todo
Variable
➔ int, long, double, float
➔ Character: chat(‘\u :for Unicode), string: It is class in java others are data type
➔ Boolean
Operators
➔ +, -, *, /, %
➔ + can also use to add strings(Concatenate).
Task Game
➔ Syntax 1:
Sting [] student = new String[]; //inside the square bracket size.
➔ Student [1] = "meisam" // inserting value
➔ String start from 0
➔ Syntax 2:
String[] employees = {"meisam" ,"Tom","Sarah"};
➔ int[] number = {1,2,3};
➔ numbers length – give the size of string (string length)
➔ for Comparing string we use
finddata.equals(data[i])
➔ Program to find number of a person from datas.