Our class can have several different constructors each with a different number or type of argument when
you use the new keyboard.
You can specify different arguments in the argument list and the correct constructor for those arguments
is called.
So in the previous tutorials I showed you how you can actually create different constructors and how
you can call those constructors.
OK.
In this example here in this application as you can see here as three tokenizer class has multiple constructors.
OK a constructor with only one argument as you can see here.
And a constructor with two arguments.
OK.
When you create your own classes you can define as many constructors as you'll need to implement the
behavior of the class.
No two constructors in a class can have the same number and type of arguments because this is the only
way constructivists are differentiated from each other.
OK.
As I actually showed you in the previous tutorials that your constructors cannot have the same number
and type of arguments.
OK.
Because that is the only way constructors are differentiated from each other.
If a class defines no constructor is a constructor with no arguments is called by default then an object
of the class is created.
So now that you are familiar with Java programming language you may ask yourself that whether the new
operator here this new operator here this new keyboard has an opposite that destroys an object when
it is no longer needed.
Memory management in Java is dynamic and automatic.
When you create a new object Java automatically allocates the proper amount of memory for that object.
You don't have to allocate any memory for objects explicitly.
The Java virtual machine or JVM does that job for you.
OK so that's why Java is so easy and powerful.
OK because Java memory management is automatic.
You don't need to deallocate the memory an object uses when you you're finished using it.
Under most circumstances when you are finished with an object when you are finished with an object you
have created Jova can determine that the object no longer has any life references to it.
OK in other words the object isn't assigned to any value.
Bell is still in use or stored in as it program runs the JVM periodically looks for unused objects and
reclaims the memory that those objects are using.
This process is called Dynamic garbage collection.
You don't have to explicitly free the memory taken up by an object you just have to make sure that you
are not still holding onto an object you want to get rid of.
OK so this is odd.
This is one of the most powerful feature of the Java programming language.
Ok so I think that's enough for this tutorial and indeed this tutorial will going to create our first
Android application.
So if you have any questions please post the discussion in the course and then I'll do my best to answer
your questions.
And thank you very much for watching.
I'll see you in the next tutorial.