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 : 293
Join date : 2011-08-02

java finally is defer on swift Empty
PostSubject: java finally is defer on swift   java finally is defer on swift EmptyMon 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 _______________________     :trueogre:
Back to top Go down
View user profile
 
java finally is defer on swift
Back to top 
Page 1 of 1
 Similar topics
-
» How to compare images selenium, using java
» Cannot locate the class Select in web driver
» Selenium RC
» Retrieving number of rows in a table
» Selenium IDE to java with flow control

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