fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.io.*;
  4.  
  5. /* Name of the class has to be "Main" only if the class is public. */
  6. class Ideone
  7. {
  8. public static void main (String[] args)
  9.  
  10. {
  11. String to = "azg";
  12. String cc = "abc@cba.com.au";
  13. if(to == null || to.isEmpty())
  14. {
  15. to = cc;
  16. cc = null;
  17. System.out.println("to is empty");
  18.  
  19. }
  20. else if(cc == null || cc.isEmpty()){
  21. cc = null;
  22. System.out.println("cc is empty");
  23. }
  24.  
  25. else
  26. {
  27.  
  28. // template.setTo(to);
  29. //check to send email in cc only if user as LM and LM is Active
  30. // template.setCc(cc);
  31. System.out.println("nothig is empty");
  32. }
  33.  
  34.  
  35.  
  36. }
  37. }
Success #stdin #stdout 0.09s 52512KB
stdin
Standard input is empty
stdout
nothig is empty