ObjLongConsumer example

Description

ObjLongConsumer represents an operation that accepts an object-valued and a long-valued argument, and returns no result. This is the reference, long specialization of BiConsumer.

Example

The following example shows how to use ObjLongConsumer.


import java.util.function.ObjLongConsumer;
/*from  w w  w.j  a v  a 2s .co  m*/
public class Main {

  public static void main(String[] args) {
    ObjLongConsumer<String> i  = (s,d)->System.out.println(s+d);
    
   
    i.accept("java2s.com ",Long.MAX_VALUE);
  }
}

The code above generates the following result.