Back
The (.) operator is also called a member operator which is used to access the member of a package or a class.
Example:
public class test { void display() { double d = 89.3; int i = (int)d; System.out.println(i); } public static void main(String args[]) { Sample s = new Sample(); s.display(); } }
public class test {
void display() {
double d = 89.3;
int i = (int)d;
System.out.println(i);
}
public static void main(String args[]) {
Sample s = new Sample();
s.display();
31k questions
32.8k answers
501 comments
693 users