what does this mean in java code example

Example 1: this obj java meaning

public class Point {
    public int x = 0;
    public int y = 0;
        
    //constructor
    public Point(int x, int y) {
        this.x = x;
        this.y = y;
    }
}

Example 2: java meaning

if (you.mean.equals("java programming language")) {
  System.out.println("Java is a class-based, object-oriented programming language");
} else if (you.mean.equals("java coffee")) {
  System.out.print("the term java comes from an island named 'java', a famous coffee source druing the 1600s ");
}

Example 3: what does ? means in java

if((min >= 2) {
   someval =2;
} else {
   someval =1
}

Example 4: this obj java meaning

public class Point {
    public int x = 0;
    public int y = 0;
        
    //constructor
    public Point(int a, int b) {
        x = a;
        y = b;
    }
}

Tags:

Java Example