Difference between revisions of "Java/C2/Parameterized-constructors/English-timed"

From Script | Spoken-Tutorial
Jump to: navigation, search
(Created page with '{| border=1 || ''Time''' || '''Narration''' |- | 00:02 | Welcome to the Spoken Tutorial on '''parameterized''' '''constructor''' in''' java'''. |- | 00:08 | In this tutorial…')
 
 
(10 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
{| border=1
 
{| border=1
|| ''Time'''
+
|| '''Time'''
 
|| '''Narration'''  
 
|| '''Narration'''  
 
|-
 
|-
| 00:02
+
| 00:02
 
| Welcome to the Spoken Tutorial on '''parameterized''' '''constructor''' in''' java'''.
 
| Welcome to the Spoken Tutorial on '''parameterized''' '''constructor''' in''' java'''.
  
 
|-
 
|-
| 00:08
+
|00:08
| In this tutorial we will learn  
+
|In this tutorial we will learn:
  
 
|-
 
|-
| 00:10
+
|00:10
|About a '''parametrized''' '''constructor'''
+
|About a '''parameterized''' '''constructor'''.
  
 
|-
 
|-
| 00:13
+
|00:13
| And to create a '''parameterized''' '''constructor'''
+
| And to create a '''parameterized''' '''constructor'''.
 
+
 
+
 
+
  
 
|-
 
|-
 
| 00:17
 
| 00:17
| Here we are using  
+
| Here we are using:
 
+
'''Ubuntu version 11.10 OS'''
* Ubuntu version 11.10 OS
+
'''Java Development kit  1.6'''
* Java Development kit  1.6
+
And ''' Eclipse 3.7.0'''
*And Eclipse 3.7.0
+
 
+
 
+
  
 
|-
 
|-
| 00:29
+
|00:29
|   To follow this tutorial you must know  
+
|To follow this tutorial, you must know  
  
 
|-
 
|-
| 00:32
+
|00:32
 
|how to create a default '''constructor''' in '''java''' using '''eclipse'''.
 
|how to create a default '''constructor''' in '''java''' using '''eclipse'''.
 
  
 
|-
 
|-
| 00:37
+
|00:37
|If not, for relevant tutorials please visit our website which is as shown,
+
|If not, for relevant tutorials, please visit our website which is as shown.http://www.spoken-tutorial.org  
 
+
('''http'''://'''www.spoken'''-'''tutorial.org''')
+
 
+
  
 
|-
 
|-
| 00:44
+
|00:44
 
|What is a '''parameterized''' '''constructor'''?
 
|What is a '''parameterized''' '''constructor'''?
 +
 
|-
 
|-
| 00:48
+
|00:48
|A '''constructor''' that have parameter is called a '''parameterized''' '''constructor'''.
+
|A '''constructor''' that has parameters is called a '''parameterized constructor'''.
 
+
  
 
|-
 
|-
| 00:55
+
|00:55
|It can have one or more than one parameter.
+
|It can have one or more than one parameters.
  
 
|-
 
|-
| 00:59
+
|00:59
| Let us now create a '''parameterized constructor.'''
+
|Let us now create a '''parameterized constructor.'''
 
+
  
 
|-
 
|-
| 01:03
+
|01:03
|So in the eclipse, I have  ''' Student.java '''file.
+
|So in the '''eclipse''', I have  ''' Student.java '''file.
  
 
|-
 
|-
| 01:09
+
|01:09
 
|We created this file in the previous tutorial.
 
|We created this file in the previous tutorial.
  
 
|-
 
|-
| 01:15
+
|01:15
| Now Inside the '''constructor''' we will give the variables their default value.
+
|Now, inside the '''constructor''' we will give the variables their default value.
 
+
  
 
|-
 
|-
| 01:21
+
| 01:21
|So '''''roll_number '''is''' '''equal''' '''to''' zero''''' instead of '''''ten'''''.
+
|So '''roll_number '''is equal to zero instead of ten.
  
 
|-
 
|-
| 01:27
+
| 01:27
|And '''''name''' is equal to '''null''''' instead of '''''Raman'''''.  
+
|And '''name''' is equal to '''null''' instead of '''Raman'''.  
  
 
|-
 
|-
|   01:33
+
|01:33
| Then type '''''System '''dot''' out '''dot''' println I am a  default constructor.'''''
+
|Then type '''System '''dot''' out '''dot''' println "I am a  default constructor".'''
 
+
  
 
|-
 
|-
| 01:55  
+
|01:55  
|So we have created a '''constructor''' with no parameters.  
+
|So, we have created a '''constructor''' with no '''parameters'''.  
  
 
|-
 
|-
| 02:00
+
|02:00
|In java, such constructor is also called a '''default''' '''constructor'''.
+
|In java, such constructor is also called a '''default constructor'''.
  
 
|-
 
|-
| 02:07
+
|02:07
|   Now we will create another '''constructor'''.
+
|Now we will create another '''constructor'''.
  
 
|-
 
|-
| 02:11
+
|02:11
|So type '''''Student''' parentheses.''
+
|So, type: '''Student''' parentheses.
  
 
|-
 
|-
| 02:17
+
|02:17
|Inside ''parenthesis'' '''''int the_roll_number '''''comma''''' String the_name.'''''
+
|Inside parenthesis '''int the_roll_number '''comma''' String the_name'''.
  
 
|-
 
|-
| 02:36
+
|02:36
|   So what we have done, is declared a '''constructor''' with parameters.
+
|So, what we have done is declared a '''constructor''' with parameters.
  
 
|-
 
|-
| 02:43
+
|02:43
|The name of the '''constructor''' '''Student''' that is the class name.
+
|The name of the '''constructor''' is  '''Student''' that is the '''class''' name.
  
 
|-
 
|-
| 02:49
+
|02:49
|   Inside the paranthesis we have given two parameters to the '''constructor'''.
+
|Inside the parentheses, we have given two parameters to the '''constructor'''.
  
 
|-
 
|-
| 02:57
+
|02:57
 
|We can give any number of parameters to the constructor.
 
|We can give any number of parameters to the constructor.
  
 
|-
 
|-
| 03:02
+
| 03:02
| Now inside curly brackets type
+
| Now, inside curly brackets type:
  
 
|-
 
|-
| 03:05
+
|03:05
|'''''System '''dot''' out '''dot''' println I am a parameterized constructor '''''
+
|'''System '''dot''' out '''dot''' println "I am a parameterized constructor"'''.
  
 
|-
 
|-
| 03:29
+
|03:29
| Then '''''roll_number''' is equal to '''the_roll_number'''.''
+
|Then, '''roll_number''' is equal to '''the_roll_number'''.
  
 
|-
 
|-
| 03:43
+
|03:43
|And'' '''name''' is equal to '''the_name'''.''
+
|And '''name''' is equal to '''the_name'''.
  
 +
|-
 +
|03:53
 +
|So, we have created a  '''constructor''' with '''parameters'''.
  
|-
 
|  03:53
 
|So we have created a  '''constructor''' with '''parameters'''.
 
 
|-
 
|-
 
| 03:58
 
| 03:58
Line 152: Line 139:
 
|-
 
|-
 
| 04:02
 
| 04:02
| So in the main method type; '''student stu2 '''equal to'''' new student''' within parentheses '''11''' comma in double quotes '''Raju'''
+
|So, in the '''main method''' type: '''student stu2 '''equal to''' new student''' within parentheses '''11''' comma in double quotes '''Raju'''.
 +
 
 
|-
 
|-
 
| 04:28
 
| 04:28
| Let's call the '''studentDetail ''' method.  
+
|Let's call the '''studentDetail ''' method.  
 +
 
 
|-
 
|-
 
| 04:31
 
| 04:31
| So type,'''stu2.studentDetail'''.
+
| So, type: '''stu2.studentDetail'''.
 
   
 
   
 
 
|-
 
|-
| 04:38  
+
| 04:38  
| '''Save''' and '''Run''' the program
+
| '''Save''' and '''Run''' the program.
  
 
|-
 
|-
| 04:44
+
| 04:44
| We see the '''output''' on the console.
+
| We see the '''output''' on the console.
  
 
|-
 
|-
| 04:48
+
| 04:48
| The '''default''' '''constructor''' is called first.
+
| The '''default constructor''' is called first.
  
 
|-
 
|-
| 04:52
+
| 04:52
|It initializes the variables to their default value.
+
|It initializes the variables to their default values.
  
 
|-
 
|-
| 04:56
+
| 04:56
|Then the '''parameterizerd''' '''constructor''' is called.
+
|Then the '''parameterized''' '''constructor''' is called.
  
 
|-
 
|-
| 05:00
+
| 05:00
|It initializes the variables to the values that are passed as the argument.
+
|It initializes the variables to the values that are passed as the arguments.
  
 
|-
 
|-
| 05:05
+
|05:05
 
|That is 11 and Raju.
 
|That is 11 and Raju.
  
 
|-
 
|-
| 05:08
+
| 05:08
| Let us see how the '''parametrized''' '''constructor''' works.
+
| Let us see how the '''parameterized''' '''constructor''' works.
  
 
|-
 
|-
| 05:12
+
| 05:12
 
|When we call the '''parameterized''' '''constructor''', we pass two values  to it.
 
|When we call the '''parameterized''' '''constructor''', we pass two values  to it.
  
 
|-
 
|-
| 05:18
+
| 05:18
|These are called arguments.
+
|These are called '''arguments'''.
  
 
|-
 
|-
| 05:22
+
| 05:22
| The value '''''11''''' is copied to the parameter '''''the_roll_number'''''.
+
| The value 11 is copied to the parameter '''the_roll_number'''.
  
 
|-
 
|-
| 05:31
+
| 05:31
|And  the  value'''''Raju''''' is copied  to the parameter '''''the_name'''''.
+
|And  the  value '''Raju''' is copied  to the parameter '''the_name'''.
  
 
|-
 
|-
| 05:41
+
| 05:41
|   Then the value of '''''the_roll_number''''' is assigned to '''''roll_number'''''.
+
| Then the value of '''the_roll_number''' is assigned to '''roll_number'''.
  
 
|-
 
|-
| 05:50
+
|05:50
|And the value of '''''the_name''''' is assigned to '''''name'''''.
+
|And the value of '''the_name''' is assigned to '''name'''.
  
 
|-
 
|-
| 05:55
+
| 05:55
|Hence  in the  ''output'' we see '''''11 '''''and''''' Raju.'''''  
+
|Hence, in the  output  we see '''11 ''' and ''' Raju.'''  
  
 
|-
 
|-
| 06:00
+
|06:00
| Let us see the common errors, when we call a '''parameterised''' '''constructor.'''
+
| Let us see the common errors when we call a '''parameterized''' '''constructor.'''
  
 +
|-
 +
| 06:07
 +
|Suppose, we pass a single argument to the '''constructor'''.
  
 
|-
 
|-
| 06:07
+
| 06:11
|Suppose we pass a single argument to the '''constructor'''.
+
| So remove '''Raju'''.
  
 
|-
 
|-
| 06:11
+
| 06:15
| So remove '''''Raju'''''.
+
| We get an error. It states that '''“The constructor Student with parameter (int) is undefined.”'''
  
 
|-
 
|-
| 06:15
+
| 06:24
| We get an error. It states that '''“The constructor Student with parameter (int) is undefined.”'''
+
|So, the number of arguments must match the number of parameters.
  
 
|-
 
|-
| 06:24
+
| 06:30
|So the number of arguments must match the number of parameters.
+
|Here we can retype '''Raju''' and resolve the error.
  
 
|-
 
|-
| 06:30
+
| 06:36
|Here we can retype '''''Raju''''' and resolve the error.
+
|-
+
06:36
+
 
| Alternatively, what we can  do is define another '''constructor''' with a single parameter.
 
| Alternatively, what we can  do is define another '''constructor''' with a single parameter.
  
 
|-
 
|-
 
| 06:42
 
| 06:42
|   Let us  do that
+
| Let us  do that.
  
 
|-
 
|-
| 06:45
+
|06:45
|So''''' Student '''within''' '''paranthesis''' int '''r '''number.'''''
+
|So,''' Student '''within parentheses''' int '''r_ number'''.
  
 
|-
 
|-
| 07:01   
+
|07:01   
|Inside''''' '''curly''' '''brackets, type  ''' System '''dot''' out '''dot''' println'''''
+
|Inside curly brackets, type: ''' System '''dot''' out '''dot''' println'''
 
   
 
   
 
|-
 
|-
| 07:13
+
|07:13
|I am a '''constructor''' with a single parameter.
+
|'''"I am a constructor with a single parameter"'''.
  
 
|-
 
|-
| 07:29
+
|07:29
|Then '''''roll_number''''' ''is equal to''' r number'''''
+
|Then '''roll_number''' is equal to''' r_ number'''.
  
 
|-
 
|-
| 07:48
+
|07:48
| '''Save''' the file.
+
| '''Save''' the file.
  
 
|-
 
|-
| 07:51
+
| 07:51
 
|We see that the error is resolved  when we define the '''constructor'''.
 
|We see that the error is resolved  when we define the '''constructor'''.
  
Line 283: Line 271:
 
|-
 
|-
 
| 08:02
 
| 08:02
| On the console we see that the roll number is assigned the value '''''11.'''''
+
| On the console we see that the roll number is assigned the value '''11.'''
  
 
|-
 
|-
| 08:08  
+
| 08:08  
|While name is '''''null''''' since the '''constructor''' takes only one argument.
+
|While name is '''null''' since the '''constructor''' takes only one argument.
  
 
|-
 
|-
| 08:18
+
| 08:18
| Let us now call back our constructor with two parameters.
+
| Let us now call back our constructor with two parameters.
  
 
|-
 
|-
| 08:23
+
|08:23
|So type''''' Student stu3 '''is''' '''equal''' '''to''' new Student.'''''
+
|So, type''' Student stu3 '''is equal to''' new Student.'''
  
 
|-
 
|-
 
| 08:40  
 
| 08:40  
| ''' 11 '''comma''' Raju.'''''
+
| '''11 '''comma''' Raju.'''
  
 
|-
 
|-
| 08:46
+
|08:46
|Then'''''Stu3 '''dot''' studentDetail'''''
+
|Then '''Stu3 '''dot''' studentDetail'''.
  
|-
+
|
| 08:58
+
|08:58
| Suppose here we pass '''''11''''' as '''String,''' so add ''double'' ''quotes.''
+
|Suppose here we pass '''11''' as '''String''',so add double quotes.
  
 
|-
 
|-
| 09:08
+
|09:08
 
|We get an error.
 
|We get an error.
  
 
|-
 
|-
| 09:10
+
| 09:10
|It states that '''“The constructor Student String commaString is undefined.”'''
+
|It states that '''“The constructor Student String comma String is undefined.”'''
  
 
|-
 
|-
| 09:17
+
| 09:17
|So even the datatype of the argument must match with that of the parameter.
+
|So even the data type of the argument must match with that of the parameter.
  
 
|-
 
|-
|   09:25
+
| 09:25
| So now remove the ''quotes'' and '''Save''' the file.
+
| So now remove the quotes and '''Save''' the file.
  
 
|-
 
|-
| 09:32
+
|09:32
 
|Now we do not see an error.
 
|Now we do not see an error.
  
 
|-
 
|-
| 09:35
+
| 09:35
 
| So  '''Run''' the program.
 
| So  '''Run''' the program.
  
 
|-
 
|-
| 09:38
+
| 09:38
| In the output we see three '''constructors.'''
+
| In the output we see three '''constructors.'''
  
 
|-
 
|-
| 09:42
+
| 09:42
 
|The first one is the '''default''' '''constructor.'''
 
|The first one is the '''default''' '''constructor.'''
  
 
|-
 
|-
| 09:45
+
| 09:45
|The second one is the'''Constructor''' with one parameter.
+
|The second one is the '''Constructor''' with one parameter.
  
 
|-
 
|-
| 09:50
+
| 09:50
|And this third one is the'''Constructor''' with two parameters.
+
|And this third one is the '''Constructor''' with two parameters.
  
 
|-
 
|-
| 09:56
+
| 09:56
|This is how we create'''Parameterised constructor''' in '''java'''.
+
|This is how we create '''parameterized constructor''' in java.
 
+
  
 
|-
 
|-
| 10:05
+
| 10:05
 
| Why '''constructor'''?
 
| Why '''constructor'''?
 +
 
|-
 
|-
| 10:07
+
| 10:07
| The variables in a class must be initialized each time an instance is created.
+
|The variables in a class must be initialized each time an instance is created.
 
+
  
 
|-
 
|-
| 10:13
+
|10:13
 
|It can be tedious to initialize all the variables.  
 
|It can be tedious to initialize all the variables.  
 
  
 
|-
 
|-
| 10:18
+
|10:18
|So java allows objects to initialize themselves when they are created.
+
|So, java allows objects to initialize themselves when they are created.
 
+
  
 
|-
 
|-
| 10:25
+
|10:25
 
|This is performed through the use of a '''constructor'''.  
 
|This is performed through the use of a '''constructor'''.  
  
 
|-
 
|-
| 10:30
+
|10:30
| So in this tutorial, we have learnt  
+
|So in this tutorial, we have learnt:
  
 
|-
 
|-
| 10:33
+
|10:33
|To create '''parameterized''' '''constructor.'''
+
| To create '''parameterized''' '''constructor.'''
  
 
|-
 
|-
| 10:36  
+
|10:36  
 
|Functionality of '''parameterized''' '''constructor.'''
 
|Functionality of '''parameterized''' '''constructor.'''
  
 
|-
 
|-
| 10:39
+
|10:39
 
|And the advantage of using '''constructor.'''
 
|And the advantage of using '''constructor.'''
  
 
|-
 
|-
| 10:44
+
|10:44
| For self assessment, create a class '''Employee'''.
+
|For self assessment, create a class '''Employee'''.
  
 
|-
 
|-
| 10:48
+
|10:48
 
|Create '''constructors''' with different number of parameters.
 
|Create '''constructors''' with different number of parameters.
  
 
|-
 
|-
 
|10:53
 
|10:53
|To know more about the Spoken Tutorial Project
+
|To know more about the Spoken Tutorial project,
 +
 
 
|-
 
|-
| 10:56
+
|10:56
| Watch the video available at [http://spoken-tutorial.org/What_is_a_Spoken_Tutorial http://spoken-][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial tutorial.org/What_is_a_Spoken_Tutorial]
+
|watch the video available at [http://spoken-tutorial.org/What_is_a_Spoken_Tutorial].
 +
 
 
|-
 
|-
| 11:02
+
|11:02
| It summarizes the Spoken Tutorial project  
+
| It summarizes the Spoken Tutorial project.
  
 
|-
 
|-
| 11:06
+
|11:06
|If you do not have good bandwidth, you can download and watch it  
+
|If you do not have good bandwidth, you can download and watch it.
 
+
 
+
  
 
|-
 
|-
|   11:10
+
| 11:10
|   The Spoken Tutorial Project Team
+
| The Spoken Tutorial project team:
  
 
|-
 
|-
| 11:12
+
| 11:12
| Conducts workshops using spoken tutorials  
+
| Conducts workshops using spoken tutorials.
  
 
|-
 
|-
| 11:14
+
| 11:14
| Gives certificates for those who pass an online test  
+
| Gives certificates to those who pass an online test.
  
 
|-
 
|-
| 11:18
+
| 11:18
 
|For more details, please write to contact@spoken-tutorial.org  
 
|For more details, please write to contact@spoken-tutorial.org  
 
 
  
 
|-
 
|-
| 11:24
+
| 11:24
| Spoken Tutorial Project is a part of the Talk to a Teacher project  
+
| Spoken Tutorial Project is a part of the Talk to a Teacher project.
  
 
|-
 
|-
| 11:28
+
| 11:28
| It is supported by the National Mission on Education through ICT, MHRD, Government of India  
+
| It is supported by the National mission on Education through ICT, MHRD, Government of India.
  
 
|-
 
|-
| 11:34
+
| 11:34
| More information on this Mission is available at  
+
|More information on this mission is available at: [http://spoken-tutorial.org/NMEICT-Intro].  
 
+
* [http://spoken-tutorial.org/NMEICT-Intro http://spoken-tutorial.org/NMEICT-Intro]
+
 
+
 
+
  
 
|-
 
|-
| 11:43
+
|11:43
| This brings us to   the end of the tutorial.
+
|This brings us to the end of the tutorial.
  
 
|-
 
|-
| 11:46
+
|11:46
|Thanks for joining.
+
|Thanks for joining.This is Prathamesh Salunke, signing off.  
 
+
|-
+
|  11:47
+
|This is Prathamesh Salunke signing off.  
+
 
+
 
Jai Hind.  
 
Jai Hind.  
  
 
|}
 
|}

Latest revision as of 16:04, 9 March 2017

Time Narration
00:02 Welcome to the Spoken Tutorial on parameterized constructor in java.
00:08 In this tutorial we will learn:
00:10 About a parameterized constructor.
00:13 And to create a parameterized constructor.
00:17 Here we are using:

Ubuntu version 11.10 OS Java Development kit 1.6 And Eclipse 3.7.0

00:29 To follow this tutorial, you must know
00:32 how to create a default constructor in java using eclipse.
00:37 If not, for relevant tutorials, please visit our website which is as shown.http://www.spoken-tutorial.org
00:44 What is a parameterized constructor?
00:48 A constructor that has parameters is called a parameterized constructor.
00:55 It can have one or more than one parameters.
00:59 Let us now create a parameterized constructor.
01:03 So in the eclipse, I have Student.java file.
01:09 We created this file in the previous tutorial.
01:15 Now, inside the constructor we will give the variables their default value.
01:21 So roll_number is equal to zero instead of ten.
01:27 And name is equal to null instead of Raman.
01:33 Then type System dot out dot println "I am a default constructor".
01:55 So, we have created a constructor with no parameters.
02:00 In java, such constructor is also called a default constructor.
02:07 Now we will create another constructor.
02:11 So, type: Student parentheses.
02:17 Inside parenthesis int the_roll_number comma String the_name.
02:36 So, what we have done is declared a constructor with parameters.
02:43 The name of the constructor is Student that is the class name.
02:49 Inside the parentheses, we have given two parameters to the constructor.
02:57 We can give any number of parameters to the constructor.
03:02 Now, inside curly brackets type:
03:05 System dot out dot println "I am a parameterized constructor".
03:29 Then, roll_number is equal to the_roll_number.
03:43 And name is equal to the_name.
03:53 So, we have created a constructor with parameters.
03:58 Now let's call this constructor.
04:02 So, in the main method type: student stu2 equal to new student within parentheses 11 comma in double quotes Raju.
04:28 Let's call the studentDetail method.
04:31 So, type: stu2.studentDetail.
04:38 Save and Run the program.
04:44 We see the output on the console.
04:48 The default constructor is called first.
04:52 It initializes the variables to their default values.
04:56 Then the parameterized constructor is called.
05:00 It initializes the variables to the values that are passed as the arguments.
05:05 That is 11 and Raju.
05:08 Let us see how the parameterized constructor works.
05:12 When we call the parameterized constructor, we pass two values to it.
05:18 These are called arguments.
05:22 The value 11 is copied to the parameter the_roll_number.
05:31 And the value Raju is copied to the parameter the_name.
05:41 Then the value of the_roll_number is assigned to roll_number.
05:50 And the value of the_name is assigned to name.
05:55 Hence, in the output we see 11 and Raju.
06:00 Let us see the common errors when we call a parameterized constructor.
06:07 Suppose, we pass a single argument to the constructor.
06:11 So remove Raju.
06:15 We get an error. It states that “The constructor Student with parameter (int) is undefined.”
06:24 So, the number of arguments must match the number of parameters.
06:30 Here we can retype Raju and resolve the error.
06:36 Alternatively, what we can do is define another constructor with a single parameter.
06:42 Let us do that.
06:45 So, Student within parentheses int r_ number.
07:01 Inside curly brackets, type: System dot out dot println
07:13 "I am a constructor with a single parameter".
07:29 Then roll_number is equal to r_ number.
07:48 Save the file.
07:51 We see that the error is resolved when we define the constructor.
07:58 Let's Run the program.
08:02 On the console we see that the roll number is assigned the value 11.
08:08 While name is null since the constructor takes only one argument.
08:18 Let us now call back our constructor with two parameters.
08:23 So, type Student stu3 is equal to new Student.
08:40 11 comma Raju.
08:46 Then Stu3 dot studentDetail. 08:58 Suppose here we pass 11 as String,so add double quotes.
09:08 We get an error.
09:10 It states that “The constructor Student String comma String is undefined.”
09:17 So even the data type of the argument must match with that of the parameter.
09:25 So now remove the quotes and Save the file.
09:32 Now we do not see an error.
09:35 So Run the program.
09:38 In the output we see three constructors.
09:42 The first one is the default constructor.
09:45 The second one is the Constructor with one parameter.
09:50 And this third one is the Constructor with two parameters.
09:56 This is how we create parameterized constructor in java.
10:05 Why constructor?
10:07 The variables in a class must be initialized each time an instance is created.
10:13 It can be tedious to initialize all the variables.
10:18 So, java allows objects to initialize themselves when they are created.
10:25 This is performed through the use of a constructor.
10:30 So in this tutorial, we have learnt:
10:33 To create parameterized constructor.
10:36 Functionality of parameterized constructor.
10:39 And the advantage of using constructor.
10:44 For self assessment, create a class Employee.
10:48 Create constructors with different number of parameters.
10:53 To know more about the Spoken Tutorial project,
10:56 watch the video available at [1].
11:02 It summarizes the Spoken Tutorial project.
11:06 If you do not have good bandwidth, you can download and watch it.
11:10 The Spoken Tutorial project team:
11:12 Conducts workshops using spoken tutorials.
11:14 Gives certificates to those who pass an online test.
11:18 For more details, please write to contact@spoken-tutorial.org
11:24 Spoken Tutorial Project is a part of the Talk to a Teacher project.
11:28 It is supported by the National mission on Education through ICT, MHRD, Government of India.
11:34 More information on this mission is available at: [2].
11:43 This brings us to the end of the tutorial.
11:46 Thanks for joining.This is Prathamesh Salunke, signing off.

Jai Hind.

Contributors and Content Editors

Gaurav, PoojaMoolya, Ranjana, Sandhya.np14, Sneha