Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

📚 The CoCalc Library - books, templates and other resources

132938 views
License: OTHER
1
public final class Math {
2
3
/**
4
* Don't let anyone instantiate this class.
5
*/
6
private Math() {}
7
8
public class Main {
9
public static void main(String[] args) {
10
Apple myApple = new Apple();
11
if (myApple instanceof Fruit) {
12
System.out.println("It's true!");
13
}
14
}
15
}
16
17
if (this.getClass() != other.getClass())
18
return false;
19
20