What does public void set in Java, do? I’ve read that it ‘Sets the value of a named option’ so is it simply like a variable assignment in the form of a function or something? (Sorry, not really a Java programmer.)
Here is the code I’m analyzing:
public void set(String s, int value) {
set(s, new Integer(value));
}
What’s inside it anyway? (the set(s,new Integer(value)) I’m thinking the two ‘sets’ are entirely different things.
Please Help. Sorry if this is a simple question, but I’m just trying to confirm my thoughts about the subject.
public void set(String s, int value)is a method declaration, which is followed by a method body inside{…}.The line after the
{:is a method call, which calls the
set-method withsandnew Integer(value)as arguments.