Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

check if object is empty java 8

// Changed EmployeeServive to return an optional, no more nulls!
Optional<Employee> employee = employeeServive.getEmployee();
employee.ifPresent(e -> System.out.println(e.getId()));
Source by softwareengineering.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #check #object #empty #java
ADD COMMENT
Topic
Name
8+6 =