Constructors | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Constructors

Can some tell me the differrence between when a “constructor receives a String” & a “constructor that requires values”? If possible can I get an example?...... THX

20th Sep 2019, 1:13 PM
Jacques Cozart
Jacques Cozart - avatar
1 Answer
0
In the first class it is supposed to be 3 fields that a constructor recieves a string and 2 ints. The second class its the same three fields but they require values?...... Im not sure how that is supposed to look?
20th Sep 2019, 1:36 PM
Jacques Cozart
Jacques Cozart - avatar