Android Programming Lecture 2 Intro to Java Programming
Android Programming Lecture 2 Intro to Java Programming
Agenda Classes Objects Overview Packages ·| nheritance Abstraction Interfaces Nested Classes o Static nested Inner classes o Local anonymous classes
Agenda • Classes & Objects Overview • Packages • Inheritance • Abstraction • Interfaces • Nested Classes o Static nested & Inner classes o Local & anonymous classes 2
Objectives Identify the basic parts of a Java program Can identify a class and components of a class Read the codes in an app
Objectives • Identify the basic parts of a Java program • Can identify a class and components of a class • Read the codes in an app 3
Dot if the baby is within 1-2 years old if the baby is happy today if the milk is still hot else else else else.1 while(the baby is not 6 years old) A computer would ask you to What is a baby Define it What is a feeding bottle? Define it 我们该如何教授计 算机去理解我们? What is milk? Define! 4
4 Do{ if the baby is within 1-2 years old if the baby is happy today if the milk is still hot if … else … else …. else … else…} while(the baby is not 6 years old) A computer would ask you to: • What is a baby? Define it! • What is a feeding bottle? Define it! • What is milk? Define! 我们该如何教授计 算机去理解我们?
Class and object
Class and Object 5