Fork me on GitHub

Introduction and exercises to the general SARL syntax

Note If you don’t know how to solve an problem, or what is the function to be used, you could search on Internet for the answer using the API of the Java programming language. Indeed, since SARL is fully compatible with the Java API, you could use all the types or functions that are defined in this Java API.

1. Exercise 1


Twinkle, twinkle, little star,
	How I wonder what you are! 
		Up above the world so high,   		
		Like a diamond in the sky. 
Twinkle, twinkle, little star, 
	How I wonder what you are

Answer

2. Exercise 2

Current date and time:
2014-07-05 14:34:14

Answer

3. Exercise 3

r = 1.1;
Area = 3.8013271108436504

Answer

4. Exercise 4

Answer

5. Exercise 5

List : ['3', ' 5', ' 7', ' 23']

Answer

6. Exercise 6

Answer

7. Exercise 7

Answer

8. Exercise 8

Answer

9. Exercise 9

Note: Use ‘GregorianCalendar’ type from the Java API.

Answer

10. Exercise 10

Answer

11. Exercise 11

Answer

12. Exercise 12

Answer

13. Exercise 13

Answer

14. Exercise 14

Answer

15. Exercise 15

Answer

16. Exercise 16

Answer

17. Exercise 17

Answer

18. Exercise 18

Answer

19. Exercise 19

Answer

20. Exercise 20

Answer

21. Exercise 21

3 -> [1, 5, 8, 3] : True
-1 -> [1, 5, 8, 3] : False

Answer

22. Exercise 22

Answer