SHARE
TWEET

Untitled

a guest Apr 25th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ### Null check operator `??`
  2.  
  3. ```
  4. String name = person.name ?? "Adam"
  5. ```
  6.  
  7. ### Optional `?.`
  8. ```
  9. pages[0]?.contributors[0]?.authorDetails?.basicInfo?.firstName ??
  10. ```
  11.  
  12. ### Assign if null `??=`
  13.  
  14. ```
  15. String name ??= "arpit"
  16. ```
  17.  
  18. ### Cascade
  19.  
  20. Create an object and set its variables and return the main object that was created
  21.  
  22. ```
  23. Point p = Point()
  24.           ..x = 4
  25.           ..y = 5;
  26. ```
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top