Member
mittie.gottlieb
Beautiful check empty string in Java 😐
1 2 3 4 5 6 7
public Book(Integer id, String name, String author, BigDecimal price, Integer sales, Integer stock, String imgPath) { ... this.stock = stock; if (imgPath != null && !"".equals(imgPath)) { this.imgPath = imgPath; } }