Which statement about the method in the Java programming language is true? a.If we want to call
Question:
Which statement about the method in the Java programming language is true?
a.If we want to call a public method of Class A from Class B, we only can call the method via the object of Class A.
b.A non-static public method can be called by the object of the class at anywhere, but the non-static private method can only be called inside the same class.
c.The formal arguments and the actual arguments of a method can have different data types.
d.If a method does not return any value, we don't need to specify anything in the return type of its definition.
e.Assuming a method contains a local variable with the same name as a global variable, by default, using the variable inside the method will refer to the global value because the global variable has a higher priority than the local variable.
Discrete Mathematics and Its Applications
ISBN: 978-0073383095
7th edition
Authors: Kenneth H. Rosen