+ 2

How do we access a object in java.

if we have "System.out.println(bestMovie().title) in a java main class What is this kind of method, how do we do to modify the title.

5th Feb 2018, 8:14 AM
DONG PEI
DONG PEI - avatar
2 Answers
+ 14
System.out.println((new bestMovie()).title();
5th Feb 2018, 11:16 AM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 4
More like the attribures of object. Public object variables->object.variable=value; Othere->object.methodthatchangesvariable(optional_parameters)
5th Feb 2018, 8:16 AM
👑 Prometheus 🇾🇬
👑 Prometheus 🇾🇬 - avatar