Java Interview Questions and Answers - New Version In Hindi #9(Part-5)

2,078 views · Published 19 December 2017 · 16:49 · Indexed 23 September 2026

Channel: Surya Automation Tech · 2017 · Science & Technology

Watch on YouTube

This videos have basic  java interviews questions and answers about  method and constructor and also discuss about how to create constructor  in java.

What is Method or Member Function In Java.?
Difference between function and M.F.?
Why we are creating Methods.?
How many types of Methods in java.? 
What is Constructor..? Its type and why we use the constructor.?
What is the difference between Method and Constructor.?
Constructor-
It is a special type of member function or method, which have following characteristics from a normal member function:-
a) Its name must be same as the class name.
b) It has no explicit return type.
c) Programmer can’t call the constructor explicitly. It is implicitly called when the object is created.
d) The main use of the constructor is to initialize the data with default values at object creation time.
NOTE: - Apart from the data initialization, constructor does the following tasks-
a) Object creation.
b) Method calling.
c) Starting a thread.
d) Any operation can be performed in a constructor that can be performed in a method.
Etc…
# Syntax to define the constructor- 
ClassIdentifier (args if any)
{
Body of the constructor
}
# Syntax to constructor calling-
New ClassIdentifier (args if any);
# Rule-
In Java, when we are not creating any constructor in a program, then the java compiler adds a default constructor in the byte code in order to initialise the default values in the program and this is not a parameterised constructor.


OOps ques/ans session-1 url:-
https://www.youtube.com/watch?v=xYaH5ZmKbzA&index=1&list=PLnfapp4Woqpq1VOZuvB0Gb_pe7By2cF3_

OOps ques/ans session-2 url:-
https://www.youtube.com/watch?v=T6kRMnyM0ro&index=2&list=PLnfapp4Woqpq1VOZuvB0Gb_pe7By2cF3_

OOps ques/ans session-3 url:-
https://www.youtube.com/watch?v=a4MiDc2rrxE&index=3&list=PLnfapp4Woqpq1VOZuvB0Gb_pe7By2cF3_

OOps ques/ans session-4 url:-
https://www.youtube.com/watch?v=qvLMFyEqjyk&index=4&list=PLnfapp4Woqpq1VOZuvB0Gb_pe7By2cF3_

https://www.youtube.com/watch?v=K3vYHJh0lcE&t=62s

https://www.youtube.com/watch?v=IpsXqpIQHtI&t=25s

https://www.youtube.com/watch?v=SOTjxjbCgmc&t=25s

https://www.youtube.com/watch?v=8jxCCzonDMU&t=25s

Connect on Socials:-

Facebook:- https://www.facebook.com/AndroJavaTech4U/
Twitter:- https://twitter.com/AndroJavaTech4U
Google Plus:- https://plus.google.com/u/0/+AndroJavaTech4U
LinkedIn:- https://www.linkedin.com/in/androjavatech4u/

More from this channel