+ 1

What is the difference (explicit and implicit parameter in java) ?

17th Jan 2018, 10:15 PM
rocco kedis
rocco kedis - avatar
2 Answers
+ 2
Is it okay to do this in C++? I quit Java years back. The principle is the same. I think you need to understand these terms first. Explicit: Written in the code. Example: int main (int argc, char** argv) Implicit: "Assumed" by the compiler or interpreter. Example: int main () The argc and argv parameters are there, but clearly the programmer won't be using them, however they're mandatory so a modern C++ compiler sorta fills them in for you. To oversimplify: In real life, 4 + 3 * 2 will be 10, not 14. Because of precedence, there's an implicit parenthesis 4 + (3 * 2) in our sum. When speaking of implicit parameters, the argc/argv example somewhat illustrates the concept (at least in C++). Hope this helps.
17th Jan 2018, 11:12 PM
non
0
thanks , it helps . have a nice day
18th Jan 2018, 6:51 AM
rocco kedis
rocco kedis - avatar