Download Introduction to Java Java Syntax o Comments o Variables o

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Learn Java for Android Development
Outline:
Life has never been easier without smartphones and tablets. These devices have become a synonym of
internet device, entertainment gadgets, gaming console, navigational tools and so on. Our increasing
dependencies on them are not merely coincidence, all these wonders, which set aside the cellular
cellphone and personal digital assistant, are all achieved by the powerful mobile platform. Of them all,
one is called ‘Android’. What would you really know about Android? How would you want to harness
the power of Android? This course covers the first journey to Android development.





Introduction to Java
Java Syntax
o Comments
o Variables
o Primitive Data Types
o Commonly Used Java Objects
o Class Permissions and Access
o Conditionals
o Switch Case Statements
o Loops
o Passing By Value vs. By Reference
o Exercise
Checking Object Type with Instanceof
o Using instanceof in Conditional Statements
o Using instaceof in Android Development
o Exercise
Working with Arrays
o What is an Array?
o What can I store in an Array?
o Declaring Arrays
o Modifying Array Content
o Iterating Arrays
o Exercise
Reflection Basics
o Why use Reflection?
o Inspecting Classes
o Inspecting the Constructors Available within a Class
o Inspecting the Fields Available within a Class
o Inspecting the Methods Available within a Class
Inspecting Inner Classes
o Inspecting Member Modifiers
o Inspecting Class Metadata
o Reflection: Handy for Debugging
o Why Not to Use Reflection
Iteration
o

o
o
o
o
o
o

Inner Classes
o
o
o
o
o
o
o

o
o
o
What are (Anonymous) Inner Classes?
Accessing Outside Variables with the Final Keyword
Working with Final Variables in Java
Inner Classes and the “This” variable
Javadoc Code Documentation
o
o
o
o
o
o
o

What is an Inner Class?
Using Static Nested Classes
The Power of Anonymous Inner Classes
Using an Anonymous Inner Class to Define a Listener
Using an Anonymous Inner Class to Start a Thread
Using a Named Inner Class
A Quick Note On Terminology
More On Inner Classes
o

Getting Started: Working with String Array Resources
Challenge #1: Warm-Up Challenge
Challenge #2: Stretch Your Skills
Challenge #3: Reverse!
Challenge #4: It’s All About Character
Challenge #5: Reflect on How Far You’ve Come
What is Javadoc?
How Does Javadoc Work?
Generate Javadoc-style Comments in Eclipse
Simple Javadoc Class Comments
Simple Javadoc Field Comments
Simple Javadoc Method Comments
Generating Javadoc Documentation in Eclipse
String Basics
o
o
o
o
o
o
o
What is a String?
Working with the String Class
Creating Strings
Using Android String Resources
Simple String Iteration
String Modifications: The Basics
String Modifications: Converting to Upper and Lowercase
o
o
o
o
o

String Modifications: Splitting
Simple String Matching
Simple String Searching
Strings and Other Data Types
Strings and Performance
Date and Time Basics
o

What is a Date or Time, Really?
What’s a Developer to Do?
o The External Goal: Be Flexible & Use Standard Controls
o The Internal Goal: Keep Your Dates and Times Generic
o Determining the Current Date and Time
o Creating Date and Time Variables from Scratch
o Formatting Date and Time Data
o Displaying Date and Time Information to the User
Challenge: Strings

Java Shorthand
o
o
o
o
o
o
Tip #1:Java’s Unary Operators (Increment/Decrement Variable Shorthand)
Tip #2:Skipping Temporary Variables (Unnecessary Variables Shorthand)
Tip #3: The Java “this” Keyword and Chaining Methods
Tip #4: Java’s Ternary Operators (If-Else Shorthand)
Tip #5: Empty Statements (Infinite Loop Shorthand)