Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java :: operator

// :: is a new operator included in Java 8 that is used to
// refer a method of an existing class. Comes in useful when using optionals:
Optional<Soundcard> soundcard = ...;
soundcard.ifPresent(System.out::println);
 
PREVIOUS NEXT
Tagged: #java #operator
ADD COMMENT
Topic
Name
5+3 =