This Notes is according to the udacity free course :
Android Development for Beginners
Lesson 3A : Object Oriented Programming
Resources
There are 2 easy samples for you to understand what is Java class ?
These are the most important part of this section.
2. create object with factory methods (need to check out the object documentation)
The quiz focus on too much detail,so I provide the answer for you to check.
TextView textView = new TextView(context);
ImageView img = new ImageView(context);
ToggleButton button = new ToggleButton(context);
Toast toast = Toast.makeText(context, text, duration);
The different between object and class
reference:diffen
class is like a blue map for you to construct object
class can include many state and methods
Android Development for Beginners
Lesson 3A : Object Oriented Programming
Resources
What are Java objects
There are 2 easy samples for you to understand what is Java class ?
These are the most important part of this section.
How to create object
1. create object with constructor(regular style)
2. create object with factory methods (need to check out the object documentation)
The quiz focus on too much detail,so I provide the answer for you to check.
TextView textView = new TextView(context);
ImageView img = new ImageView(context);
ToggleButton button = new ToggleButton(context);
Toast toast = Toast.makeText(context, text, duration);
The different between object and class
reference:diffen
class is like a blue map for you to construct object
class can include many state and methods
留言
張貼留言