battle programminga forum for elite programmerswith extreme will powerto sharpen theire skills
 
HomeCalendarFAQSearchMemberlistUsergroupsRegisterLog in
Share | 
 

 java finally is defer on swift

Go down 
AuthorMessage
Moti Barski

Moti Barski

Posts : 271
Join date : 2011-08-02

PostSubject: java finally is defer on swift   Mon Nov 19, 2018 1:35 pm

Code:
   public static String enStar(String word) {
      Boolean fin = false;

      String result = "";
      for (int i = 0; i < word.length() + 2; i++) {
         result += "*";
      }
      try {
         return result;
      }
      finally {
         // this code line runs always before the return, the same as defer in the
         // swift  programming language
         System.out.println("why is this running twice ?!");
      }
   }

see comments in the function above

fast

_________________
MB over and out _______________________     
Back to top Go down
View user profile
 
java finally is defer on swift
Back to top 
Page 1 of 1
 Similar topics
-
» Exception in thread "main" java.net.BindException: Selenium is already running on port 4444. Or some other service is.
» How to compare images selenium, using java
» Test javascript Calendar
» Eclipse setup with selenium RC
» Cannot locate the class Select in web driver

Permissions in this forum:You cannot reply to topics in this forum
battle programmers alliance :: battle programming alliance :: battle programming-
Jump to: