aboutsummaryrefslogtreecommitdiff
path: root/usage_examples/GetterSetterExample_pre.jpage
blob: 9ef0532c0dc33e515d391b24074ad6bf8adeec86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
import lombok.AccessLevel;
import lombok.Getter;
import lombok.Setter;

public class GetterSetterExample {
	@Getter @Setter private int age = 10;
	@Setter(AccessLevel.PROTECTED) private String name;
	
	@Override public String toString() {
		return String.format("%s (age: %d)", name, age);
	}
}