This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Employee { | |
private Address addr; | |
private int age; | |
// Getters and setters | |
} | |
class Address { | |
private String streetAddr1; | |
private String streetAddr2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Fraction { | |
private final int num; | |
private final int denom; | |
public Fraction(int num, int denom) { | |
this.num = num; | |
this.denom = denom; | |
} | |
public int getNum() { |
NewerOlder