create pen class write methods in java OOP code example
Example: anonymous object java example
//for Java 10
boolean result = true;
var objResult = new Object() {
boolean success = result;
};
System.out.println(objResult.success);
//for Java 10
boolean result = true;
var objResult = new Object() {
boolean success = result;
};
System.out.println(objResult.success);