Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
themeEclipse
titlelombok example
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@ToString
@NoArgsConstructor
@EqualsAndHashCode
public class Book {
	
	private int id;
	private String name;
	private String author;
	
}

Other useful Annotations:

@ToString

@Builder

@NoArgsConstructor

@RequiredArgsConstructor

@EqualsAndHashCode @AllArgsConstructor and lot more ..


IDE's like Eclipse & IntelliJ does not detect the lombok annotations by default.

...