Difference between constructor and methods|Java tutorial for beginners|Learn java|java tutorial|java

Published: 08 May 2021
on channel: Clever Edge
37
1

#constructor #methods #constructorandmethods

Constructor

It is a block of code that initializes created object.
A constructor doesn’t have a return type.
constructor and method are different.

Constructor has same name as the class but method name may be same or not as like the class name.

Methods

The method is a block of code which only runs when it is called.

We can pass the data, known as parameters, into a method.

Methods are used to perform certain actions, and they are also known as functions.


subscribe to my channel

constructor in Java

   • Constructor in java|Types of java construc...  

Methods in Java

   • Java-Methods|Methods in java|methods in ja...  


On this page of the site you can watch the video online Difference between constructor and methods|Java tutorial for beginners|Learn java|java tutorial|java with a duration of hours minute second in good quality, which was uploaded by the user Clever Edge 08 May 2021, share the link with friends and acquaintances, this video has already been watched 37 times on youtube and it was liked by 1 viewers. Enjoy your viewing!