Computer Science, asked by TbiaSamishta, 1 year ago

Which of the following is used to invoke an instance method in Java ?(a) The name of the object, colon(:) and the name of the method(b) The name of the object, dot(.) and the name of the method(c) The name of the class, colon(:) and the name of the method(d) The name of the class, dot(.) and the name of the method

Answers

Answered by Secondman
3

ANSWER: b

The name of the object, dot(.) followed by the name of the method is used to invoke an instance method in Java.  

However, in order to access a class method/ static method- The name of the class, dot (.) and the name of the method are used.

Objects in java are an instance of their respective class.

The order cannot be reversed in which the method comes first and the object goes second.

The dot operator is used separate between object and method.

Answered by djgaming26
0

Answer:

b) is the correct answer ok please mark me as brain list you can also search this question

Similar questions