0

What exactly are constructors needed for in java?

pls I'm a beginner in java. l've been trying to understand the need for constructors when you still create objects in the main method and have instance variable in the class.? pls what exactly are constructors for and what is difference between an variable and a parameter? thanks

16th Nov 2018, 11:18 PM
onwuazombe tobechukwu
onwuazombe tobechukwu - avatar
2 Answers
0
16th Nov 2018, 11:21 PM
Ulisses Cruz
Ulisses Cruz - avatar
0
What is the difference between an instance variable and a parameter with respect to a constructor?
16th Nov 2018, 11:58 PM
onwuazombe tobechukwu
onwuazombe tobechukwu - avatar