AP® Computer Science A glossary
Dot operator
Course: AP® Computer Science A Shows up in: Unit 1: Using Objects and Methods
The . used to call a method on an object (p.grow(5)) or a class method with the class name (Math.abs(-3)).
Appears in the course and exam description (CED): 1.10.A.21.14.A.1
Before the dot comes the object (for an instance method) or the class name (for a class method); after it comes the method call.
String w = "data";
System.out.println(w.length());
System.out.println(Math.abs(-3));
Output:
4
3 Learn it properly, with a checkpoint 1.14 Calling Instance Methods