Can anybody explain what Log means in vb.net code? Is it the Logarithm function or some other log event. I did some search on this and I understood that this was for the Logarithm part. However, I do not understand the below line of code if I apply Logarithm to it.
tmp=pBuffer(5)+4
Log("tmp:" & tmp)
Can anyone explain this line of code and what is the equivalent java for the same?
That line of code looks to be logging an event to a log file (or console) rather than the Logarithm mathematical operation.
There are many ways to do logging in Java, but the simplest (though not the nicest) is to do the following:
I’ve translated your example code verbatim as the function
doStuff. If you run it, you’ll get something like the following printed to the console:This code uses Java’s built-in logging facility, which I have not used. If you need sophisticated logging functionality, I recommend SLF4J or log4j.