├── Lesson 01 - الدرس
├── JavaProject
│ ├── .idea
│ │ ├── .gitignore
│ │ ├── misc.xml
│ │ └── modules.xml
│ ├── JavaProject.iml
│ ├── out
│ │ └── production
│ │ │ └── JavaProject
│ │ │ ├── App.class
│ │ │ └── App2.class
│ └── src
│ │ ├── App.java
│ │ └── App2.java
└── app.java
├── Lesson 02 - الدرس
└── App.java
├── Lesson 03 - الدرس
└── App.java
├── Lesson 04 - الدرس
└── App.java
├── Lesson 05 - الدرس
└── App.java
├── Lesson 06 - الدرس
└── App.java
├── Lesson 07 - الدرس
└── App.java
├── Lesson 08 + 09 الدرس
└── App.java
├── Lesson 10 - الدرس
└── App.java
├── Lesson 11 - الدرس
└── app.java
├── Lesson 12 - الدرس
└── App.java
├── Lesson 13 - الدرس
└── App.java
├── Lesson 14 15 - الدرس
└── App.java
├── Lesson 16 - الدرس
└── App.java
├── Lesson 17 - الدرس
└── App.java
├── Lesson 18 - الدرس
└── App.java
├── Lesson 19 - الدرس
└── App.java
├── Lesson 20 - الدرس
└── App.java
├── Lesson 21 - الدرس
└── App.java
├── Lesson 22 - الدرس
└── App.java
├── Lesson 23 - الدرس
├── App.java
└── User.java
├── Lesson 24 - الدرس
└── App.java
├── Lesson 25 - الدرس
└── App.java
├── Lesson 26 - الدرس
└── App.java
├── Lesson 27 - الدرس
└── App.java
├── Lesson 28 - الدرس
└── App.java
├── Lesson 29 - الدرس
└── App.java
├── Lesson 30 - الدرس
└── App.java
├── Lesson 31 - الدرس
└── App.java
├── Lesson 32 - الدرس
└── java
│ └── App
│ ├── .vscode
│ └── launch.json
│ └── App
│ └── app1.java
├── Lesson 33 - الدرس
└── java
│ ├── .vscode
│ └── launch.json
│ ├── package1
│ └── App1.java
│ └── package2
│ └── App2.java
├── Lesson 34 - الدرس
└── package1
│ ├── .vscode
│ └── launch.json
│ └── package1
│ ├── App1.java
│ ├── App2.java
│ └── App3.java
├── Lesson 35 - الدرس
└── java
│ ├── .vscode
│ └── launch.json
│ ├── Admin.java
│ └── User.java
├── Lesson 36 - الدرس
└── java
│ ├── .vscode
│ └── launch.json
│ ├── App.java
│ └── Payment.java
├── Lesson 37 - الدرس
├── package1
│ ├── App.java
│ └── App2.java
└── package2
│ └── App3.java
├── Lesson 38 - الدرس
└── App.java
├── Lesson 39 - الدرس
└── App.java
├── Lesson 40 - الدرس
├── App.java
├── arraylist 2 (Time 0_09_37;17).png
└── arraylist 2 (Time 0_09_39;04).png
├── Lesson 41 - الدرس
└── App.java
├── Lesson 42 - الدرس
└── App.java
├── Lesson 42 old - الدرس
└── App.java
├── Lesson 43 - الدرس
└── App.java
├── Lesson 44 - الدرس
└── App.java
├── Lesson 45 old - الدرس
└── App.java
├── Lesson 45- الدرس
└── App.java
├── Lesson 46 - الدرس
├── App.java
├── AppExtra.java
└── string_method.txt
├── Lesson 47 - الدرس
└── App.java
├── Lesson 48 - الدرس
├── App.java
└── math_java.txt
├── Lesson 49 - الدرس
├── .vscode
│ └── launch.json
└── Java
│ └── App.java
├── Lesson 50 - الدرس
├── Abstract_Java.bmp
└── Java
│ ├── App.java
│ └── App2.java
├── Lesson 51 - الدرس
├── .vscode
│ └── launch.json
├── Java
│ ├── App.java
│ └── App2.java
└── method_abstract.bmp
├── Lesson 52 - الدرس
├── .vscode
│ └── launch.json
└── Java
│ ├── .vscode
│ └── launch.json
│ └── Java
│ ├── App.java
│ ├── Background.java
│ └── Color.java
├── Lesson 53 - الدرس
├── .vscode
│ └── launch.json
├── Java
│ ├── .vscode
│ │ └── launch.json
│ └── Java
│ │ ├── App.java
│ │ └── AppInterface.java
└── شرح الإنترفيس ( Interface ).pptx
├── Lesson 54 - الدرس
├── .vscode
│ └── launch.json
└── Java
│ ├── .vscode
│ └── launch.json
│ └── Java
│ ├── App.java
│ ├── App2.java
│ ├── App3.java
│ └── AppInterface.java
├── Lesson 55 - الدرس
├── .vscode
│ └── launch.json
└── Java
│ ├── .vscode
│ └── launch.json
│ └── Java
│ └── App.java
├── Lesson 56 - الدرس
├── .vscode
│ └── launch.json
└── Java
│ ├── .vscode
│ └── launch.json
│ └── Java
│ ├── App.java
│ └── AppHome.java
├── Lesson 57 - الدرس
└── App.java
├── Lesson 57 old - الدرس
├── App.java
└── websites_links.txt
├── Lesson 58 - الدرس
└── app.java
├── Lesson 58 old - الدرس
└── app.java
└── Lesson 59 - الدرس
├── App.java
└── Payment.java
/Lesson 01 - الدرس/JavaProject/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 |
--------------------------------------------------------------------------------
/Lesson 01 - الدرس/JavaProject/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Lesson 01 - الدرس/JavaProject/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Lesson 01 - الدرس/JavaProject/JavaProject.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Lesson 01 - الدرس/JavaProject/out/production/JavaProject/App.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codershiyar/java/f160878ec0010e062bafdb5e5fc5072892c64f98/Lesson 01 - الدرس/JavaProject/out/production/JavaProject/App.class
--------------------------------------------------------------------------------
/Lesson 01 - الدرس/JavaProject/out/production/JavaProject/App2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codershiyar/java/f160878ec0010e062bafdb5e5fc5072892c64f98/Lesson 01 - الدرس/JavaProject/out/production/JavaProject/App2.class
--------------------------------------------------------------------------------
/Lesson 01 - الدرس/JavaProject/src/App.java:
--------------------------------------------------------------------------------
1 | public class App {
2 | public static void main(String[] args) {
3 | System.out.println("برنامج يعمل");
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/Lesson 01 - الدرس/JavaProject/src/App2.java:
--------------------------------------------------------------------------------
1 | public class App2 {
2 | }
3 |
--------------------------------------------------------------------------------
/Lesson 01 - الدرس/app.java:
--------------------------------------------------------------------------------
1 | /**
2 | * App
3 | */
4 | public class App {
5 |
6 | public static void main(String[] args) {
7 | System.out.println("برنامج يعمل");
8 | }
9 | }
--------------------------------------------------------------------------------
/Lesson 02 - الدرس/App.java:
--------------------------------------------------------------------------------
1 | /**
2 | * App
3 | */
4 | public class App {
5 |
6 | public static void main(String[] args) {
7 | System.out.println("برنامج يعمل");
8 | }
9 | }
--------------------------------------------------------------------------------
/Lesson 03 - الدرس/App.java:
--------------------------------------------------------------------------------
1 | //---------------------------------------------------------------------------------------------------------
2 | //Coder Shiyar : Java Comments
3 | //---------------------------------------------------------------------------------------------------------
4 | // Multi-line comments start with /* and ends with */ تبدأ التعليقات متعددة الأسطر بـ / * وتنتهي بـ
5 | // Any text between /* and */ will be ignored by Java. سيتم تجاهل أي نص بين / * و * / بواسطة جافا
6 | // Single-line comments start with two forward slashes (//)تبدأ التعليقات أحادية السطر بشرطتين مائلتين للأمام
7 | // Any text between // and the end of the line is ignored by Java (will not be executed).
8 | // يتم تجاهل أي نص بين // ونهاية السطر بواسطة جافا (لن يتم تنفيذه)
9 |
10 | public class App {
11 |
12 | public static void main(String[] args) {
13 | // لطبع النص تعلم جافا
14 | // System.out.println("Learn Java");
15 | System.out.println("Learn Java");
16 | /*
17 |
18 | تعلم جافا مع كودر شيار
19 |
20 | */
21 |
22 | }
23 | }
24 |
25 |
--------------------------------------------------------------------------------
/Lesson 04 - الدرس/App.java:
--------------------------------------------------------------------------------
1 | public class App {
2 |
3 | public static void main(String[] args) {
4 | // String
5 | // int
6 | String text = "Learn Java In Arabic";
7 | int number = 100;
8 |
9 | System.out.println(text);
10 | System.out.println(number+20);
11 | }
12 | }
13 |
14 | // القسم اول : طريقة انشاء متغيرات في جافا
15 | //------------------------------------------------------------------
16 | // type variableName = value;
17 | // النوع الاسم_المتغير = القيمة
18 | //------------------------------------------------------------------
19 | // القسم الثاني : شرح انواع البيانات الذي يمكنك تخزينها في جافا
20 | //------------------------------------------------------------------
21 | // القسم الثالث :شرح للقوانين انشاء اسماء متغيرات في جافا
22 |
23 | // Part 1: How to create variables in Java
24 | //------------------------------------------------ ------------------
25 | // type variableName = value;
26 | //------------------------------------------------ ------------------
27 | // Part 2: Explain the types of data that you can store in Java
28 | //------------------------------------------------ ------------------
29 | // Part 3: An explanation of the rules for creating variable names in Java
--------------------------------------------------------------------------------
/Lesson 05 - الدرس/App.java:
--------------------------------------------------------------------------------
1 |
2 | public class App {
3 |
4 | public static void main(String[] args) {
5 |
6 | }
7 | }
8 |
9 | // القسم الثاني : شرح انواع البيانات الذي يمكنك تخزينها في جافا
10 | //------------------------------------------------------------------
11 | // Part 2: Explain the types of data that you can store in Java
12 | //------------------------------------------------ ------------------
13 | // byte 1 byte Stores whole numbers from -128 to 127 2*2*2*2*2*2*2
14 | // short 2 bytes Stores whole numbers from -32,768 to 32,767
15 | // int 4 bytes Stores whole numbers from -2,147,483,648 to 2,147,483,647
16 | // long 8 bytes Stores whole numbers from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
17 | // float 4 bytes Stores fractional numbers. Sufficient for storing 6 to 7 decimal digits
18 | // double 8 bytes Stores fractional numbers. Sufficient for storing 15 decimal digits
19 | // boolean 1 bit Stores true or false values
20 | // char 2 bytes Stores a single character/letter or ASCII values
21 |
22 | // Primitive types are predefined (already defined) in Java. Non-primitive types are created by the programmer
23 | // and is not defined by Java (except for String). Non-primitive types can be used to call methods to perform certain operations, while primitive types cannot.
24 | // A primitive type has always a value, while non-primitive types can be null.
25 | // A primitive type starts with a lowercase letter, while non-primitive types starts with an uppercase letter.
26 | // The size of a primitive type depends on the data type, while non-primitive types have all the same size.
27 |
28 | // القسم اول : طريقة انشاء متغيرات في جافا
29 | //------------------------------------------------------------------
30 | // القسم الثالث :شرح للقوانين انشاء اسماء متغيرات في جافا
31 | //------------------------------------------------------------------
32 |
33 | // Part 1: How to create variables in Java
34 | //------------------------------------------------ ------------------
35 | // Part 3: An explanation of the rules for creating variable names in Java
36 |
37 |
--------------------------------------------------------------------------------
/Lesson 06 - الدرس/App.java:
--------------------------------------------------------------------------------
1 |
2 | public class App {
3 |
4 | public static void main(String[] args) {
5 |
6 | short short_number = 130;
7 | short_number = 140;
8 | System.out.println(short_number);
9 |
10 | float float_number = 1206548.5f;
11 | System.out.println(float_number);
12 |
13 | double double_number = 1236341.5;
14 | System.out.println(double_number);
15 |
16 | boolean isDeviceWorking = true;
17 | System.out.println(isDeviceWorking);
18 |
19 | char character = 0X3F;
20 | System.out.println(character);
21 |
22 | String text = "I learn Java \t with Coder Shiyar";
23 | System.out.println(text);
24 |
25 | }
26 | }
27 |
28 | // القسم الثاني : شرح انواع البيانات الذي يمكنك تخزينها في جافا
29 | //------------------------------------------------------------------
30 | // Part 2: Explain the types of data that you can store in Java
31 | //------------------------------------------------ ------------------
32 | // byte 1 byte Stores whole numbers from -128 to 127 2*2*2*2*2*2*2
33 | // short 2 bytes Stores whole numbers from -32,768 to 32,767
34 | // int 4 bytes Stores whole numbers from -2,147,483,648 to 2,147,483,647
35 | // long 8 bytes Stores whole numbers from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
36 |
37 | // float 4 bytes Stores fractional numbers. Sufficient for storing 6 to 7 decimal digits
38 | // double 8 bytes Stores fractional numbers. Sufficient for storing 15 decimal digits
39 |
40 | // boolean 1 bit Stores true or false values
41 | // char 2 bytes Stores a single character/letter or ASCII values
42 |
43 | // Primitive types are predefined (already defined) in Java. Non-primitive types are created by the programmer
44 | // and is not defined by Java (except for String). Non-primitive types can be used to call methods to perform certain operations, while primitive types cannot.
45 | // A primitive type has always a value, while non-primitive types can be null.
46 | // A primitive type starts with a lowercase letter, while non-primitive types starts with an uppercase letter.
47 | // The size of a primitive type depends on the data type, while non-primitive types have all the same size.
48 |
49 | // القسم اول : طريقة انشاء متغيرات في جافا
50 | //------------------------------------------------------------------
51 | // القسم الثالث :شرح للقوانين انشاء اسماء متغيرات في جافا
52 | //------------------------------------------------------------------
53 |
54 | // Part 1: How to create variables in Java
55 | //------------------------------------------------ ------------------
56 | // Part 3: An explanation of the rules for creating variable names in Java
57 |
58 |
--------------------------------------------------------------------------------
/Lesson 07 - الدرس/App.java:
--------------------------------------------------------------------------------
1 | public class App {
2 |
3 | public static void main(String[] args) {
4 | // rule 1
5 | String text = "Learn Java in Arabic";
6 | // rule 4
7 | String texT = "تعلم جافا مع كودر شيار";
8 | // rule 5
9 | boolean IsWorking = true;
10 | System.out.println(texT);
11 | }
12 | }
13 |
14 | // القسم الثالث :شرح للقوانين انشاء اسماء متغيرات في جافا
15 | // القواعد العامة لتسمية المتغيرات هي:
16 | // ------------------------------------------------ -------------------------
17 | // يمكن أن تحتوي الأسماء على أحرف وأرقام وشرطات سفلية وعلامات الدولار
18 | // _ يجب أن تبدأ الأسماء بحرف او بـ $ أو
19 | // ينصح أن تبدأ الأسماء بحرف صغير ولا يمكن أن تحتوي على مسافة
20 | // الأسماء حساسة لحالة الأحرف هناك فرق بين احرف كبيرة وصغيرة
21 | // لا يمكن استخدام الكلمات المحجوزة كأسماء
22 |
23 | // Part 3: An explanation of the rules for creating variable names in Java
24 | //--------------------------------------------------------------------------
25 | // The general rules for naming variables are:
26 | //------------------------------------------------------------------------
27 | // Names can contain letters, digits, underscores, and dollar signs
28 | // Names must begin with a letter also with $ or _
29 | // Names should start with a lowercase letter and it cannot contain whitespace
30 | // Names are case sensitive ("myVar" and "myvar" are different variables)
31 | // Reserved words (like Java keywords, such as int or boolean) cannot be used as names
32 |
33 |
34 | // List of Reserved Java Keywords - قائمة لبعض اسماء محجوزة في جافا
35 | //------------------------------------------------------------------------
36 | // abstract assert boolean break byte case
37 | // catch char class const continue default
38 | // double do else enum extends false
39 | // final finally float for goto if
40 | // implements import instanceof int interface long
41 | // native new null package private protected
42 | // public return short static strictfp super
43 | // switch synchronized this throw throws transient
44 | // true try void volatile while
45 |
--------------------------------------------------------------------------------
/Lesson 08 + 09 الدرس/App.java:
--------------------------------------------------------------------------------
1 | public class App {
2 |
3 | public static void main(String[] args) {
4 | // int number1 = 25;
5 | // int number2 = 10;
6 | // int result = number1%number2;
7 | // System.out.println(++number1);
8 | // System.out.println(number1);
9 |
10 | String text = " I love Java " + (20+25)+ " انا احب جافا";
11 |
12 | System.out.println(text);
13 | }
14 |
15 | }
16 |
17 | // Arithmetic operators ^ العمليات الحسابية
18 | // -----------------------------------------------------------------------------------
19 | // Operator | Name
20 | // -----------------------------------------------------------------------------------
21 | // + Addition جمع
22 | // - Subtraction طرح
23 | // * Multiplication ضرب
24 | // / Division قسمة
25 | // % Modulus Returns the division remainder إعادة الباقي العدد مقسم
26 | // ++ Increment زيادة 1 للعدد المحدد المخزن ضمن احد متغيرات
27 | // -- Decrement نقص 1 للعدد المحدد المخزن ضمن احد متغيرات
28 | // = Assignment يساوي
29 | // -----------------------------------------------------------------------------------
30 | // Java Assignment Operators عمليات استناد قيمة
31 | // ----------------------------------------------
32 | // Operator
33 | // =
34 | // +=
35 | // -=
36 | // *=
37 | // /=
38 | // %=
39 |
40 |
41 |
42 |
43 | // ------------------------------------------------------------------------------------------------------------------------
44 | // Arithmetic priority - أولويات العمليات الحسابية
45 | // ------------------------------------------------------------------------------------------------------------------------
46 | // 1: The order of operations is as follows: Parentheses, exponents, multiplication and division, addition and subtraction
47 | // يكون ترتيب العمليات كالآتي: “الأقواس، الأس، الضرب والقسمة، الجمع والطرح”.
48 | // ------------------------------------------------------------------------------------------------------------------------
49 | // 2: This can be described by: Parentheses beat exponents, which beat multiplication and division
50 | // (but multiplication and division are in the same order).
51 | // ويمكن وصف ذلك من خلال: تفوق الأقواس الأسس، التي تتفوق على الضرب والقسمة (لكن الضرب، والقسمة في نفس الترتيب).
52 | // ------------------------------------------------------------------------------------------------------------------------
53 | // 3: Multiplication and division take precedence over addition and subtraction (both in lower order),
54 | // in other words, the precedence is:
55 | // والضرب والقسمة يفوقان الجمع والطرح، (وهما معًا في الترتيب السفلي)، وبمعنى آخر، الأسبقية هي
56 | // ------------------------------------------------------------------------------------------------------------------------
57 | // // 4:Multiplication and division (from right to left when the numbers are Arabic, and from
58 | // left to right when the numbers are English).
59 | // الضرب والقسمة (من اليمين إلى اليسار عندما تكون الأرقام عربية، ومن اليسار إلى اليمين عندما تكون الأرقام إنجليزية)
60 | // ------------------------------------------------------------------------------------------------------------------------
61 | // 5: addition and subtraction (from right to left when the numbers are Arabic,
62 | // and from left to right when the numbers are English).
63 | // الجمع والطرح (من اليمين إلى اليسار عندما تكون الأرقام عربية، ومن اليسار إلى اليمين عندما تكون الأرقام إنجليزية)
--------------------------------------------------------------------------------
/Lesson 10 - الدرس/App.java:
--------------------------------------------------------------------------------
1 | public class App {
2 | public static void main(String[] args) {
3 | int number1 = 10;
4 | boolean result = !(number1<20) ;
5 | System.out.println("Result: " + result);
6 |
7 | }
8 | }
9 |
10 | // Java Comparison Operators - العمليات المقارنة في جافا
11 | // ------------------------------------------------------------------------------------------------------------
12 | // Comparison operators are used to compare two values: يتم استخدام رموز عمليات مقارنة لمقارنة بين عددين
13 | // ------------------------------------------------------------------------------------------------------------
14 | // Operator - رمز Name - اسم
15 | // ------------------------------------------------------------------------------------------------------------
16 | // == Equal to يساوي
17 | // != Not equal ليس متساوي
18 | // > Greater than اكبر من
19 | // < Less than اصغر من
20 | // >= Greater than or equal to أكبر من أو يساوي
21 | // <= Less than or equal to أصغر من أو يساوي
22 |
23 | // Java Logical Operators
24 | // ---------------------------------------------------------------------------------------------------------------
25 | //Operator(الرمز) Name(الاسم) Description (الوصف)
26 | // ---------------------------------------------------------------------------------------------------------------
27 | // && and و Returns true if both statements are true يعود صحيح إذا كانت كلتا العبارتين صحيحين
28 | // || or او Returns true if one of the statements is trueيعود صحيحًا إذا كان أحد العبارات صحيحًا
29 | // ! not لا Reverse the result, returns false if the result is true
30 | // اعكس النتيجة ، وإرجاع خطأ إذا كانت النتيجة صحيحة
--------------------------------------------------------------------------------
/Lesson 11 - الدرس/app.java:
--------------------------------------------------------------------------------
1 |
2 | public class App {
3 |
4 | public static void main(String[] args) {
5 | String language1 = "العربية";
6 | String language2 = "Kurdi";
7 | String language3 ="Nederlands";
8 | String language4 = "English";
9 |
10 | String[] languages = {"العربية" , "Kurdi" , "Nederlands" , "English"};
11 |
12 | languages[1] = "Deutsch";
13 |
14 | String[][] users = {{"shiyar","test@gmail.com" ,"1234"} ,{"Coder","test2@gmail.com" ,"1234"}};
15 |
16 | System.out.println(users[1][0]);
17 | // System.out.println(languages[languages.length -2 ]);
18 | // System.out.println(languages[5]);
19 | }
20 | }
21 |
22 | // How to create an Array - (ارراي)كيفية إنشاء مصفوفة
23 | // // -------------------------------------------------------------------------
24 | // datatype [] variableName = {1,2} قوانين لانشاء متغيرات
25 | // ----------------------------------------------------------------------------
26 | // How to store data in an Array - طريقة تخزين البيانات
27 | // ----------------------------------------------------------------------------
28 | // How to access data in an Array - طريقة وصول الى البيانات
29 | // Change an Array Element - كيفية تحديث البيانات المخزنة في ارراي
30 | // Array Length - طريقة معرفة عدد القيم المخزنة في ارراي
31 | // -----------------------------------------------------------------------------
32 | // Multidimensional Arrays - المصفوفات متعددة الأبعاد
33 |
--------------------------------------------------------------------------------
/Lesson 12 - الدرس/App.java:
--------------------------------------------------------------------------------
1 | public class App {
2 |
3 | public static void main(String[] args) {
4 |
5 | try{
6 | String[] languages = {"العربية" , "الانجليزية" , "الألمانية" ,"الهولندية" , "الكردية"};
7 | System.out.println(languages[5]);
8 | }catch(Exception error){
9 | System.out.println("حدث خطا ما");
10 | System.out.println(error);
11 | }finally{
12 | System.out.println("اكتمل جملة تراي وكاتش");
13 | }
14 |
15 |
16 | }
17 | }
18 |
19 |
20 | // When executing Java code, different errors can occur: coding errors made by the programmer,
21 | // errors due to wrong input, or other unforeseeable things.
22 | // عند تنفيذ كود جافا ، يمكن أن تحدث أخطاء مختلفة: أخطاء في اكواد قام بها المبرمج
23 | // ، أو أخطاء ناتجة عن إدخال خاطئ ، أو أشياء أخرى غير متوقعة
24 | // -------------------------------------------------------------------------------------------------------------
25 | // When an error occurs, Java will normally stop and generate an error message.
26 | // عند حدوث خطأ ما ، ستتوقف جافا عادةً وتنشئ رسالة خطأ
27 | // -------------------------------------------------------------------------------------------------------------
28 | // The try statement allows you to define a block of code to be tested for errors while it is being executed.
29 | // ضمن جملة تراي يمكنك وضع اوامر جافا الذي ترغب بان يتم تنفيذها
30 | // The catch statement allows you to define a block of code to be executed, if an error occurs in the try block.
31 | // ضمن جملة كاتش يمكنك وضع الاوامر جافا الذي ترغب بأن يتم تنفيذها في حال حدوث خطا ما في جملة تراي
32 | // او يمكنك استخدامها لاخفاء الخطا لتجنب تعطيل تطبيق او برنامج او لعبة بسبب ذلك الخطا
33 | // -------------------------------------------------------------------------------------------------------------
34 | // The finally statement lets you execute code, after try...catch, regardless of the result:
35 | // تتيح لك العبارة فاينالي تنفيذ التعليمات البرمجية ، بعد تراي ... كاتش ، بغض النظر عن النتيجة
36 | // -------------------------------------------------------------------------------------------------------------
37 | // The try and catch keywords come in pairs:
38 | // try {
39 | // Block of code to try
40 |
41 | // }
42 | // catch(Exception e) {
43 | // Block of code to handle errors
44 |
45 | // } finally { }
--------------------------------------------------------------------------------
/Lesson 13 - الدرس/App.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 | public class App {
3 | public static void main(String[] args) {
4 | Scanner keyboard = new Scanner(System.in);
5 |
6 | try {
7 | System.out.println("Enter your age: ");
8 | int age = keyboard.nextInt();
9 | System.out.println("Age: "+ age);
10 | } catch (Exception e) {
11 | //TODO: handle exception
12 | System.out.println("Error invalid data");
13 | }
14 |
15 |
16 | System.out.println("Enter your email: ");
17 | keyboard.nextLine();
18 | String email =keyboard.nextLine();
19 | System.out.println("Email: " + email);
20 |
21 | }
22 | }
23 |
24 | // Java User Input (Scanner) يتم استخدامها لجعل مستخدم يقوم بتحديد بيانات
25 | // ------------------------------------------------------------------------------------------------------------------
26 | // import java.util.Scanner; لكي نتمكن من استخدام سكنر يجب علينا استدعاء ملف سكنر في جافا
27 | // Scanner keyboard = new Scanner(System.in); لانشاء متغير لقراء بيانات من لوحة مفاتيح
28 | // ------------------------------------------------------------------------------------------------------------------
29 | // nextLine() Reads a String value from the user يستخدم لقراءة بيانات من نوع بيانات نصي
30 | // ------------------------------------------------------------------------------------------------------------------
31 | // nextBoolean() Reads a boolean value from the user لقراءة بيانات من نوع صح و خطا
32 | // ------------------------------------------------------------------------------------------------------------------
33 | // nextByte() Reads a byte value from the user لقراءة بيانات من نوع ارقام ليس بها فاصلة من نوع بايت
34 | // ------------------------------------------------------------------------------------------------------------------
35 | // nextDouble() Reads a double value from the user يستخدم لقراءة اعداد الذي بها فاصلة ونوع بياناته يكون دوبول
36 | // nextFloat() Reads a float value from the user يستخدم لقراءة اعداد الذي بها فاصلة ونوع بياناته يكون فلوت
37 | // ------------------------------------------------------------------------------------------------------------------
38 | // nextInt() Reads a int value from the user يستخدم لقراءة اعداد الذي ليس بها فاصلة من نوع إينت
39 | // nextLong() Reads a long value from the user يستخدم لقراءة اعداد الذي ليس بها فاصلة من نوع اعداد طويلة
40 | // nextShort() Reads a short value from the user يستخدم لقراءة اعداد الذي ليس بها فاصلة من نوع اعداد قصيرة
41 |
--------------------------------------------------------------------------------
/Lesson 14 15 - الدرس/App.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class App {
4 | public static void main(String[] args) {
5 | Scanner scanner = new Scanner(System.in);
6 | // System.out.println("Enter your age: ");
7 | // int age = scanner.nextInt();
8 | // if(age>=18){
9 | // System.out.println("You can access this page");
10 | // }else if(age<=0){
11 | // System.out.println("Invalid value");
12 | // }
13 | // else{
14 | // System.out.println("Access denied");
15 | // }
16 | // System.out.println("Enter your email: ");
17 | // String email = scanner.nextLine();
18 |
19 | // System.out.println("Enter your password: ");
20 | // String password = scanner.nextLine();
21 |
22 | // if(email.equals("admin@gmail.com") && password.equals("1212")){
23 | // System.out.println("You logged in");
24 | // }else{
25 | // System.out.println("Login failed, try again");
26 | // }
27 | System.out.println("Enter 1 for Arabic or 2 for English: ");
28 | int option = scanner.nextInt();
29 | if(option == 1){
30 | System.out.println("Selected Language is Arabic");
31 | }else if(option == 2){
32 | System.out.println("Selected Language is English");
33 | }else{
34 | System.out.println("Invalid option");
35 | }
36 | }
37 | }
38 | // Java Comparison Operators - العمليات المقارنة في جافا
39 | // ------------------------------------------------------------------------------------------------------------
40 | // Comparison operators are used to compare two values: يتم استخدام رموز عمليات مقارنة لمقارنة بين عددين
41 | // ------------------------------------------------------------------------------------------------------------
42 | // Operator - رمز Name - اسم
43 | // ------------------------------------------------------------------------------------------------------------
44 | // == Equal to يساوي
45 | // != Not equal ليس متساوي
46 | // > Greater than اكبر من
47 | // < Less than اصغر من
48 | // >= Greater than or equal to أكبر من أو يساوي
49 | // <= Less than or equal to أصغر من أو يساوي
50 | // Java Logical Operators
51 | // ---------------------------------------------------------------------------------------------------------------
52 | //Operator(الرمز) Name(الاسم) Description (الوصف)
53 | // ---------------------------------------------------------------------------------------------------------------
54 | // && and و Returns true if both statements are true يعود صحيح إذا كانت كلتا العبارتين صحيحين
55 | // || or او Returns true if one of the statements is trueيعود صحيحًا إذا كان أحد العبارات صحيحًا
56 | // ! not لا Reverse the result, returns false if the result is true
57 | // اعكس النتيجة ، وإرجاع خطأ إذا كانت النتيجة صحيحة
58 |
59 | // Java Conditions and If else Statements - شرح كيفية تنفيذ اوامر حسب شرط الذي تحدده
60 | // ----------------------------------------------------------------------------------------------
61 | // Use if to specify a block of code to be executed, if a specified condition is true
62 | // استخدمه في حال اذا كنت ترغب بتنفيذ اوامر حسب الشرط الذي تحدده
63 | // ----------------------------------------------------------------------------------------------
64 | // Use else to specify a block of code to be executed, if the same condition is false
65 | // استخدمه في حال اذا كنت ترغب بتنفيذ اوامر في حال الشرط الذي وضعته لم يتحقق
66 | // ----------------------------------------------------------------------------------------------
67 | // Use else if to specify a new condition to test, if the first condition is false
68 | // استخدمه في حال لتحديد شرط اخر في حال الشرط اول لم يتحقق
69 |
70 |
71 |
72 |
--------------------------------------------------------------------------------
/Lesson 16 - الدرس/App.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class App {
4 | public static void main(String[] args) {
5 | Scanner scanner = new Scanner(System.in);
6 | System.out.println("Enter 1 for Arabic , 2 for English , 3 For Dutch");
7 | int option = scanner.nextInt();
8 | switch(option){
9 | case 1:
10 | System.out.println("مرحبا");
11 | break;
12 | case 2:
13 | System.out.println("Hello");
14 | break;
15 | case 3:
16 | System.out.println("Hoi");
17 | break;
18 | default:
19 | System.out.println("Error");
20 | }
21 |
22 | if(option == 1){
23 | System.out.println("مرحبا");
24 | }else if(option == 2){
25 | System.out.println("Hello");
26 | }else if(option == 3){
27 | System.out.println("Hoi");
28 | }else{
29 | System.out.println("Error");
30 | }
31 |
32 | }
33 | }
34 |
35 | // Java Switch Statements
36 | // ---------------------------------------------------------------------------------------------
37 | // Use the switch statement to select one of many code blocks to be executed.
38 | // استخدم جملة سويتش لتحديد واحدة من العديد من مجموعات التعليمات البرمجية ليتم تنفيذها
39 | // ---------------------------------------------------------------------------------------------
40 | // switch(expression) {
41 | // case a:
42 | // // code block
43 | // break;
44 | // case b:
45 | // // code block
46 | // break;
47 | // default:
48 | // // code block
49 | // }
50 | // ---------------------------------------------------------------------------------------------
51 | // The default keyword specifies some code to run if there is no case match
52 | // ---------------------------------------------------------------------------------------------
53 |
--------------------------------------------------------------------------------
/Lesson 17 - الدرس/App.java:
--------------------------------------------------------------------------------
1 |
2 | public class App {
3 |
4 | public static void main(String[] args) {
5 |
6 | String[] languages = {"Arabic" , "Dutch" , "German" , "Kurdish" , "English"};
7 | // System.out.println(languages[0]);
8 | // System.out.println(languages[1]);
9 | // System.out.println(languages[2]);
10 | // System.out.println(languages[3]);
11 | // System.out.println(languages[4]);
12 | int numbering = 0;
13 | for(String language : languages ){
14 | ++numbering;
15 | System.out.println(numbering + ": " + language);
16 | }
17 |
18 | }
19 | }
20 |
21 | // for (type variableName : arrayName) {
22 | // // code block to be executed - الكود الذي ترغب بتنفيذه
23 | // }
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Lesson 18 - الدرس/App.java:
--------------------------------------------------------------------------------
1 |
2 | public class App {
3 |
4 | public static void main(String[] args) {
5 | // int counter = 1;
6 | // int number= 7;
7 | // while(counter<=20){
8 | // System.out.println(counter + " * " + number + " = " + (counter * number) );
9 | // counter++;
10 | // }
11 |
12 | String[] webLanguages = {"html","css" ,"JavaScript" , "PHP"};
13 |
14 | int counter2 = 0;
15 | while(counter2= 0);
11 |
12 |
13 | }
14 | }
15 |
16 | // Java do-while Loop
17 | // ---------------------------------------------------------------------------
18 | // سيتم دائمًا تنفيذ اوامر مرة واحدة على الأقل ، حتى إذا كان الشرط خاطئًا
19 | // لأنه يتم تنفيذ التعليمات البرمجية قبل اختبار الشرط
20 | // ---------------------------------------------------------------------------
21 |
22 | // do {
23 | // // code block to be executed الاوامر الذي ترغب بتنفيذها
24 |
25 | // }
26 | // while (condition الشرط);
--------------------------------------------------------------------------------
/Lesson 20 - الدرس/App.java:
--------------------------------------------------------------------------------
1 | public class App {
2 | public static void main(String[] args) {
3 |
4 | String[] webLanguages ={"HTML","CSS" , "JavaScript" , "PHP"};
5 |
6 | for(int counter = 0; counter short -> char -> int -> long -> float -> double
31 | // -----------------------------------------------------------------------------------------------------------------
32 | // عندما ترغب بتحويل بيانات من نوع كبير الى نوع صغير فيجب عليك قيام بذلك غالبا بشكل يدوي
33 | // When you want to convert data from a large type to a small type, you must do this often manually
34 | // double -> float -> long -> int -> char -> short -> byte
35 | // -----------------------------------------------------------------------------------------------------------------
36 | // Converting for primary data types - الطريقة التحويل لأنواع البيانات الأساسية
37 | // -----------------------------------------------------------------------------------------------------------------
38 | // (int)value
39 | // -----------------------------------------------------------------------------------------------------------------
40 | // Converting primary datatype to String لتحويل البيانات الى نوع البيانات نصي:
41 | // -----------------------------------------------------------------------------------------------------------------
42 | // Way 1 - الطريقة: String text = "" + DataToBeConverted;
43 | // Way 2 - الطريقة: TheTypeOfDataToBeConverted.toString(DataToBeConverted)
--------------------------------------------------------------------------------
/Lesson 23 - الدرس/App.java:
--------------------------------------------------------------------------------
1 | public class App {
2 | public static void main(String[] args) {
3 | User user1 = new User();
4 | System.out.println(user1.name);
5 | User user2 = new User();
6 | }
7 | }
8 |
9 |
10 | // Object-oriented programming in Java - برمجة كائنية التوجه
11 | // -------------------------------------------------------------------------------------------------------------
12 | // :الهدف منها
13 | // يسهل بناء البرامج بشكل سريع في وقت قصير عبر إعادة الاستخدام امور اخرين مسبقا قاموا ببنائها
14 | // OOP makes it easy to build programs quickly in a short time by reusing things that others have already built
15 | // --------------------------------------------------------------------------------------------------------------
16 | // Examples: امثلة
17 | // --------------------------------------------------------------------------------------------------------------
18 | // class فئة
19 | // class object كائن/نسخة من كلاس المحدد
20 | // constructor class بناء
--------------------------------------------------------------------------------
/Lesson 23 - الدرس/User.java:
--------------------------------------------------------------------------------
1 | public class User{
2 | String name = "Coder Shiyar";
3 |
4 | User(){
5 | System.out.println("تم انشاء ابوجكت بنجاح");
6 | }
7 |
8 | }
9 |
10 |
--------------------------------------------------------------------------------
/Lesson 24 - الدرس/App.java:
--------------------------------------------------------------------------------
1 | import java.time.LocalTime;
2 |
3 | class App {
4 | public static void main(String[] args) {
5 | System.out.println(LocalTime.now());
6 |
7 | App2 app2 = new App2("Coder Shiyar");
8 | }
9 |
10 | }
11 |
12 | class App2{
13 | App2(String appName){
14 | System.out.println("App name: "+appName);
15 | }
16 | App2(){
17 |
18 | }
19 | App2(String appName, double version){
20 |
21 | }
22 | }
23 |
24 | // 1: Object Oriented Programming - exampels
25 | //------------------------------------------
26 | // 2: Classes in Java
27 | // -----------------------------------------------------------------------------------------------------------------
28 | // قوانين لإنشاء اسماء كلاسات في جافا هي نفس قوانين إنشاء اسماء متغيرات وملفات في جافا
29 | // فقط اول حرف من اسم ينصح بان يكون حرف كبير
30 | // The rules for creating class names in Java are the same as the rules for creating variable and file names in Java,
31 | // only the first letter of a name is recommended to be a capital letter.
32 | // -----------------------------------------------------------------------------------------------------------------
33 | // في كل ملف جافا يمكنك انشاء بها كلاس او اكثر من كلاس
34 | // بشرط ان يكون اسم احد كلاسات بنفس اسم ملف جافا الذي يتواجد بها ذلك كلاس
35 | // In each Java file, one or more classes can be created
36 | // Only the main class must have the same name as the java file in which the class is created.
37 | // -----------------------------------------------------------------------------------------------------------------
38 | // 3: Class Constructors in Java
39 | // -----------------------------------------------------------------------------------------------------------------
40 | // يمكن أن تحتوي كل فئة في جافا على كونستركتور واحد أو أكثر
41 | // Every class in Java can have 1 or more constructors, but the constructor header must be different
42 | // -----------------------------------------------------------------------------------------------------------------
43 |
--------------------------------------------------------------------------------
/Lesson 25 - الدرس/App.java:
--------------------------------------------------------------------------------
1 | import java.time.LocalDate;
2 |
3 | public class App {
4 |
5 | static void printMessage(String message){
6 | System.out.println(message);
7 | }
8 |
9 | String getName(){
10 | return "Coder Shiyar";
11 | }
12 |
13 | public static void main(String[] args) {
14 | App.printMessage("Hi from main");
15 | App app = new App();
16 | System.out.println(app.getName());
17 |
18 | System.out.println(LocalDate.now());
19 | System.out.println("text".length());
20 | }
21 |
22 | }
23 |
24 | // ---------------------------------------------------------------------------------------------------------------------
25 | // Java Methods (members/function)
26 | // وظيفة او مهمة
27 | //----------------------------------------------------------------------------------------------------------------------
28 | // 1: There are ready-made methods in Java that were developed by others وظائف جاهزة
29 | // 2: methods that you can create yourself وظائف يمكنك انشائها بنفسك
30 | //----------------------------------------------------------------------------------------------------------------------
31 | // 3: void type النوع الذي فقط ينفذ اوامر التي تتواجد ضمنها عند استدعائها دون إعادة اي شي
32 | // 4: return type النوع الذي يقوم بتنفيذ اوامر التي تتواجد ضمنها و ثم يقوم بإعادة بيانات
33 | // ---------------------------------------------------------------------------------------------------------------------
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 | /** Static and non-static methods in Java - مهمات/وظائف الثابتة وغير الثابتة في جافا
43 | ------------------------------------------------------------------------------------------------------------------------
44 | 1-A: You can make a method of static type if you want to call method's without having to create a class-object
45 | يمكنك عمل ميتود من النوع ستاتيك إذا كنت تريد ان تتمكن من استدعاء ميتود دون الحاجة إلى إنشاء اي كلاس اوبجكت
46 |
47 | 1-B: You can make a variable of type non-static if you want to access a variable only via Class Object
48 | and the variable data is not shared with other objects
49 | يمكنك عمل ميتود من النوع غير ستاتيك إذا ترغب بإستدعاء ميتود عبر كلاس اوبجكت في ميتودس من نوع ستاتيك أو كلاس اخر
50 |
51 | -------------------------------------------------------------------------------------------------------------------------
52 | 2-a: A static method can access only static methods and can not access non-static methods.
53 | ضمن ميتود من نوع ستاتيك يمكنك وصول فقط الى ميتودس من نوع ستاتيك ولا يمكنك وصول إلى ميتودس ليست من نوع ستاتيك
54 | بطريقة مباشرة. يمكنك انشاء كلاس اوبجكت ان كنت ترغب باستدعاء ميتود من نوع غير ستاتيك
55 | 2-b: A non-static method can access both static as well as non-static members.
56 | يمكن للميتودس غير ستاتيك الوصول إلى كل من ميتودس ستاتك وغير ستاتيك
57 | */
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/Lesson 26 - الدرس/App.java:
--------------------------------------------------------------------------------
1 | public class App {
2 | static String name = "Learn Java with Coder Shiyar";
3 | double version = 1.0;
4 |
5 |
6 | public static void main(String[] args) {
7 | App app = new App();
8 | app.version = 2.0;
9 | System.out.println(app.version);
10 |
11 | App app2 = new App();
12 |
13 | System.out.println(App2.getName());
14 |
15 | }
16 |
17 | void printName(){
18 | System.out.println(name);
19 | }
20 | }
21 |
22 | class App2{
23 |
24 | static String getName(){
25 | return App.name;
26 | }
27 | }
28 | /**
29 |
30 | Static and non-static variables in Java - المتغيرات الثابتة وغير الثابتة في جافا
31 | =========================================================================================================================
32 | 1-a: A static variable acts as a global variable and is shared among all the objects of the class.
33 | يعمل المتغير من نوع ستاتيك كمتغير عام ويتم مشاركته بين جميع كائنات الفئة (كلاسات ابوجكتس)
34 | 1-b: A non-static variables are specific to instance object in which they are created.
35 | تعتبر المتغيرات غير ستاتيك خاصة ب اوبجكت الذي تم إنشاؤه ولا يتم مشاركة بياناتها مع اوبجكتس اخرى
36 | -------------------------------------------------------------------------------------------------------------------------
37 | 2-a: A static variable can be accessed by static methods as well as non-static methods.
38 | متغيرات من نوع ستاتيك يمكنك وصول إليه من خلال ميتودس من نوع ستاتيك و غير ستاتيك
39 | 2-b: A non-static variable can not be accessed by static member functions.
40 | متغيرات من نوع غير ستاتيك لا يمكنك وصول إليه من خلال ميتودس من نوع ستاتيك بطريقة مباشرة
41 |
42 | */
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | /**
55 | Extra
56 | --------------------------------------------------------------------------------------------------------------------------
57 | Static variables occupies less space and memory allocation happens once.
58 | A non-static variable may occupy more space. Memory allocation may happen at run time.
59 | --------------------------------------------------------------------------------------------------------------------------
60 | A static variable is declared using static keyword.
61 | A normal variable is not required to have any special keyword.
62 | **/
63 |
--------------------------------------------------------------------------------
/Lesson 27 - الدرس/App.java:
--------------------------------------------------------------------------------
1 | import java.time.LocalDate;
2 | class App{
3 | public static void main(String[] args) {
4 | LocalDate date = LocalDate.now();
5 | date = date.plusYears(3);
6 |
7 | System.out.println(date.getYear() + " - " + date.getMonthValue() + " - " + date.getDayOfMonth());
8 | }
9 | }
10 |
11 | /*
12 | import java.time.LocalDate; لاستدعاء الكلاس جاهز الذي يمكننا من خلالها حصول على التاريخ
13 | ------------------------------------------------------------------------------------------------------------
14 | LocalDate.now() To get the current date - للحصول على التاريخ الحالي
15 | getYear() To get the current year from date - للحصول على السنة الحالية من التاريخ
16 | getMonthValue() To get the current month from date - للحصول على الشهر الحالي من التاريخ
17 | getMonth() To get the name of the current month - للحصول على الاسم الشهر الحالي من التاريخ
18 | getDayOfMonth() To get the current day of the month from date - للحصول على اليوم الحالي من الشهر الحالي
19 | getDayOfYear() To get the current day of the month from date - للحصول على اليوم الحالي من السنة الحالية
20 | ------------------------------------------------------------------------------------------------------------
21 | minusDays() To decrease days from the current date - للنقص ايام من التاريخ المحدد
22 | plusDays() To increase days to the current date - للزيادة ايام إلى التاريخ المحدد
23 |
24 | */
--------------------------------------------------------------------------------
/Lesson 28 - الدرس/App.java:
--------------------------------------------------------------------------------
1 | import java.time.LocalDate;
2 | import java.time.LocalDateTime;
3 | import java.time.LocalTime;
4 | class App{
5 | public static void main(String[] args) {
6 | LocalTime time = LocalTime.now();
7 |
8 | LocalTime time2 = LocalTime.parse("18:11:59");
9 |
10 | LocalDate date2 = LocalDate.parse("2024-06-11");
11 | System.out.println(date2.getYear());
12 |
13 | time = time.minusHours(2);
14 |
15 | System.out.println(time2.toString());
16 | System.out.println(LocalDateTime.now());
17 |
18 | }
19 | }
20 |
21 | /*
22 | import java.time.LocalTime; لاستدعاء الكلاس جاهز الذي يمكننا من خلالها حصول على الوقت
23 | import java.time.LocalDateTime; لاستدعاء الكلاس جاهز الذي يمكننا من خلالها حصول على التاريخ والوقت
24 | ------------------------------------------------------------------------------------------------------------
25 | LocalTime.now() To get the current time - للحصول على الوقت الحالي
26 | getHour() To get the current hour from time - للحصول على الساعة الحالية من الوقت
27 | getMinute() To get the current minute from time - للحصول على الدقيقة الحالية من الوقت
28 | getSecond() To get the current second from time - للحصول على الثانية الحالية من الوقت
29 |
30 | plusHours() To increase hours to the current time - للزيادة ساعات إلى الوقت المحدد
31 | plusMinutes() To increase minutes to the current time - للزيادة دقائق إلى الوقت المحدد
32 | plusSeconds() To increase seconds to the current time - للزيادة ثواني إلى الوقت المحدد
33 |
34 | minusHours() To decrease hours from the current time - للنقص ساعات من الوقت المحدد
35 | minusMinutes() To decrease minutes from the current time - للنقص دقائق من الوقت المحدد
36 | minusSeconds() To decrease seconds from the current time - للنقص ثواني من الوقت المحدد
37 |
38 |
39 |
40 | */
--------------------------------------------------------------------------------
/Lesson 29 - الدرس/App.java:
--------------------------------------------------------------------------------
1 | import java.time.LocalDate;
2 | import java.time.LocalDateTime;
3 | import java.time.LocalTime;
4 | import java.time.ZoneId;
5 |
6 | class App{
7 | public static void main(String[] args) {
8 | ZoneId zoneId = ZoneId.of("UTC");
9 |
10 | System.out.println(LocalTime.now(zoneId));
11 | System.out.println(LocalDate.now(zoneId));
12 | System.out.println(LocalDateTime.now(zoneId));
13 | }
14 | }
15 |
16 |
17 |
18 | // import java.time.ZoneId; للتزويد مشروعك بكلاس الذي يمكنك من حصول على الوقت او التاريخ حسب توقيت الذي تحدده
19 | // To provide your project with a class that enables you to get the time date according to the time zone you specify
20 |
21 | // import java.time.LocalTime; للتزويد مشروعك بكلاس الذي يمكنك من حصول على الوقت الحالي
22 | // To provide your project with a class that enables you to get the current time
23 |
24 | // import java.time.LocalDate; للتزويد مشروعك بكلاس الذي يمكنك من حصول على التاريخ الحالي
25 | // To provide your project with a class that enables you to get the current date
26 |
27 | // import java.time.LocalDateTime; للتزويد مشروعك بكلاس الذي يمكنك من حصول على الوقت و التاريخ الحالي
28 | // To provide your project with a class that enables you to get the current time and date
29 |
30 |
31 |
32 |
33 |
34 |
35 | // Etc/GMT+12 (UTC-12:00)
36 | // Pacific/Pago_Pago (UTC-11:00)
37 | // Pacific/Samoa (UTC-11:00)
38 | // Pacific/Niue (UTC-11:00)
39 | // US/Samoa (UTC-11:00)
40 | // Etc/GMT+11 (UTC-11:00)
41 | // Pacific/Midway (UTC-11:00)
42 | // Pacific/Honolulu (UTC-10:00)
43 | // Pacific/Rarotonga (UTC-10:00)
44 | // Pacific/Tahiti (UTC-10:00)
45 | // Pacific/Johnston (UTC-10:00)
46 | // US/Hawaii (UTC-10:00)
47 | // SystemV/HST10 (UTC-10:00)
48 | // Etc/GMT+10 (UTC-10:00)
49 | // Pacific/Marquesas (UTC-09:30)
50 | // Etc/GMT+9 (UTC-09:00)
51 | // Pacific/Gambier (UTC-09:00)
52 | // America/Atka (UTC-09:00)
53 | // SystemV/YST9 (UTC-09:00)
54 | // America/Adak (UTC-09:00)
55 | // US/Aleutian (UTC-09:00)
56 | // Etc/GMT+8 (UTC-08:00)
57 | // US/Alaska (UTC-08:00)
58 | // America/Juneau (UTC-08:00)
59 | // America/Metlakatla (UTC-08:00)
60 | // America/Yakutat (UTC-08:00)
61 | // Pacific/Pitcairn (UTC-08:00)
62 | // America/Sitka (UTC-08:00)
63 | // America/Anchorage (UTC-08:00)
64 | // SystemV/PST8 (UTC-08:00)
65 | // America/Nome (UTC-08:00)
66 | // SystemV/YST9YDT (UTC-08:00)
67 | // Canada/Yukon (UTC-07:00)
68 | // US/Pacific-New (UTC-07:00)
69 | // Etc/GMT+7 (UTC-07:00)
70 | // US/Arizona (UTC-07:00)
71 | // America/Dawson_Creek (UTC-07:00)
72 | // Canada/Pacific (UTC-07:00)
73 | // PST8PDT (UTC-07:00)
74 | // SystemV/MST7 (UTC-07:00)
75 | // America/Dawson (UTC-07:00)
76 | // Mexico/BajaNorte (UTC-07:00)
77 | // America/Tijuana (UTC-07:00)
78 | // America/Creston (UTC-07:00)
79 | // America/Hermosillo (UTC-07:00)
80 | // America/Santa_Isabel (UTC-07:00)
81 | // America/Vancouver (UTC-07:00)
82 | // America/Ensenada (UTC-07:00)
83 | // America/Phoenix (UTC-07:00)
84 | // America/Whitehorse (UTC-07:00)
85 | // America/Fort_Nelson (UTC-07:00)
86 | // SystemV/PST8PDT (UTC-07:00)
87 | // America/Los_Angeles (UTC-07:00)
88 | // US/Pacific (UTC-07:00)
89 | // America/El_Salvador (UTC-06:00)
90 | // America/Guatemala (UTC-06:00)
91 | // America/Belize (UTC-06:00)
92 | // America/Managua (UTC-06:00)
93 | // America/Tegucigalpa (UTC-06:00)
94 | // Etc/GMT+6 (UTC-06:00)
95 | // Pacific/Easter (UTC-06:00)
96 | // Mexico/BajaSur (UTC-06:00)
97 | // America/Regina (UTC-06:00)
98 | // America/Denver (UTC-06:00)
99 | // Pacific/Galapagos (UTC-06:00)
100 | // America/Yellowknife (UTC-06:00)
101 | // America/Swift_Current (UTC-06:00)
102 | // America/Inuvik (UTC-06:00)
103 | // America/Mazatlan (UTC-06:00)
104 | // America/Boise (UTC-06:00)
105 | // America/Costa_Rica (UTC-06:00)
106 | // MST7MDT (UTC-06:00)
107 | // SystemV/CST6 (UTC-06:00)
108 | // America/Chihuahua (UTC-06:00)
109 | // America/Ojinaga (UTC-06:00)
110 | // Chile/EasterIsland (UTC-06:00)
111 | // US/Mountain (UTC-06:00)
112 | // America/Edmonton (UTC-06:00)
113 | // Canada/Mountain (UTC-06:00)
114 | // America/Cambridge_Bay (UTC-06:00)
115 | // Navajo (UTC-06:00)
116 | // SystemV/MST7MDT (UTC-06:00)
117 | // Canada/Saskatchewan (UTC-06:00)
118 | // America/Shiprock (UTC-06:00)
119 | // America/Panama (UTC-05:00)
120 | // America/Chicago (UTC-05:00)
121 | // America/Eirunepe (UTC-05:00)
122 | // Etc/GMT+5 (UTC-05:00)
123 | // Mexico/General (UTC-05:00)
124 | // America/Porto_Acre (UTC-05:00)
125 | // America/Guayaquil (UTC-05:00)
126 | // America/Rankin_Inlet (UTC-05:00)
127 | // US/Central (UTC-05:00)
128 | // America/Rainy_River (UTC-05:00)
129 | // America/Indiana/Knox (UTC-05:00)
130 | // America/North_Dakota/Beulah (UTC-05:00)
131 | // America/Monterrey (UTC-05:00)
132 | // America/Jamaica (UTC-05:00)
133 | // America/Atikokan (UTC-05:00)
134 | // America/Coral_Harbour (UTC-05:00)
135 | // America/North_Dakota/Center (UTC-05:00)
136 | // America/Cayman (UTC-05:00)
137 | // America/Indiana/Tell_City (UTC-05:00)
138 | // America/Mexico_City (UTC-05:00)
139 | // America/Matamoros (UTC-05:00)
140 | // CST6CDT (UTC-05:00)
141 | // America/Knox_IN (UTC-05:00)
142 | // America/Bogota (UTC-05:00)
143 | // America/Menominee (UTC-05:00)
144 | // America/Resolute (UTC-05:00)
145 | // SystemV/EST5 (UTC-05:00)
146 | // Canada/Central (UTC-05:00)
147 | // Brazil/Acre (UTC-05:00)
148 | // America/Cancun (UTC-05:00)
149 | // America/Lima (UTC-05:00)
150 | // America/Bahia_Banderas (UTC-05:00)
151 | // US/Indiana-Starke (UTC-05:00)
152 | // America/Rio_Branco (UTC-05:00)
153 | // SystemV/CST6CDT (UTC-05:00)
154 | // Jamaica (UTC-05:00)
155 | // America/Merida (UTC-05:00)
156 | // America/North_Dakota/New_Salem (UTC-05:00)
157 | // America/Winnipeg (UTC-05:00)
158 | // America/Cuiaba (UTC-04:00)
159 | // America/Marigot (UTC-04:00)
160 | // America/Indiana/Petersburg (UTC-04:00)
161 | // Chile/Continental (UTC-04:00)
162 | // America/Grand_Turk (UTC-04:00)
163 | // Cuba (UTC-04:00)
164 | // Etc/GMT+4 (UTC-04:00)
165 | // America/Manaus (UTC-04:00)
166 | // America/Fort_Wayne (UTC-04:00)
167 | // America/St_Thomas (UTC-04:00)
168 | // America/Anguilla (UTC-04:00)
169 | // America/Havana (UTC-04:00)
170 | // US/Michigan (UTC-04:00)
171 | // America/Barbados (UTC-04:00)
172 | // America/Louisville (UTC-04:00)
173 | // America/Curacao (UTC-04:00)
174 | // America/Guyana (UTC-04:00)
175 | // America/Martinique (UTC-04:00)
176 | // America/Puerto_Rico (UTC-04:00)
177 | // America/Port_of_Spain (UTC-04:00)
178 | // SystemV/AST4 (UTC-04:00)
179 | // America/Indiana/Vevay (UTC-04:00)
180 | // America/Indiana/Vincennes (UTC-04:00)
181 | // America/Kralendijk (UTC-04:00)
182 | // America/Antigua (UTC-04:00)
183 | // America/Indianapolis (UTC-04:00)
184 | // America/Iqaluit (UTC-04:00)
185 | // America/St_Vincent (UTC-04:00)
186 | // America/Kentucky/Louisville (UTC-04:00)
187 | // America/Dominica (UTC-04:00)
188 | // America/Asuncion (UTC-04:00)
189 | // EST5EDT (UTC-04:00)
190 | // America/Nassau (UTC-04:00)
191 | // America/Kentucky/Monticello (UTC-04:00)
192 | // Brazil/West (UTC-04:00)
193 | // America/Aruba (UTC-04:00)
194 | // America/Indiana/Indianapolis (UTC-04:00)
195 | // America/Santiago (UTC-04:00)
196 | // America/La_Paz (UTC-04:00)
197 | // America/Thunder_Bay (UTC-04:00)
198 | // America/Indiana/Marengo (UTC-04:00)
199 | // America/Blanc-Sablon (UTC-04:00)
200 | // America/Santo_Domingo (UTC-04:00)
201 | // US/Eastern (UTC-04:00)
202 | // Canada/Eastern (UTC-04:00)
203 | // America/Port-au-Prince (UTC-04:00)
204 | // America/St_Barthelemy (UTC-04:00)
205 | // America/Nipigon (UTC-04:00)
206 | // US/East-Indiana (UTC-04:00)
207 | // America/St_Lucia (UTC-04:00)
208 | // America/Montserrat (UTC-04:00)
209 | // America/Lower_Princes (UTC-04:00)
210 | // America/Detroit (UTC-04:00)
211 | // America/Tortola (UTC-04:00)
212 | // America/Porto_Velho (UTC-04:00)
213 | // America/Campo_Grande (UTC-04:00)
214 | // America/Virgin (UTC-04:00)
215 | // America/Pangnirtung (UTC-04:00)
216 | // America/Montreal (UTC-04:00)
217 | // America/Indiana/Winamac (UTC-04:00)
218 | // America/Boa_Vista (UTC-04:00)
219 | // America/Grenada (UTC-04:00)
220 | // America/New_York (UTC-04:00)
221 | // America/St_Kitts (UTC-04:00)
222 | // America/Caracas (UTC-04:00)
223 | // America/Guadeloupe (UTC-04:00)
224 | // America/Toronto (UTC-04:00)
225 | // SystemV/EST5EDT (UTC-04:00)
226 | // America/Argentina/Catamarca (UTC-03:00)
227 | // Canada/Atlantic (UTC-03:00)
228 | // America/Argentina/Cordoba (UTC-03:00)
229 | // America/Araguaina (UTC-03:00)
230 | // America/Argentina/Salta (UTC-03:00)
231 | // Etc/GMT+3 (UTC-03:00)
232 | // America/Montevideo (UTC-03:00)
233 | // Brazil/East (UTC-03:00)
234 | // America/Argentina/Mendoza (UTC-03:00)
235 | // America/Argentina/Rio_Gallegos (UTC-03:00)
236 | // America/Catamarca (UTC-03:00)
237 | // America/Cordoba (UTC-03:00)
238 | // America/Sao_Paulo (UTC-03:00)
239 | // America/Argentina/Jujuy (UTC-03:00)
240 | // America/Cayenne (UTC-03:00)
241 | // America/Recife (UTC-03:00)
242 | // America/Buenos_Aires (UTC-03:00)
243 | // America/Paramaribo (UTC-03:00)
244 | // America/Moncton (UTC-03:00)
245 | // America/Mendoza (UTC-03:00)
246 | // America/Santarem (UTC-03:00)
247 | // Atlantic/Bermuda (UTC-03:00)
248 | // America/Maceio (UTC-03:00)
249 | // Atlantic/Stanley (UTC-03:00)
250 | // America/Halifax (UTC-03:00)
251 | // Antarctica/Rothera (UTC-03:00)
252 | // America/Argentina/San_Luis (UTC-03:00)
253 | // America/Argentina/Ushuaia (UTC-03:00)
254 | // Antarctica/Palmer (UTC-03:00)
255 | // America/Punta_Arenas (UTC-03:00)
256 | // America/Glace_Bay (UTC-03:00)
257 | // America/Fortaleza (UTC-03:00)
258 | // America/Thule (UTC-03:00)
259 | // America/Argentina/La_Rioja (UTC-03:00)
260 | // America/Belem (UTC-03:00)
261 | // America/Jujuy (UTC-03:00)
262 | // America/Bahia (UTC-03:00)
263 | // America/Goose_Bay (UTC-03:00)
264 | // America/Argentina/San_Juan (UTC-03:00)
265 | // America/Argentina/ComodRivadavia (UTC-03:00)
266 | // America/Argentina/Tucuman (UTC-03:00)
267 | // America/Rosario (UTC-03:00)
268 | // SystemV/AST4ADT (UTC-03:00)
269 | // America/Argentina/Buenos_Aires (UTC-03:00)
270 | // America/St_Johns (UTC-02:30)
271 | // Canada/Newfoundland (UTC-02:30)
272 | // America/Miquelon (UTC-02:00)
273 | // Etc/GMT+2 (UTC-02:00)
274 | // America/Godthab (UTC-02:00)
275 | // America/Noronha (UTC-02:00)
276 | // Brazil/DeNoronha (UTC-02:00)
277 | // Atlantic/South_Georgia (UTC-02:00)
278 | // Etc/GMT+1 (UTC-01:00)
279 | // Atlantic/Cape_Verde (UTC-01:00)
280 | // Pacific/Kiritimati (UTC+14:00)
281 | // Etc/GMT-14 (UTC+14:00)
282 | // Pacific/Fakaofo (UTC+13:00)
283 | // Pacific/Enderbury (UTC+13:00)
284 | // Pacific/Apia (UTC+13:00)
285 | // Pacific/Tongatapu (UTC+13:00)
286 | // Etc/GMT-13 (UTC+13:00)
287 | // NZ-CHAT (UTC+12:45)
288 | // Pacific/Chatham (UTC+12:45)
289 | // Pacific/Kwajalein (UTC+12:00)
290 | // Antarctica/McMurdo (UTC+12:00)
291 | // Pacific/Wallis (UTC+12:00)
292 | // Pacific/Fiji (UTC+12:00)
293 | // Pacific/Funafuti (UTC+12:00)
294 | // Pacific/Nauru (UTC+12:00)
295 | // Kwajalein (UTC+12:00)
296 | // NZ (UTC+12:00)
297 | // Pacific/Wake (UTC+12:00)
298 | // Antarctica/South_Pole (UTC+12:00)
299 | // Pacific/Tarawa (UTC+12:00)
300 | // Pacific/Auckland (UTC+12:00)
301 | // Asia/Kamchatka (UTC+12:00)
302 | // Etc/GMT-12 (UTC+12:00)
303 | // Asia/Anadyr (UTC+12:00)
304 | // Pacific/Majuro (UTC+12:00)
305 | // Pacific/Ponape (UTC+11:00)
306 | // Pacific/Bougainville (UTC+11:00)
307 | // Antarctica/Macquarie (UTC+11:00)
308 | // Pacific/Pohnpei (UTC+11:00)
309 | // Pacific/Efate (UTC+11:00)
310 | // Pacific/Norfolk (UTC+11:00)
311 | // Asia/Magadan (UTC+11:00)
312 | // Pacific/Kosrae (UTC+11:00)
313 | // Asia/Sakhalin (UTC+11:00)
314 | // Pacific/Noumea (UTC+11:00)
315 | // Etc/GMT-11 (UTC+11:00)
316 | // Asia/Srednekolymsk (UTC+11:00)
317 | // Pacific/Guadalcanal (UTC+11:00)
318 | // Australia/Lord_Howe (UTC+10:30)
319 | // Australia/LHI (UTC+10:30)
320 | // Australia/Hobart (UTC+10:00)
321 | // Pacific/Yap (UTC+10:00)
322 | // Australia/Tasmania (UTC+10:00)
323 | // Pacific/Port_Moresby (UTC+10:00)
324 | // Australia/ACT (UTC+10:00)
325 | // Australia/Victoria (UTC+10:00)
326 | // Pacific/Chuuk (UTC+10:00)
327 | // Australia/Queensland (UTC+10:00)
328 | // Australia/Canberra (UTC+10:00)
329 | // Australia/Currie (UTC+10:00)
330 | // Pacific/Guam (UTC+10:00)
331 | // Pacific/Truk (UTC+10:00)
332 | // Australia/NSW (UTC+10:00)
333 | // Asia/Vladivostok (UTC+10:00)
334 | // Pacific/Saipan (UTC+10:00)
335 | // Antarctica/DumontDUrville (UTC+10:00)
336 | // Australia/Sydney (UTC+10:00)
337 | // Australia/Brisbane (UTC+10:00)
338 | // Etc/GMT-10 (UTC+10:00)
339 | // Asia/Ust-Nera (UTC+10:00)
340 | // Australia/Melbourne (UTC+10:00)
341 | // Australia/Lindeman (UTC+10:00)
342 | // Australia/North (UTC+09:30)
343 | // Australia/Yancowinna (UTC+09:30)
344 | // Australia/Adelaide (UTC+09:30)
345 | // Australia/Broken_Hill (UTC+09:30)
346 | // Australia/South (UTC+09:30)
347 | // Australia/Darwin (UTC+09:30)
348 | // Etc/GMT-9 (UTC+09:00)
349 | // Pacific/Palau (UTC+09:00)
350 | // Asia/Chita (UTC+09:00)
351 | // Asia/Dili (UTC+09:00)
352 | // Asia/Jayapura (UTC+09:00)
353 | // Asia/Yakutsk (UTC+09:00)
354 | // Asia/Pyongyang (UTC+09:00)
355 | // ROK (UTC+09:00)
356 | // Asia/Seoul (UTC+09:00)
357 | // Asia/Khandyga (UTC+09:00)
358 | // Japan (UTC+09:00)
359 | // Asia/Tokyo (UTC+09:00)
360 | // Australia/Eucla (UTC+08:45)
361 | // Asia/Kuching (UTC+08:00)
362 | // Asia/Chungking (UTC+08:00)
363 | // Etc/GMT-8 (UTC+08:00)
364 | // Australia/Perth (UTC+08:00)
365 | // Asia/Macao (UTC+08:00)
366 | // Asia/Macau (UTC+08:00)
367 | // Asia/Choibalsan (UTC+08:00)
368 | // Asia/Shanghai (UTC+08:00)
369 | // Antarctica/Casey (UTC+08:00)
370 | // Asia/Ulan_Bator (UTC+08:00)
371 | // Asia/Chongqing (UTC+08:00)
372 | // Asia/Ulaanbaatar (UTC+08:00)
373 | // Asia/Taipei (UTC+08:00)
374 | // Asia/Manila (UTC+08:00)
375 | // PRC (UTC+08:00)
376 | // Asia/Ujung_Pandang (UTC+08:00)
377 | // Asia/Harbin (UTC+08:00)
378 | // Singapore (UTC+08:00)
379 | // Asia/Brunei (UTC+08:00)
380 | // Australia/West (UTC+08:00)
381 | // Asia/Hong_Kong (UTC+08:00)
382 | // Asia/Makassar (UTC+08:00)
383 | // Hongkong (UTC+08:00)
384 | // Asia/Kuala_Lumpur (UTC+08:00)
385 | // Asia/Irkutsk (UTC+08:00)
386 | // Asia/Singapore (UTC+08:00)
387 | // Asia/Pontianak (UTC+07:00)
388 | // Etc/GMT-7 (UTC+07:00)
389 | // Asia/Phnom_Penh (UTC+07:00)
390 | // Asia/Novosibirsk (UTC+07:00)
391 | // Antarctica/Davis (UTC+07:00)
392 | // Asia/Tomsk (UTC+07:00)
393 | // Asia/Jakarta (UTC+07:00)
394 | // Asia/Barnaul (UTC+07:00)
395 | // Indian/Christmas (UTC+07:00)
396 | // Asia/Ho_Chi_Minh (UTC+07:00)
397 | // Asia/Hovd (UTC+07:00)
398 | // Asia/Bangkok (UTC+07:00)
399 | // Asia/Vientiane (UTC+07:00)
400 | // Asia/Novokuznetsk (UTC+07:00)
401 | // Asia/Krasnoyarsk (UTC+07:00)
402 | // Asia/Saigon (UTC+07:00)
403 | // Asia/Yangon (UTC+06:30)
404 | // Asia/Rangoon (UTC+06:30)
405 | // Indian/Cocos (UTC+06:30)
406 | // Asia/Kashgar (UTC+06:00)
407 | // Etc/GMT-6 (UTC+06:00)
408 | // Asia/Almaty (UTC+06:00)
409 | // Asia/Dacca (UTC+06:00)
410 | // Asia/Omsk (UTC+06:00)
411 | // Asia/Dhaka (UTC+06:00)
412 | // Indian/Chagos (UTC+06:00)
413 | // Asia/Qyzylorda (UTC+06:00)
414 | // Asia/Bishkek (UTC+06:00)
415 | // Antarctica/Vostok (UTC+06:00)
416 | // Asia/Urumqi (UTC+06:00)
417 | // Asia/Thimbu (UTC+06:00)
418 | // Asia/Thimphu (UTC+06:00)
419 | // Asia/Kathmandu (UTC+05:45)
420 | // Asia/Katmandu (UTC+05:45)
421 | // Asia/Kolkata (UTC+05:30)
422 | // Asia/Colombo (UTC+05:30)
423 | // Asia/Calcutta (UTC+05:30)
424 | // Asia/Aqtau (UTC+05:00)
425 | // Etc/GMT-5 (UTC+05:00)
426 | // Asia/Samarkand (UTC+05:00)
427 | // Asia/Karachi (UTC+05:00)
428 | // Asia/Yekaterinburg (UTC+05:00)
429 | // Asia/Dushanbe (UTC+05:00)
430 | // Indian/Maldives (UTC+05:00)
431 | // Asia/Oral (UTC+05:00)
432 | // Asia/Tashkent (UTC+05:00)
433 | // Antarctica/Mawson (UTC+05:00)
434 | // Asia/Aqtobe (UTC+05:00)
435 | // Asia/Ashkhabad (UTC+05:00)
436 | // Asia/Ashgabat (UTC+05:00)
437 | // Asia/Atyrau (UTC+05:00)
438 | // Indian/Kerguelen (UTC+05:00)
439 | // Iran (UTC+04:30)
440 | // Asia/Tehran (UTC+04:30)
441 | // Asia/Kabul (UTC+04:30)
442 | // Asia/Yerevan (UTC+04:00)
443 | // Etc/GMT-4 (UTC+04:00)
444 | // Asia/Dubai (UTC+04:00)
445 | // Indian/Reunion (UTC+04:00)
446 | // Indian/Mauritius (UTC+04:00)
447 | // Europe/Saratov (UTC+04:00)
448 | // Europe/Samara (UTC+04:00)
449 | // Indian/Mahe (UTC+04:00)
450 | // Asia/Baku (UTC+04:00)
451 | // Asia/Muscat (UTC+04:00)
452 | // Europe/Volgograd (UTC+04:00)
453 | // Europe/Astrakhan (UTC+04:00)
454 | // Asia/Tbilisi (UTC+04:00)
455 | // Europe/Ulyanovsk (UTC+04:00)
456 | // Asia/Aden (UTC+03:00)
457 | // Africa/Nairobi (UTC+03:00)
458 | // Europe/Istanbul (UTC+03:00)
459 | // Etc/GMT-3 (UTC+03:00)
460 | // Europe/Zaporozhye (UTC+03:00)
461 | // Israel (UTC+03:00)
462 | // Indian/Comoro (UTC+03:00)
463 | // Antarctica/Syowa (UTC+03:00)
464 | // Africa/Mogadishu (UTC+03:00)
465 | // Europe/Bucharest (UTC+03:00)
466 | // Africa/Asmera (UTC+03:00)
467 | // Europe/Mariehamn (UTC+03:00)
468 | // Asia/Istanbul (UTC+03:00)
469 | // Europe/Tiraspol (UTC+03:00)
470 | // Europe/Moscow (UTC+03:00)
471 | // Europe/Chisinau (UTC+03:00)
472 | // Europe/Helsinki (UTC+03:00)
473 | // Asia/Beirut (UTC+03:00)
474 | // Asia/Tel_Aviv (UTC+03:00)
475 | // Africa/Djibouti (UTC+03:00)
476 | // Europe/Simferopol (UTC+03:00)
477 | // Europe/Sofia (UTC+03:00)
478 | // Asia/Gaza (UTC+03:00)
479 | // Africa/Asmara (UTC+03:00)
480 | // Europe/Riga (UTC+03:00)
481 | // Asia/Baghdad (UTC+03:00)
482 | // Asia/Damascus (UTC+03:00)
483 | // Africa/Dar_es_Salaam (UTC+03:00)
484 | // Africa/Addis_Ababa (UTC+03:00)
485 | // Europe/Uzhgorod (UTC+03:00)
486 | // Asia/Jerusalem (UTC+03:00)
487 | // Asia/Riyadh (UTC+03:00)
488 | // Asia/Kuwait (UTC+03:00)
489 | // Europe/Kirov (UTC+03:00)
490 | // Africa/Kampala (UTC+03:00)
491 | // Europe/Minsk (UTC+03:00)
492 | // Asia/Qatar (UTC+03:00)
493 | // Europe/Kiev (UTC+03:00)
494 | // Asia/Bahrain (UTC+03:00)
495 | // Europe/Vilnius (UTC+03:00)
496 | // Indian/Antananarivo (UTC+03:00)
497 | // Indian/Mayotte (UTC+03:00)
498 | // Europe/Tallinn (UTC+03:00)
499 | // Turkey (UTC+03:00)
500 | // Africa/Juba (UTC+03:00)
501 | // Asia/Nicosia (UTC+03:00)
502 | // Asia/Famagusta (UTC+03:00)
503 | // W-SU (UTC+03:00)
504 | // EET (UTC+03:00)
505 | // Asia/Hebron (UTC+03:00)
506 | // Asia/Amman (UTC+03:00)
507 | // Europe/Nicosia (UTC+03:00)
508 | // Europe/Athens (UTC+03:00)
509 | // Africa/Cairo (UTC+02:00)
510 | // Africa/Mbabane (UTC+02:00)
511 | // Europe/Brussels (UTC+02:00)
512 | // Europe/Warsaw (UTC+02:00)
513 | // CET (UTC+02:00)
514 | // Europe/Luxembourg (UTC+02:00)
515 | // Etc/GMT-2 (UTC+02:00)
516 | // Libya (UTC+02:00)
517 | // Africa/Kigali (UTC+02:00)
518 | // Africa/Tripoli (UTC+02:00)
519 | // Europe/Kaliningrad (UTC+02:00)
520 | // Africa/Windhoek (UTC+02:00)
521 | // Europe/Malta (UTC+02:00)
522 | // Europe/Busingen (UTC+02:00)
523 | // Europe/Skopje (UTC+02:00)
524 | // Europe/Sarajevo (UTC+02:00)
525 | // Europe/Rome (UTC+02:00)
526 | // Europe/Zurich (UTC+02:00)
527 | // Europe/Gibraltar (UTC+02:00)
528 | // Africa/Lubumbashi (UTC+02:00)
529 | // Europe/Vaduz (UTC+02:00)
530 | // Europe/Ljubljana (UTC+02:00)
531 | // Europe/Berlin (UTC+02:00)
532 | // Europe/Stockholm (UTC+02:00)
533 | // Europe/Budapest (UTC+02:00)
534 | // Europe/Zagreb (UTC+02:00)
535 | // Europe/Paris (UTC+02:00)
536 | // Africa/Ceuta (UTC+02:00)
537 | // Europe/Prague (UTC+02:00)
538 | // Antarctica/Troll (UTC+02:00)
539 | // Africa/Gaborone (UTC+02:00)
540 | // Europe/Copenhagen (UTC+02:00)
541 | // Europe/Vienna (UTC+02:00)
542 | // Europe/Tirane (UTC+02:00)
543 | // MET (UTC+02:00)
544 | // Europe/Amsterdam (UTC+02:00)
545 | // Africa/Maputo (UTC+02:00)
546 | // Europe/San_Marino (UTC+02:00)
547 | // Poland (UTC+02:00)
548 | // Europe/Andorra (UTC+02:00)
549 | // Europe/Oslo (UTC+02:00)
550 | // Europe/Podgorica (UTC+02:00)
551 | // Africa/Bujumbura (UTC+02:00)
552 | // Atlantic/Jan_Mayen (UTC+02:00)
553 | // Africa/Maseru (UTC+02:00)
554 | // Europe/Madrid (UTC+02:00)
555 | // Africa/Blantyre (UTC+02:00)
556 | // Africa/Lusaka (UTC+02:00)
557 | // Africa/Harare (UTC+02:00)
558 | // Africa/Khartoum (UTC+02:00)
559 | // Africa/Johannesburg (UTC+02:00)
560 | // Europe/Belgrade (UTC+02:00)
561 | // Europe/Bratislava (UTC+02:00)
562 | // Arctic/Longyearbyen (UTC+02:00)
563 | // Egypt (UTC+02:00)
564 | // Europe/Vatican (UTC+02:00)
565 | // Europe/Monaco (UTC+02:00)
566 | // Europe/London (UTC+01:00)
567 | // Etc/GMT-1 (UTC+01:00)
568 | // Europe/Jersey (UTC+01:00)
569 | // Europe/Guernsey (UTC+01:00)
570 | // Europe/Isle_of_Man (UTC+01:00)
571 | // Africa/Tunis (UTC+01:00)
572 | // Africa/Malabo (UTC+01:00)
573 | // GB-Eire (UTC+01:00)
574 | // Africa/Lagos (UTC+01:00)
575 | // Africa/Algiers (UTC+01:00)
576 | // GB (UTC+01:00)
577 | // Portugal (UTC+01:00)
578 | // Africa/Sao_Tome (UTC+01:00)
579 | // Africa/Ndjamena (UTC+01:00)
580 | // Atlantic/Faeroe (UTC+01:00)
581 | // Eire (UTC+01:00)
582 | // Atlantic/Faroe (UTC+01:00)
583 | // Europe/Dublin (UTC+01:00)
584 | // Africa/Libreville (UTC+01:00)
585 | // Africa/El_Aaiun (UTC+01:00)
586 | // Africa/Douala (UTC+01:00)
587 | // Africa/Brazzaville (UTC+01:00)
588 | // Africa/Porto-Novo (UTC+01:00)
589 | // Atlantic/Madeira (UTC+01:00)
590 | // Europe/Lisbon (UTC+01:00)
591 | // Atlantic/Canary (UTC+01:00)
592 | // Africa/Casablanca (UTC+01:00)
593 | // Europe/Belfast (UTC+01:00)
594 | // Africa/Luanda (UTC+01:00)
595 | // Africa/Kinshasa (UTC+01:00)
596 | // Africa/Bangui (UTC+01:00)
597 | // WET (UTC+01:00)
598 | // Africa/Niamey (UTC+01:00)
599 | // GMT (UTC+00:00)
600 | // Etc/GMT-0 (UTC+00:00)
601 | // Atlantic/St_Helena (UTC+00:00)
602 | // Etc/GMT+0 (UTC+00:00)
603 | // Africa/Banjul (UTC+00:00)
604 | // Etc/GMT (UTC+00:00)
605 | // Africa/Freetown (UTC+00:00)
606 | // Africa/Bamako (UTC+00:00)
607 | // Africa/Conakry (UTC+00:00)
608 | // Universal (UTC+00:00)
609 | // Africa/Nouakchott (UTC+00:00)
610 | // UTC (UTC+00:00)
611 | // Etc/Universal (UTC+00:00)
612 | // Atlantic/Azores (UTC+00:00)
613 | // Africa/Abidjan (UTC+00:00)
614 | // Africa/Accra (UTC+00:00)
615 | // Etc/UCT (UTC+00:00)
616 | // GMT0 (UTC+00:00)
617 | // Zulu (UTC+00:00)
618 | // Africa/Ouagadougou (UTC+00:00)
619 | // Atlantic/Reykjavik (UTC+00:00)
620 | // Etc/Zulu (UTC+00:00)
621 | // Iceland (UTC+00:00)
622 | // Africa/Lome (UTC+00:00)
623 | // Greenwich (UTC+00:00)
624 | // Etc/GMT0 (UTC+00:00)
625 | // America/Danmarkshavn (UTC+00:00)
626 | // Africa/Dakar (UTC+00:00)
627 | // America/Scoresbysund (UTC+00:00)
628 | // Africa/Bissau (UTC+00:00)
629 | // Etc/Greenwich (UTC+00:00)
630 | // Africa/Timbuktu (UTC+00:00)
631 | // UCT (UTC+00:00)
632 | // Africa/Monrovia (UTC+00:00)
633 | // Etc/UTC (UTC+00:00)
--------------------------------------------------------------------------------
/Lesson 30 - الدرس/App.java:
--------------------------------------------------------------------------------
1 | import java.time.LocalDate;
2 | import java.time.LocalDateTime;
3 | import java.time.LocalTime;
4 | import java.time.ZoneId;
5 |
6 | class App{
7 | public static void main(String[] args) {
8 | ZoneId zoneId = ZoneId.of("UTC");
9 |
10 | System.out.println(LocalTime.now(zoneId));
11 | System.out.println(LocalDate.now(zoneId));
12 | System.out.println(LocalDateTime.now(zoneId));
13 | }
14 | }
15 |
16 |
17 |
18 | // import java.time.ZoneId; للتزويد مشروعك بكلاس الذي يمكنك من حصول على الوقت او التاريخ حسب توقيت الذي تحدده
19 | // To provide your project with a class that enables you to get the time date according to the time zone you specify
20 |
21 | // import java.time.LocalTime; للتزويد مشروعك بكلاس الذي يمكنك من حصول على الوقت الحالي
22 | // To provide your project with a class that enables you to get the current time
23 |
24 | // import java.time.LocalDate; للتزويد مشروعك بكلاس الذي يمكنك من حصول على التاريخ الحالي
25 | // To provide your project with a class that enables you to get the current date
26 |
27 | // import java.time.LocalDateTime; للتزويد مشروعك بكلاس الذي يمكنك من حصول على الوقت و التاريخ الحالي
28 | // To provide your project with a class that enables you to get the current time and date
29 |
30 |
31 |
32 |
33 |
34 |
35 | // Etc/GMT+12 (UTC-12:00)
36 | // Pacific/Pago_Pago (UTC-11:00)
37 | // Pacific/Samoa (UTC-11:00)
38 | // Pacific/Niue (UTC-11:00)
39 | // US/Samoa (UTC-11:00)
40 | // Etc/GMT+11 (UTC-11:00)
41 | // Pacific/Midway (UTC-11:00)
42 | // Pacific/Honolulu (UTC-10:00)
43 | // Pacific/Rarotonga (UTC-10:00)
44 | // Pacific/Tahiti (UTC-10:00)
45 | // Pacific/Johnston (UTC-10:00)
46 | // US/Hawaii (UTC-10:00)
47 | // SystemV/HST10 (UTC-10:00)
48 | // Etc/GMT+10 (UTC-10:00)
49 | // Pacific/Marquesas (UTC-09:30)
50 | // Etc/GMT+9 (UTC-09:00)
51 | // Pacific/Gambier (UTC-09:00)
52 | // America/Atka (UTC-09:00)
53 | // SystemV/YST9 (UTC-09:00)
54 | // America/Adak (UTC-09:00)
55 | // US/Aleutian (UTC-09:00)
56 | // Etc/GMT+8 (UTC-08:00)
57 | // US/Alaska (UTC-08:00)
58 | // America/Juneau (UTC-08:00)
59 | // America/Metlakatla (UTC-08:00)
60 | // America/Yakutat (UTC-08:00)
61 | // Pacific/Pitcairn (UTC-08:00)
62 | // America/Sitka (UTC-08:00)
63 | // America/Anchorage (UTC-08:00)
64 | // SystemV/PST8 (UTC-08:00)
65 | // America/Nome (UTC-08:00)
66 | // SystemV/YST9YDT (UTC-08:00)
67 | // Canada/Yukon (UTC-07:00)
68 | // US/Pacific-New (UTC-07:00)
69 | // Etc/GMT+7 (UTC-07:00)
70 | // US/Arizona (UTC-07:00)
71 | // America/Dawson_Creek (UTC-07:00)
72 | // Canada/Pacific (UTC-07:00)
73 | // PST8PDT (UTC-07:00)
74 | // SystemV/MST7 (UTC-07:00)
75 | // America/Dawson (UTC-07:00)
76 | // Mexico/BajaNorte (UTC-07:00)
77 | // America/Tijuana (UTC-07:00)
78 | // America/Creston (UTC-07:00)
79 | // America/Hermosillo (UTC-07:00)
80 | // America/Santa_Isabel (UTC-07:00)
81 | // America/Vancouver (UTC-07:00)
82 | // America/Ensenada (UTC-07:00)
83 | // America/Phoenix (UTC-07:00)
84 | // America/Whitehorse (UTC-07:00)
85 | // America/Fort_Nelson (UTC-07:00)
86 | // SystemV/PST8PDT (UTC-07:00)
87 | // America/Los_Angeles (UTC-07:00)
88 | // US/Pacific (UTC-07:00)
89 | // America/El_Salvador (UTC-06:00)
90 | // America/Guatemala (UTC-06:00)
91 | // America/Belize (UTC-06:00)
92 | // America/Managua (UTC-06:00)
93 | // America/Tegucigalpa (UTC-06:00)
94 | // Etc/GMT+6 (UTC-06:00)
95 | // Pacific/Easter (UTC-06:00)
96 | // Mexico/BajaSur (UTC-06:00)
97 | // America/Regina (UTC-06:00)
98 | // America/Denver (UTC-06:00)
99 | // Pacific/Galapagos (UTC-06:00)
100 | // America/Yellowknife (UTC-06:00)
101 | // America/Swift_Current (UTC-06:00)
102 | // America/Inuvik (UTC-06:00)
103 | // America/Mazatlan (UTC-06:00)
104 | // America/Boise (UTC-06:00)
105 | // America/Costa_Rica (UTC-06:00)
106 | // MST7MDT (UTC-06:00)
107 | // SystemV/CST6 (UTC-06:00)
108 | // America/Chihuahua (UTC-06:00)
109 | // America/Ojinaga (UTC-06:00)
110 | // Chile/EasterIsland (UTC-06:00)
111 | // US/Mountain (UTC-06:00)
112 | // America/Edmonton (UTC-06:00)
113 | // Canada/Mountain (UTC-06:00)
114 | // America/Cambridge_Bay (UTC-06:00)
115 | // Navajo (UTC-06:00)
116 | // SystemV/MST7MDT (UTC-06:00)
117 | // Canada/Saskatchewan (UTC-06:00)
118 | // America/Shiprock (UTC-06:00)
119 | // America/Panama (UTC-05:00)
120 | // America/Chicago (UTC-05:00)
121 | // America/Eirunepe (UTC-05:00)
122 | // Etc/GMT+5 (UTC-05:00)
123 | // Mexico/General (UTC-05:00)
124 | // America/Porto_Acre (UTC-05:00)
125 | // America/Guayaquil (UTC-05:00)
126 | // America/Rankin_Inlet (UTC-05:00)
127 | // US/Central (UTC-05:00)
128 | // America/Rainy_River (UTC-05:00)
129 | // America/Indiana/Knox (UTC-05:00)
130 | // America/North_Dakota/Beulah (UTC-05:00)
131 | // America/Monterrey (UTC-05:00)
132 | // America/Jamaica (UTC-05:00)
133 | // America/Atikokan (UTC-05:00)
134 | // America/Coral_Harbour (UTC-05:00)
135 | // America/North_Dakota/Center (UTC-05:00)
136 | // America/Cayman (UTC-05:00)
137 | // America/Indiana/Tell_City (UTC-05:00)
138 | // America/Mexico_City (UTC-05:00)
139 | // America/Matamoros (UTC-05:00)
140 | // CST6CDT (UTC-05:00)
141 | // America/Knox_IN (UTC-05:00)
142 | // America/Bogota (UTC-05:00)
143 | // America/Menominee (UTC-05:00)
144 | // America/Resolute (UTC-05:00)
145 | // SystemV/EST5 (UTC-05:00)
146 | // Canada/Central (UTC-05:00)
147 | // Brazil/Acre (UTC-05:00)
148 | // America/Cancun (UTC-05:00)
149 | // America/Lima (UTC-05:00)
150 | // America/Bahia_Banderas (UTC-05:00)
151 | // US/Indiana-Starke (UTC-05:00)
152 | // America/Rio_Branco (UTC-05:00)
153 | // SystemV/CST6CDT (UTC-05:00)
154 | // Jamaica (UTC-05:00)
155 | // America/Merida (UTC-05:00)
156 | // America/North_Dakota/New_Salem (UTC-05:00)
157 | // America/Winnipeg (UTC-05:00)
158 | // America/Cuiaba (UTC-04:00)
159 | // America/Marigot (UTC-04:00)
160 | // America/Indiana/Petersburg (UTC-04:00)
161 | // Chile/Continental (UTC-04:00)
162 | // America/Grand_Turk (UTC-04:00)
163 | // Cuba (UTC-04:00)
164 | // Etc/GMT+4 (UTC-04:00)
165 | // America/Manaus (UTC-04:00)
166 | // America/Fort_Wayne (UTC-04:00)
167 | // America/St_Thomas (UTC-04:00)
168 | // America/Anguilla (UTC-04:00)
169 | // America/Havana (UTC-04:00)
170 | // US/Michigan (UTC-04:00)
171 | // America/Barbados (UTC-04:00)
172 | // America/Louisville (UTC-04:00)
173 | // America/Curacao (UTC-04:00)
174 | // America/Guyana (UTC-04:00)
175 | // America/Martinique (UTC-04:00)
176 | // America/Puerto_Rico (UTC-04:00)
177 | // America/Port_of_Spain (UTC-04:00)
178 | // SystemV/AST4 (UTC-04:00)
179 | // America/Indiana/Vevay (UTC-04:00)
180 | // America/Indiana/Vincennes (UTC-04:00)
181 | // America/Kralendijk (UTC-04:00)
182 | // America/Antigua (UTC-04:00)
183 | // America/Indianapolis (UTC-04:00)
184 | // America/Iqaluit (UTC-04:00)
185 | // America/St_Vincent (UTC-04:00)
186 | // America/Kentucky/Louisville (UTC-04:00)
187 | // America/Dominica (UTC-04:00)
188 | // America/Asuncion (UTC-04:00)
189 | // EST5EDT (UTC-04:00)
190 | // America/Nassau (UTC-04:00)
191 | // America/Kentucky/Monticello (UTC-04:00)
192 | // Brazil/West (UTC-04:00)
193 | // America/Aruba (UTC-04:00)
194 | // America/Indiana/Indianapolis (UTC-04:00)
195 | // America/Santiago (UTC-04:00)
196 | // America/La_Paz (UTC-04:00)
197 | // America/Thunder_Bay (UTC-04:00)
198 | // America/Indiana/Marengo (UTC-04:00)
199 | // America/Blanc-Sablon (UTC-04:00)
200 | // America/Santo_Domingo (UTC-04:00)
201 | // US/Eastern (UTC-04:00)
202 | // Canada/Eastern (UTC-04:00)
203 | // America/Port-au-Prince (UTC-04:00)
204 | // America/St_Barthelemy (UTC-04:00)
205 | // America/Nipigon (UTC-04:00)
206 | // US/East-Indiana (UTC-04:00)
207 | // America/St_Lucia (UTC-04:00)
208 | // America/Montserrat (UTC-04:00)
209 | // America/Lower_Princes (UTC-04:00)
210 | // America/Detroit (UTC-04:00)
211 | // America/Tortola (UTC-04:00)
212 | // America/Porto_Velho (UTC-04:00)
213 | // America/Campo_Grande (UTC-04:00)
214 | // America/Virgin (UTC-04:00)
215 | // America/Pangnirtung (UTC-04:00)
216 | // America/Montreal (UTC-04:00)
217 | // America/Indiana/Winamac (UTC-04:00)
218 | // America/Boa_Vista (UTC-04:00)
219 | // America/Grenada (UTC-04:00)
220 | // America/New_York (UTC-04:00)
221 | // America/St_Kitts (UTC-04:00)
222 | // America/Caracas (UTC-04:00)
223 | // America/Guadeloupe (UTC-04:00)
224 | // America/Toronto (UTC-04:00)
225 | // SystemV/EST5EDT (UTC-04:00)
226 | // America/Argentina/Catamarca (UTC-03:00)
227 | // Canada/Atlantic (UTC-03:00)
228 | // America/Argentina/Cordoba (UTC-03:00)
229 | // America/Araguaina (UTC-03:00)
230 | // America/Argentina/Salta (UTC-03:00)
231 | // Etc/GMT+3 (UTC-03:00)
232 | // America/Montevideo (UTC-03:00)
233 | // Brazil/East (UTC-03:00)
234 | // America/Argentina/Mendoza (UTC-03:00)
235 | // America/Argentina/Rio_Gallegos (UTC-03:00)
236 | // America/Catamarca (UTC-03:00)
237 | // America/Cordoba (UTC-03:00)
238 | // America/Sao_Paulo (UTC-03:00)
239 | // America/Argentina/Jujuy (UTC-03:00)
240 | // America/Cayenne (UTC-03:00)
241 | // America/Recife (UTC-03:00)
242 | // America/Buenos_Aires (UTC-03:00)
243 | // America/Paramaribo (UTC-03:00)
244 | // America/Moncton (UTC-03:00)
245 | // America/Mendoza (UTC-03:00)
246 | // America/Santarem (UTC-03:00)
247 | // Atlantic/Bermuda (UTC-03:00)
248 | // America/Maceio (UTC-03:00)
249 | // Atlantic/Stanley (UTC-03:00)
250 | // America/Halifax (UTC-03:00)
251 | // Antarctica/Rothera (UTC-03:00)
252 | // America/Argentina/San_Luis (UTC-03:00)
253 | // America/Argentina/Ushuaia (UTC-03:00)
254 | // Antarctica/Palmer (UTC-03:00)
255 | // America/Punta_Arenas (UTC-03:00)
256 | // America/Glace_Bay (UTC-03:00)
257 | // America/Fortaleza (UTC-03:00)
258 | // America/Thule (UTC-03:00)
259 | // America/Argentina/La_Rioja (UTC-03:00)
260 | // America/Belem (UTC-03:00)
261 | // America/Jujuy (UTC-03:00)
262 | // America/Bahia (UTC-03:00)
263 | // America/Goose_Bay (UTC-03:00)
264 | // America/Argentina/San_Juan (UTC-03:00)
265 | // America/Argentina/ComodRivadavia (UTC-03:00)
266 | // America/Argentina/Tucuman (UTC-03:00)
267 | // America/Rosario (UTC-03:00)
268 | // SystemV/AST4ADT (UTC-03:00)
269 | // America/Argentina/Buenos_Aires (UTC-03:00)
270 | // America/St_Johns (UTC-02:30)
271 | // Canada/Newfoundland (UTC-02:30)
272 | // America/Miquelon (UTC-02:00)
273 | // Etc/GMT+2 (UTC-02:00)
274 | // America/Godthab (UTC-02:00)
275 | // America/Noronha (UTC-02:00)
276 | // Brazil/DeNoronha (UTC-02:00)
277 | // Atlantic/South_Georgia (UTC-02:00)
278 | // Etc/GMT+1 (UTC-01:00)
279 | // Atlantic/Cape_Verde (UTC-01:00)
280 | // Pacific/Kiritimati (UTC+14:00)
281 | // Etc/GMT-14 (UTC+14:00)
282 | // Pacific/Fakaofo (UTC+13:00)
283 | // Pacific/Enderbury (UTC+13:00)
284 | // Pacific/Apia (UTC+13:00)
285 | // Pacific/Tongatapu (UTC+13:00)
286 | // Etc/GMT-13 (UTC+13:00)
287 | // NZ-CHAT (UTC+12:45)
288 | // Pacific/Chatham (UTC+12:45)
289 | // Pacific/Kwajalein (UTC+12:00)
290 | // Antarctica/McMurdo (UTC+12:00)
291 | // Pacific/Wallis (UTC+12:00)
292 | // Pacific/Fiji (UTC+12:00)
293 | // Pacific/Funafuti (UTC+12:00)
294 | // Pacific/Nauru (UTC+12:00)
295 | // Kwajalein (UTC+12:00)
296 | // NZ (UTC+12:00)
297 | // Pacific/Wake (UTC+12:00)
298 | // Antarctica/South_Pole (UTC+12:00)
299 | // Pacific/Tarawa (UTC+12:00)
300 | // Pacific/Auckland (UTC+12:00)
301 | // Asia/Kamchatka (UTC+12:00)
302 | // Etc/GMT-12 (UTC+12:00)
303 | // Asia/Anadyr (UTC+12:00)
304 | // Pacific/Majuro (UTC+12:00)
305 | // Pacific/Ponape (UTC+11:00)
306 | // Pacific/Bougainville (UTC+11:00)
307 | // Antarctica/Macquarie (UTC+11:00)
308 | // Pacific/Pohnpei (UTC+11:00)
309 | // Pacific/Efate (UTC+11:00)
310 | // Pacific/Norfolk (UTC+11:00)
311 | // Asia/Magadan (UTC+11:00)
312 | // Pacific/Kosrae (UTC+11:00)
313 | // Asia/Sakhalin (UTC+11:00)
314 | // Pacific/Noumea (UTC+11:00)
315 | // Etc/GMT-11 (UTC+11:00)
316 | // Asia/Srednekolymsk (UTC+11:00)
317 | // Pacific/Guadalcanal (UTC+11:00)
318 | // Australia/Lord_Howe (UTC+10:30)
319 | // Australia/LHI (UTC+10:30)
320 | // Australia/Hobart (UTC+10:00)
321 | // Pacific/Yap (UTC+10:00)
322 | // Australia/Tasmania (UTC+10:00)
323 | // Pacific/Port_Moresby (UTC+10:00)
324 | // Australia/ACT (UTC+10:00)
325 | // Australia/Victoria (UTC+10:00)
326 | // Pacific/Chuuk (UTC+10:00)
327 | // Australia/Queensland (UTC+10:00)
328 | // Australia/Canberra (UTC+10:00)
329 | // Australia/Currie (UTC+10:00)
330 | // Pacific/Guam (UTC+10:00)
331 | // Pacific/Truk (UTC+10:00)
332 | // Australia/NSW (UTC+10:00)
333 | // Asia/Vladivostok (UTC+10:00)
334 | // Pacific/Saipan (UTC+10:00)
335 | // Antarctica/DumontDUrville (UTC+10:00)
336 | // Australia/Sydney (UTC+10:00)
337 | // Australia/Brisbane (UTC+10:00)
338 | // Etc/GMT-10 (UTC+10:00)
339 | // Asia/Ust-Nera (UTC+10:00)
340 | // Australia/Melbourne (UTC+10:00)
341 | // Australia/Lindeman (UTC+10:00)
342 | // Australia/North (UTC+09:30)
343 | // Australia/Yancowinna (UTC+09:30)
344 | // Australia/Adelaide (UTC+09:30)
345 | // Australia/Broken_Hill (UTC+09:30)
346 | // Australia/South (UTC+09:30)
347 | // Australia/Darwin (UTC+09:30)
348 | // Etc/GMT-9 (UTC+09:00)
349 | // Pacific/Palau (UTC+09:00)
350 | // Asia/Chita (UTC+09:00)
351 | // Asia/Dili (UTC+09:00)
352 | // Asia/Jayapura (UTC+09:00)
353 | // Asia/Yakutsk (UTC+09:00)
354 | // Asia/Pyongyang (UTC+09:00)
355 | // ROK (UTC+09:00)
356 | // Asia/Seoul (UTC+09:00)
357 | // Asia/Khandyga (UTC+09:00)
358 | // Japan (UTC+09:00)
359 | // Asia/Tokyo (UTC+09:00)
360 | // Australia/Eucla (UTC+08:45)
361 | // Asia/Kuching (UTC+08:00)
362 | // Asia/Chungking (UTC+08:00)
363 | // Etc/GMT-8 (UTC+08:00)
364 | // Australia/Perth (UTC+08:00)
365 | // Asia/Macao (UTC+08:00)
366 | // Asia/Macau (UTC+08:00)
367 | // Asia/Choibalsan (UTC+08:00)
368 | // Asia/Shanghai (UTC+08:00)
369 | // Antarctica/Casey (UTC+08:00)
370 | // Asia/Ulan_Bator (UTC+08:00)
371 | // Asia/Chongqing (UTC+08:00)
372 | // Asia/Ulaanbaatar (UTC+08:00)
373 | // Asia/Taipei (UTC+08:00)
374 | // Asia/Manila (UTC+08:00)
375 | // PRC (UTC+08:00)
376 | // Asia/Ujung_Pandang (UTC+08:00)
377 | // Asia/Harbin (UTC+08:00)
378 | // Singapore (UTC+08:00)
379 | // Asia/Brunei (UTC+08:00)
380 | // Australia/West (UTC+08:00)
381 | // Asia/Hong_Kong (UTC+08:00)
382 | // Asia/Makassar (UTC+08:00)
383 | // Hongkong (UTC+08:00)
384 | // Asia/Kuala_Lumpur (UTC+08:00)
385 | // Asia/Irkutsk (UTC+08:00)
386 | // Asia/Singapore (UTC+08:00)
387 | // Asia/Pontianak (UTC+07:00)
388 | // Etc/GMT-7 (UTC+07:00)
389 | // Asia/Phnom_Penh (UTC+07:00)
390 | // Asia/Novosibirsk (UTC+07:00)
391 | // Antarctica/Davis (UTC+07:00)
392 | // Asia/Tomsk (UTC+07:00)
393 | // Asia/Jakarta (UTC+07:00)
394 | // Asia/Barnaul (UTC+07:00)
395 | // Indian/Christmas (UTC+07:00)
396 | // Asia/Ho_Chi_Minh (UTC+07:00)
397 | // Asia/Hovd (UTC+07:00)
398 | // Asia/Bangkok (UTC+07:00)
399 | // Asia/Vientiane (UTC+07:00)
400 | // Asia/Novokuznetsk (UTC+07:00)
401 | // Asia/Krasnoyarsk (UTC+07:00)
402 | // Asia/Saigon (UTC+07:00)
403 | // Asia/Yangon (UTC+06:30)
404 | // Asia/Rangoon (UTC+06:30)
405 | // Indian/Cocos (UTC+06:30)
406 | // Asia/Kashgar (UTC+06:00)
407 | // Etc/GMT-6 (UTC+06:00)
408 | // Asia/Almaty (UTC+06:00)
409 | // Asia/Dacca (UTC+06:00)
410 | // Asia/Omsk (UTC+06:00)
411 | // Asia/Dhaka (UTC+06:00)
412 | // Indian/Chagos (UTC+06:00)
413 | // Asia/Qyzylorda (UTC+06:00)
414 | // Asia/Bishkek (UTC+06:00)
415 | // Antarctica/Vostok (UTC+06:00)
416 | // Asia/Urumqi (UTC+06:00)
417 | // Asia/Thimbu (UTC+06:00)
418 | // Asia/Thimphu (UTC+06:00)
419 | // Asia/Kathmandu (UTC+05:45)
420 | // Asia/Katmandu (UTC+05:45)
421 | // Asia/Kolkata (UTC+05:30)
422 | // Asia/Colombo (UTC+05:30)
423 | // Asia/Calcutta (UTC+05:30)
424 | // Asia/Aqtau (UTC+05:00)
425 | // Etc/GMT-5 (UTC+05:00)
426 | // Asia/Samarkand (UTC+05:00)
427 | // Asia/Karachi (UTC+05:00)
428 | // Asia/Yekaterinburg (UTC+05:00)
429 | // Asia/Dushanbe (UTC+05:00)
430 | // Indian/Maldives (UTC+05:00)
431 | // Asia/Oral (UTC+05:00)
432 | // Asia/Tashkent (UTC+05:00)
433 | // Antarctica/Mawson (UTC+05:00)
434 | // Asia/Aqtobe (UTC+05:00)
435 | // Asia/Ashkhabad (UTC+05:00)
436 | // Asia/Ashgabat (UTC+05:00)
437 | // Asia/Atyrau (UTC+05:00)
438 | // Indian/Kerguelen (UTC+05:00)
439 | // Iran (UTC+04:30)
440 | // Asia/Tehran (UTC+04:30)
441 | // Asia/Kabul (UTC+04:30)
442 | // Asia/Yerevan (UTC+04:00)
443 | // Etc/GMT-4 (UTC+04:00)
444 | // Asia/Dubai (UTC+04:00)
445 | // Indian/Reunion (UTC+04:00)
446 | // Indian/Mauritius (UTC+04:00)
447 | // Europe/Saratov (UTC+04:00)
448 | // Europe/Samara (UTC+04:00)
449 | // Indian/Mahe (UTC+04:00)
450 | // Asia/Baku (UTC+04:00)
451 | // Asia/Muscat (UTC+04:00)
452 | // Europe/Volgograd (UTC+04:00)
453 | // Europe/Astrakhan (UTC+04:00)
454 | // Asia/Tbilisi (UTC+04:00)
455 | // Europe/Ulyanovsk (UTC+04:00)
456 | // Asia/Aden (UTC+03:00)
457 | // Africa/Nairobi (UTC+03:00)
458 | // Europe/Istanbul (UTC+03:00)
459 | // Etc/GMT-3 (UTC+03:00)
460 | // Europe/Zaporozhye (UTC+03:00)
461 | // Israel (UTC+03:00)
462 | // Indian/Comoro (UTC+03:00)
463 | // Antarctica/Syowa (UTC+03:00)
464 | // Africa/Mogadishu (UTC+03:00)
465 | // Europe/Bucharest (UTC+03:00)
466 | // Africa/Asmera (UTC+03:00)
467 | // Europe/Mariehamn (UTC+03:00)
468 | // Asia/Istanbul (UTC+03:00)
469 | // Europe/Tiraspol (UTC+03:00)
470 | // Europe/Moscow (UTC+03:00)
471 | // Europe/Chisinau (UTC+03:00)
472 | // Europe/Helsinki (UTC+03:00)
473 | // Asia/Beirut (UTC+03:00)
474 | // Asia/Tel_Aviv (UTC+03:00)
475 | // Africa/Djibouti (UTC+03:00)
476 | // Europe/Simferopol (UTC+03:00)
477 | // Europe/Sofia (UTC+03:00)
478 | // Asia/Gaza (UTC+03:00)
479 | // Africa/Asmara (UTC+03:00)
480 | // Europe/Riga (UTC+03:00)
481 | // Asia/Baghdad (UTC+03:00)
482 | // Asia/Damascus (UTC+03:00)
483 | // Africa/Dar_es_Salaam (UTC+03:00)
484 | // Africa/Addis_Ababa (UTC+03:00)
485 | // Europe/Uzhgorod (UTC+03:00)
486 | // Asia/Jerusalem (UTC+03:00)
487 | // Asia/Riyadh (UTC+03:00)
488 | // Asia/Kuwait (UTC+03:00)
489 | // Europe/Kirov (UTC+03:00)
490 | // Africa/Kampala (UTC+03:00)
491 | // Europe/Minsk (UTC+03:00)
492 | // Asia/Qatar (UTC+03:00)
493 | // Europe/Kiev (UTC+03:00)
494 | // Asia/Bahrain (UTC+03:00)
495 | // Europe/Vilnius (UTC+03:00)
496 | // Indian/Antananarivo (UTC+03:00)
497 | // Indian/Mayotte (UTC+03:00)
498 | // Europe/Tallinn (UTC+03:00)
499 | // Turkey (UTC+03:00)
500 | // Africa/Juba (UTC+03:00)
501 | // Asia/Nicosia (UTC+03:00)
502 | // Asia/Famagusta (UTC+03:00)
503 | // W-SU (UTC+03:00)
504 | // EET (UTC+03:00)
505 | // Asia/Hebron (UTC+03:00)
506 | // Asia/Amman (UTC+03:00)
507 | // Europe/Nicosia (UTC+03:00)
508 | // Europe/Athens (UTC+03:00)
509 | // Africa/Cairo (UTC+02:00)
510 | // Africa/Mbabane (UTC+02:00)
511 | // Europe/Brussels (UTC+02:00)
512 | // Europe/Warsaw (UTC+02:00)
513 | // CET (UTC+02:00)
514 | // Europe/Luxembourg (UTC+02:00)
515 | // Etc/GMT-2 (UTC+02:00)
516 | // Libya (UTC+02:00)
517 | // Africa/Kigali (UTC+02:00)
518 | // Africa/Tripoli (UTC+02:00)
519 | // Europe/Kaliningrad (UTC+02:00)
520 | // Africa/Windhoek (UTC+02:00)
521 | // Europe/Malta (UTC+02:00)
522 | // Europe/Busingen (UTC+02:00)
523 | // Europe/Skopje (UTC+02:00)
524 | // Europe/Sarajevo (UTC+02:00)
525 | // Europe/Rome (UTC+02:00)
526 | // Europe/Zurich (UTC+02:00)
527 | // Europe/Gibraltar (UTC+02:00)
528 | // Africa/Lubumbashi (UTC+02:00)
529 | // Europe/Vaduz (UTC+02:00)
530 | // Europe/Ljubljana (UTC+02:00)
531 | // Europe/Berlin (UTC+02:00)
532 | // Europe/Stockholm (UTC+02:00)
533 | // Europe/Budapest (UTC+02:00)
534 | // Europe/Zagreb (UTC+02:00)
535 | // Europe/Paris (UTC+02:00)
536 | // Africa/Ceuta (UTC+02:00)
537 | // Europe/Prague (UTC+02:00)
538 | // Antarctica/Troll (UTC+02:00)
539 | // Africa/Gaborone (UTC+02:00)
540 | // Europe/Copenhagen (UTC+02:00)
541 | // Europe/Vienna (UTC+02:00)
542 | // Europe/Tirane (UTC+02:00)
543 | // MET (UTC+02:00)
544 | // Europe/Amsterdam (UTC+02:00)
545 | // Africa/Maputo (UTC+02:00)
546 | // Europe/San_Marino (UTC+02:00)
547 | // Poland (UTC+02:00)
548 | // Europe/Andorra (UTC+02:00)
549 | // Europe/Oslo (UTC+02:00)
550 | // Europe/Podgorica (UTC+02:00)
551 | // Africa/Bujumbura (UTC+02:00)
552 | // Atlantic/Jan_Mayen (UTC+02:00)
553 | // Africa/Maseru (UTC+02:00)
554 | // Europe/Madrid (UTC+02:00)
555 | // Africa/Blantyre (UTC+02:00)
556 | // Africa/Lusaka (UTC+02:00)
557 | // Africa/Harare (UTC+02:00)
558 | // Africa/Khartoum (UTC+02:00)
559 | // Africa/Johannesburg (UTC+02:00)
560 | // Europe/Belgrade (UTC+02:00)
561 | // Europe/Bratislava (UTC+02:00)
562 | // Arctic/Longyearbyen (UTC+02:00)
563 | // Egypt (UTC+02:00)
564 | // Europe/Vatican (UTC+02:00)
565 | // Europe/Monaco (UTC+02:00)
566 | // Europe/London (UTC+01:00)
567 | // Etc/GMT-1 (UTC+01:00)
568 | // Europe/Jersey (UTC+01:00)
569 | // Europe/Guernsey (UTC+01:00)
570 | // Europe/Isle_of_Man (UTC+01:00)
571 | // Africa/Tunis (UTC+01:00)
572 | // Africa/Malabo (UTC+01:00)
573 | // GB-Eire (UTC+01:00)
574 | // Africa/Lagos (UTC+01:00)
575 | // Africa/Algiers (UTC+01:00)
576 | // GB (UTC+01:00)
577 | // Portugal (UTC+01:00)
578 | // Africa/Sao_Tome (UTC+01:00)
579 | // Africa/Ndjamena (UTC+01:00)
580 | // Atlantic/Faeroe (UTC+01:00)
581 | // Eire (UTC+01:00)
582 | // Atlantic/Faroe (UTC+01:00)
583 | // Europe/Dublin (UTC+01:00)
584 | // Africa/Libreville (UTC+01:00)
585 | // Africa/El_Aaiun (UTC+01:00)
586 | // Africa/Douala (UTC+01:00)
587 | // Africa/Brazzaville (UTC+01:00)
588 | // Africa/Porto-Novo (UTC+01:00)
589 | // Atlantic/Madeira (UTC+01:00)
590 | // Europe/Lisbon (UTC+01:00)
591 | // Atlantic/Canary (UTC+01:00)
592 | // Africa/Casablanca (UTC+01:00)
593 | // Europe/Belfast (UTC+01:00)
594 | // Africa/Luanda (UTC+01:00)
595 | // Africa/Kinshasa (UTC+01:00)
596 | // Africa/Bangui (UTC+01:00)
597 | // WET (UTC+01:00)
598 | // Africa/Niamey (UTC+01:00)
599 | // GMT (UTC+00:00)
600 | // Etc/GMT-0 (UTC+00:00)
601 | // Atlantic/St_Helena (UTC+00:00)
602 | // Etc/GMT+0 (UTC+00:00)
603 | // Africa/Banjul (UTC+00:00)
604 | // Etc/GMT (UTC+00:00)
605 | // Africa/Freetown (UTC+00:00)
606 | // Africa/Bamako (UTC+00:00)
607 | // Africa/Conakry (UTC+00:00)
608 | // Universal (UTC+00:00)
609 | // Africa/Nouakchott (UTC+00:00)
610 | // UTC (UTC+00:00)
611 | // Etc/Universal (UTC+00:00)
612 | // Atlantic/Azores (UTC+00:00)
613 | // Africa/Abidjan (UTC+00:00)
614 | // Africa/Accra (UTC+00:00)
615 | // Etc/UCT (UTC+00:00)
616 | // GMT0 (UTC+00:00)
617 | // Zulu (UTC+00:00)
618 | // Africa/Ouagadougou (UTC+00:00)
619 | // Atlantic/Reykjavik (UTC+00:00)
620 | // Etc/Zulu (UTC+00:00)
621 | // Iceland (UTC+00:00)
622 | // Africa/Lome (UTC+00:00)
623 | // Greenwich (UTC+00:00)
624 | // Etc/GMT0 (UTC+00:00)
625 | // America/Danmarkshavn (UTC+00:00)
626 | // Africa/Dakar (UTC+00:00)
627 | // America/Scoresbysund (UTC+00:00)
628 | // Africa/Bissau (UTC+00:00)
629 | // Etc/Greenwich (UTC+00:00)
630 | // Africa/Timbuktu (UTC+00:00)
631 | // UCT (UTC+00:00)
632 | // Africa/Monrovia (UTC+00:00)
633 | // Etc/UTC (UTC+00:00)
--------------------------------------------------------------------------------
/Lesson 31 - الدرس/App.java:
--------------------------------------------------------------------------------
1 | class App {
2 | String name;
3 | App app;
4 |
5 | void setApp(App app){
6 | this.app = app;
7 | }
8 | App(String name){
9 | this();
10 | this.name = name;
11 | System.out.println(this.getName());
12 | setApp(getApp());
13 | }
14 |
15 | App getApp(){ return this; }
16 |
17 | App(){ System.out.println("Start App"); }
18 | String getName(){return name;}
19 |
20 | public static void main(String[] args) {
21 | App app = new App("Learn Java");
22 | }
23 | }
24 |
25 | /* --------------------------------------------------------------------
26 | this keyword in Java - شرح امر هذا في الجافا
27 | ------------------------------------------------------------------------
28 | this يمكن استخدام هذا للإشارة إلى فاريبل مثيل في الاوبجكت الحالي
29 | this يمكن استخدام هذا للإستدعاء ميتود في الاوبجكت الحالي
30 | this() يمكن استخدامها للاستدعاء كونستروكتور كلاس
31 | this يمكن تمريرها كا قيمة عند استدعاء ميتود
32 | this يمكن تمريرها كا قيمة عند استدعاء كونستروكتور كلاس
33 | this يمكن استخدام هذا لإرجاع اوبجكت مثيل من كلاس الحالي في ميتود
34 |
35 | this can be used to refer current class instance variable.
36 | this can be used to invoke current class method (implicitly)
37 | this() can be used to invoke current class constructor.
38 | this can be passed as an argument in the method call.
39 | this can be passed as argument in the constructor call.
40 | this can be used to return the current class instance from the method.
41 |
42 | */
--------------------------------------------------------------------------------
/Lesson 32 - الدرس/java/App/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | "configurations": [
3 | {
4 | "type": "java",
5 | "name": "CodeLens (Launch) - App1",
6 | "request": "launch",
7 | "mainClass": "App1",
8 | "projectName": "App_8dae3a26"
9 | }
10 | ]
11 | }
--------------------------------------------------------------------------------
/Lesson 32 - الدرس/java/App/App/app1.java:
--------------------------------------------------------------------------------
1 | package App;
2 |
3 | class App1{
4 | public static void main(String[] args) {
5 |
6 | }
7 | }
--------------------------------------------------------------------------------
/Lesson 33 - الدرس/java/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | "configurations": [
3 | {
4 | "type": "java",
5 | "name": "CodeLens (Launch) - App1",
6 | "request": "launch",
7 | "mainClass": "package1.App1",
8 | "projectName": "java_c87954b4"
9 | }
10 | ]
11 | }
--------------------------------------------------------------------------------
/Lesson 33 - الدرس/java/package1/App1.java:
--------------------------------------------------------------------------------
1 | package package1;
2 |
3 | import package2.App2;
4 |
5 | class App1{
6 | public static void main(String[] args) {
7 | App2 data = new App2();
8 | data.read_message();
9 | System.out.print(data.name);
10 | }
11 | }
--------------------------------------------------------------------------------
/Lesson 33 - الدرس/java/package2/App2.java:
--------------------------------------------------------------------------------
1 | package package2;
2 |
3 | public class App2{
4 | public String name = "Coder Shiyar";
5 |
6 | public void read_message(){
7 | System.out.print("You can access the class App2 now ");
8 | }
9 | }
10 |
11 |
--------------------------------------------------------------------------------
/Lesson 34 - الدرس/package1/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | "configurations": [
3 | {
4 | "type": "java",
5 | "name": "CodeLens (Launch) - App1",
6 | "request": "launch",
7 | "mainClass": "package1.App1",
8 | "projectName": "package1_f1ba6ba6"
9 | }
10 | ]
11 | }
--------------------------------------------------------------------------------
/Lesson 34 - الدرس/package1/package1/App1.java:
--------------------------------------------------------------------------------
1 | package package1;
2 |
3 | class App1 extends App3{
4 |
5 | public static void main(String[] args) {
6 | App1 app = new App1();
7 | app.display_message();
8 | System.out.println(app.name);
9 | }
10 | }
--------------------------------------------------------------------------------
/Lesson 34 - الدرس/package1/package1/App2.java:
--------------------------------------------------------------------------------
1 | package package1;
2 |
3 | public class App2 extends App3 {
4 | String city = "Kobani";
5 |
6 | }
--------------------------------------------------------------------------------
/Lesson 34 - الدرس/package1/package1/App3.java:
--------------------------------------------------------------------------------
1 | package package1;
2 |
3 | public class App3 {
4 |
5 | String name = "Coder Shiyar";
6 |
7 | public void display_message(){
8 | System.out.println("I am a method from the class App2 ");
9 | }
10 | }
--------------------------------------------------------------------------------
/Lesson 35 - الدرس/java/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | "configurations": [
3 | {
4 | "type": "java",
5 | "name": "CodeLens (Launch) - Admin",
6 | "request": "launch",
7 | "mainClass": "Admin",
8 | "projectName": "java_c87954b4"
9 | }
10 | ]
11 | }
--------------------------------------------------------------------------------
/Lesson 35 - الدرس/java/Admin.java:
--------------------------------------------------------------------------------
1 |
2 | public class Admin extends User{
3 | // SubClass
4 | // SuperClass
5 |
6 | String name = "ROOT_ADMIN";
7 |
8 | public void getName(){
9 | System.out.println(super.name);
10 | }
11 |
12 | public void getValue() {
13 | super.getName();
14 | }
15 | public static void main(String[] args) {
16 | Admin admin = new Admin();
17 | admin.getName();
18 | admin.getValue();
19 |
20 | }
21 | }
--------------------------------------------------------------------------------
/Lesson 35 - الدرس/java/User.java:
--------------------------------------------------------------------------------
1 | public class User{
2 | String name = "ROOT_USER";
3 |
4 | public void getName(){
5 | System.out.println("Method from User");
6 | }
7 |
8 | }
--------------------------------------------------------------------------------
/Lesson 36 - الدرس/java/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | "configurations": [
3 | {
4 | "type": "java",
5 | "name": "CodeLens (Launch) - App",
6 | "request": "launch",
7 | "mainClass": "App",
8 | "projectName": "java_c87954b4"
9 | }
10 | ]
11 | }
--------------------------------------------------------------------------------
/Lesson 36 - الدرس/java/App.java:
--------------------------------------------------------------------------------
1 |
2 | public class App extends Payment {
3 |
4 | @Override
5 | public void language(){
6 | System.out.println("اللغة : العربية");
7 | }
8 | public static void main(String[] args) {
9 | App app = new App();
10 | app.payment_method();
11 | app.language();
12 | }
13 |
14 | }
--------------------------------------------------------------------------------
/Lesson 36 - الدرس/java/Payment.java:
--------------------------------------------------------------------------------
1 |
2 | public class Payment {
3 |
4 | public void payment_method(){
5 | System.out.println("طرق الدفع : ");
6 | System.out.println("1: Visa Card");
7 | System.out.println("2: Master Card");
8 | System.out.println("3: PayPal");
9 | }
10 | public void language(){
11 | System.out.print("Language : Arabic");
12 | }
13 |
14 |
15 |
16 | }
--------------------------------------------------------------------------------
/Lesson 37 - الدرس/package1/App.java:
--------------------------------------------------------------------------------
1 | package package1;
2 | import package2.App3;
3 |
4 | public class App extends App3 {
5 | public static void main(String[] args) {
6 | System.out.println(App2.name);
7 | printName();
8 | }
9 | }
10 |
11 |
12 |
13 | /* ------------------------------------------------------------------------------------------------------
14 | Access Modifier in Java شرح اوامر الذي يتيح لك بتحديد طريقة وصول إلى كلاس او متغير او ميتودس في الجافا
15 | ----------------------------------------------------------------------------------------------------------
16 | No modifier دون تحديد اي طريقة وصول
17 | Private (خاص)
18 | Protected (محمي)
19 | Public (عام)
20 |
21 | Methods/Variables & Constructor class : No modifier/Private/Protected/Public
22 | ----------------------------------------------------------------------------------------------------------
23 | Classes: No modifier / only public (abstract & final)
24 | ----------------------------------------------------------------------------------------------------------
25 | */
--------------------------------------------------------------------------------
/Lesson 37 - الدرس/package1/App2.java:
--------------------------------------------------------------------------------
1 | package package1;
2 |
3 |
4 | public class App2{
5 | public static String name = "Coder Shiyar";
6 | }
7 |
--------------------------------------------------------------------------------
/Lesson 37 - الدرس/package2/App3.java:
--------------------------------------------------------------------------------
1 | package package2;
2 | import package1.App2;
3 | public class App3 {
4 | protected static void printName(){
5 | System.out.println(App2.name);
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/Lesson 38 - الدرس/App.java:
--------------------------------------------------------------------------------
1 | public class App {
2 | public static void main(String[] args) {
3 | AppInfo appInfo = new AppInfo();
4 | appInfo.setName("Learn Java with Shiyar");
5 | System.out.println(appInfo.getName());
6 |
7 | AppInfo2 appInfo2 = new AppInfo2("I love ...");
8 |
9 | System.out.println(appInfo2.getName());
10 | }
11 | }
12 |
13 | class AppInfo{
14 | private String name;
15 |
16 | public String getName(){
17 | return name;
18 | }
19 |
20 | public void setName(String name){
21 | this.name = name;
22 | }
23 |
24 | }
25 |
26 | class AppInfo2{
27 | private String name;
28 |
29 | AppInfo2(String name){
30 | this.name = name;
31 | }
32 | public String getName(){
33 | return name;
34 | }
35 |
36 | }
37 |
38 | /* -------------------------------------------------------------------------------------------
39 | Encapsulation in OOP in Java
40 | /* -------------------------------------------------------------------------------------------
41 | بالإختصار هو جعل متغيرات من نوع خاص ومنع وصول
42 | إليهم بطريقة مباشرة خارج الكلاس الذي تم إنشاء تلك متغيرات بها
43 | In short, it is to make variables of a private type and prevent access them directly
44 | outside the class in which these variables are created
45 | /* -------------------------------------------------------------------------------------------
46 | Getters & Setters methods
47 | /* -------------------------------------------------------------------------------------------
48 | They are methods that you create to access these variables through other classes
49 | In order to read or update its data
50 | هم عبارة عن وظائف تقوم بإنشائها للوصول إلى تلك متغيرات من خلالها عبر كلاسات اخرى
51 | بهدف قراءة بياناتها او تحديثها
52 |
53 | There are various reasons as to why encapsulation is essential in Java:
54 | Encapsulation allows us to modify the code or A part of the code without having to change any other functions or code.
55 | Encapsulation controls how we access data.
56 | We can modify the code based on the requirements using encapsulation.
57 | Encapsulation makes our applications simpler.
58 | */
--------------------------------------------------------------------------------
/Lesson 39 - الدرس/App.java:
--------------------------------------------------------------------------------
1 | import java.util.ArrayList;
2 |
3 | public class App {
4 | public static void main(String[] args) {
5 | ArrayList fruits = new ArrayList<>();
6 | fruits.add("Apple");
7 | fruits.add("Kiwi");
8 | fruits.add("Banana");
9 | // fruits.set(0, "Orange");
10 | // fruits.remove(0);
11 | // fruits.clear();
12 | System.out.println(fruits.size());
13 | }
14 | }
15 |
16 | /* ----(Java ArrayList)--------------------------------------------------------------------------------------------------
17 | The ArrayList class is a resizable array كلاس اراي ليست يستخدم لإنشاء مصفوفات متطورة مقارنةً مع المصفوفات العادية
18 | ---------------------------------------------------------------------------------------------------------------------
19 | Value = قيمة Position = تمركز Arrays = مصفوفات
20 | ---------------------------------------------------------------------------------------------------------------------
21 | add(Value) To add items/elements to the ArrayList لإضافة قيمة جديدة
22 | set(Position, Value) To modify an item, لتحديث احد قيم
23 | get(Position) To access an element in the ArrayList لوصول إلى احد قيم
24 | remove(Position) To remove an item/element لحذف احد قيم
25 | clear() To remove all the elements in the ArrayList لحذف جميع قيم
26 | size() To find out how many elements an ArrayList have لمعرفة عدد العناصر الموجودة في اراي
27 | ---------------------------------------------------------------------------------------------------------------------
28 | */
--------------------------------------------------------------------------------
/Lesson 40 - الدرس/App.java:
--------------------------------------------------------------------------------
1 | import java.util.ArrayList;
2 |
3 | public class App {
4 | public static void main(String[] args) {
5 | ArrayList fruits = new ArrayList<>();
6 | fruits.add("Apple");
7 | fruits.add("Kiwi");
8 | fruits.add("Banana");
9 | // fruits.remove("Kiwi");
10 | try {
11 | System.out.println(fruits.get(fruits.size() - 4));
12 | } catch (Exception e) {
13 | // TODO: handle exception
14 | System.out.println("لا يوجد اي قيمة في ذلك تمركز , لذلك ظهرت الخطأ");
15 | }
16 |
17 | int position = 0;
18 | // for(String item : fruits ){
19 | // position++;
20 | // System.out.println(position+" : " +item);
21 | // }
22 | for(int i = 0; i persons = new ArrayList<>();
5 | static ArrayList orders = new ArrayList<>();
6 | static ArrayList idCards = new ArrayList<>();
7 | static ArrayList registrations = new ArrayList<>();
8 | static ArrayList students = new ArrayList<>();
9 | static ArrayList courses = new ArrayList<>();
10 | public static void main(String[] args) {
11 |
12 | }
13 | }
14 | class IDCard{Person person;}
15 |
16 | class Person{String name;}
17 | class Order{Person person; int OrderNumber;}
18 |
19 | class Student{String name;}
20 | class Course{ String name;}
21 | class Registration{ Student student; Course course;}
22 | /* --------------------------------------------------------------------------------------------------------------------
23 | Association in Java
24 | --------------------------------------------------------------------------------------------------------------------
25 | Association in Java is a connection or relation between two separate classes that are set up through their objects.
26 | الاقتران في جافا هو اتصال أو علاقة بين كلاسين (فئتين) منفصلتين تم إعدادهما من خلال اوبجكت خاص بهم (كائناتهما)
27 | --------------------------------------------------------------------------------------------------------------------
28 | 1: one to many 1 -> *
29 | 2: one to one 1 -> 1
30 | 3: many to many * -> *
31 | --------------------------------------------------------------------------------------------------------------------
32 | Person - Order طالب - طلبية
33 | Person - ID card شخص - هوية شخصية
34 | Student - Course طالب - كورس
35 | */
--------------------------------------------------------------------------------
/Lesson 42 - الدرس/App.java:
--------------------------------------------------------------------------------
1 | public class App {
2 | public static void main(String[] args) {
3 | String text1 = "I like to learn programming \twith \\Coder Shiyar\\";
4 | System.out.println(text1);
5 | // String text2 = """
6 | // I like to learn programming
7 | // with Coder Shiyar""";
8 | // System.out.println(text2);
9 | }
10 | }
11 |
12 | /* -------------------------------------------------------------------------------------------------------
13 | Java String - النصوص في الجافا
14 | -------------------------------------------------------------------------------------------------------
15 | 1: "string in 1 line" نصوص في سطر واحد
16 | 2: """
17 | multiple line strings - نصوص متعدد اسطر
18 | """
19 | -------------------------------------------------------------------------------------------------------
20 | Java Escape Characters - أحرف خاصة في جافا
21 | -------------------------------------------------------------------------------------------------------
22 | Special characters Display Result
23 | \' Single quotation mark '
24 | \" Double quotation mark "
25 | \\ Backslash \
26 | \n Newline بدء سطر جديد
27 | \t Tab تقديم نص قليل للامام مثلما يفعله زر تاب في كيبورد
28 | ----------------------------------------💕Coder Shiyar💕----------------------------------------------
29 |
30 | */
31 |
32 |
33 |
--------------------------------------------------------------------------------
/Lesson 42 old - الدرس/App.java:
--------------------------------------------------------------------------------
1 |
2 | public class App extends Payment {
3 |
4 |
5 | public static void main(String[] args) {
6 | String text = "Are you happy? \nYes\nNo ";
7 | System.out.print(text);
8 |
9 |
10 | // الرمز '\ لإضافة الرمز ' في مكان وضعها
11 |
12 | // الرمز "\ لإضافة الرمز " في مكان وضعها.
13 |
14 | // يضيف عدة مسافات في مكان وضعها \t : الرمز
15 |
16 | //يجعل المحتوى الذي يأتي بعدها ينزل على سطر جديد. \n : الرمز
17 |
18 |
19 | }
20 |
21 | }
--------------------------------------------------------------------------------
/Lesson 43 - الدرس/App.java:
--------------------------------------------------------------------------------
1 | public class App {
2 | public static void main(String[] args) {
3 | String text = " I like to learn Java with Coder Shiyar ";
4 | text = text.toUpperCase();
5 | // String textUpperCase = text.toUpperCase();
6 | // String textLowerCase = text.toLowerCase();
7 | System.out.println(text);
8 | // System.out.println(textUpperCase);
9 | // System.out.println(textLowerCase);
10 | text = text.trim();
11 | System.out.println(text.length());
12 | }
13 | }
14 |
15 | /* ---------------------------------------------------------------------------------------------------------
16 | Java String methods - Part 1 الجزء الاول
17 | ---------------------------------------------------------------------------------------------------------
18 | 1:toUpperCase() Converts a string to lower case letters - تحويل الاحرف النص إلى الاحرف الكبيرة
19 | 2:toLowerCase() Converts a string to upper case letters - تحويل الاحرف النص إلى الاحرف الصغيرة
20 | 3:length() Returns the length of a specified string. يعيد طول نص المحدد
21 | 4:trim() Removes whitespace from both ends of a string يزيل المسافة البيضاء من طرفي النص
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | ----------------------------------------------------------------------------------------------------------
31 | Java String methods - Part 2 الجزء الثاني
32 | ----------------------------------------------------------------------------------------------------------
33 | 1: String replace(oldChar, newChar) يقوم بإستبداول قيمة يطابق مع الجزء المحدد من النص , بالجزء جديد
34 | Searches a string for a specified value, and returns a new string where the specified values are replaced
35 | ---------------------------------------------------------------------------------------------------------
36 | 2: String substring(int startIndex, int endIndex) يستخدم لقطع نص
37 | This method can be used to cut a string
38 | ---------------------------------------------------------------------------------------------------------
39 | 3: indexOf() ترجع تمركز الأول للحرف (الأحرف) المحدد في النص المحدد
40 | The indexOf() method returns the position of the first occurrence of specified character(s) in a string
41 | ---------------------------------------------------------------------------------------------------------
42 | 4: lastIndexOf() ترجع موضع التواجد الأخير للحرف (الأحرف) المحدد في النص المحدد
43 | The lastIndexOf() method returns the position of the last occurrence of specified character(s) in a string
44 | ---------------------------------------------------------------------------------------------------------------
45 | Java String methods - Part 3 الجزء الثالث
46 | ----------------------------------------------------------------------------------------------------------------
47 | 1: equals() يقارن نصين . إرجاع صحيح إذا كانت النصوص متساوية ، وإرجاع خطأ إذا لم يكن كذلك
48 | Compares two strings. Returns true if the strings are equal, and false if not
49 | ----------------------------------------------------------------------------------------------------------------
50 | 2: equalsIgnoreCase() يقارن نصين مع بعض دون حساسية تحقق من الحالة الاحرف الكبيرة و الصغيرة
51 | Compares two strings, ignoring case considerations
52 | ----------------------------------------------------------------------------------------------------------------
53 | 3: contains() للتحقق مما إذا كانت النص تحتوي على نص الذي تحدده
54 | Checks whether a string contains a sequence of characters
55 | ----------------------------------------------------------------------------------------------------------------
56 | 4: isEmpty() يتحقق مما إذا كانت النص فارغة أم لا
57 | The isEmpty() method checks whether a string is empty or not
58 | ----------------------------------------------------------------------------------------------------------------
59 | 5: startsWith() يستخدم لتحقق إن كان النص يبدأ بجزء الذي تحدده او لا
60 | Checks whether a string starts with specified characters
61 | ----------------------------------------------------------------------------------------------------------------
62 | 6: endsWith() يستخدم لتحقق إن كان النص ينتهي بجزء الذي تحدده او ل
63 | Checks whether a string ends with the specified character(s)
64 | ----------------------------------------------------------------------------------------------------------------
65 | Java String methods - Part 4 الجزء الرابع
66 | ----------------------------------------------------------------------------------------------------------------
67 | 1:split() : String[] يستخدم لإنشاء قائمة (ارراي) من احد نصوص
68 | Splits a string into an array of substrings
69 | ----------------------------------------------------------------------------------------------------------------
70 | 2:charAt() : char يستخدم لتحديد الشكل الذي يتواجد في التمركز الذي تحدده ويعيد لك ذلك شكل
71 | Returns the character at the specified index (position)
72 | ----------------------------------------------------------------------------------------------------------------
73 | 3:valueOf() : String يستخدم لتحويل انواع البيانات الاساسية إلى بيانات بصيغة البيانات النصية
74 | Returns the string representation of the specified value
75 | ----------------------------------------------------------------------------------------------------
76 | 4:toString() يستخدم لتحويل بيانات من نوع اوبجكت إلى بيانات بصيغة البيانات النصي
77 | A toString() is an in-built method in Java that returns the value given to it in string format.
78 | */
--------------------------------------------------------------------------------
/Lesson 44 - الدرس/App.java:
--------------------------------------------------------------------------------
1 | class App {
2 | public static void main(String[] args) {
3 | String text = "I like to learn java with coder shiyar";
4 | String theFirst10 = text.substring(text.length()-12);
5 | int indexOfCoderShiyar = text.indexOf("i");
6 | int lastIndexOfCoderShiyar = text.lastIndexOf("i");
7 | System.out.println(indexOfCoderShiyar);
8 | System.out.println(lastIndexOfCoderShiyar);
9 | System.out.println(theFirst10);
10 | System.out.println(text.replace("1oder shiyar", "Coder Shiyar"));
11 | }
12 | }
13 |
14 |
15 | /* ---------------------------------------------------------------------------------------------------------
16 | Java String methods - Part 2 الجزء الثاني
17 | ----------------------------------------------------------------------------------------------------------
18 | 1: String replace(oldChar, newChar) يقوم بإستبداول قيمة يطابق مع الجزء المحدد من النص , بالجزء جديد
19 | Searches a string for a specified value, and returns a new string where the specified values are replaced
20 | ---------------------------------------------------------------------------------------------------------
21 | 2: String substring(int startIndex, int endIndex) يستخدم لقطع نص
22 | This method can be used to cut a string
23 | ---------------------------------------------------------------------------------------------------------
24 | 3: indexOf() ترجع تمركز الأول للحرف (الأحرف) المحدد في النص المحدد
25 | The indexOf() method returns the position of the first occurrence of specified character(s) in a string
26 | ---------------------------------------------------------------------------------------------------------
27 | 4: lastIndexOf() ترجع موضع التواجد الأخير للحرف (الأحرف) المحدد في النص المحدد
28 | The lastIndexOf() method returns the position of the last occurrence of specified character(s) in a string
29 | */
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 | /* ---------------------------------------------------------------------------------------------------------
38 | Java String methods - Part 1 الجزء الاول
39 | ---------------------------------------------------------------------------------------------------------
40 | 1:toUpperCase() Converts a string to lower case letters - تحويل الاحرف النص إلى الاحرف الكبيرة
41 | 2:toLowerCase() Converts a string to upper case letters - تحويل الاحرف النص إلى الاحرف الصغيرة
42 | 3:length() Returns the length of a specified string. يعيد طول نص المحدد
43 | 4:trim() Removes whitespace from both ends of a string يزيل المسافة البيضاء من طرفي النص
44 | ---------------------------------------------------------------------------------------------------------------
45 |
46 | Java String methods - Part 3 الجزء الثالث
47 | ----------------------------------------------------------------------------------------------------------------
48 | 1: equals() يقارن نصين . إرجاع صحيح إذا كانت النصوص متساوية ، وإرجاع خطأ إذا لم يكن كذلك
49 | Compares two strings. Returns true if the strings are equal, and false if not
50 | ----------------------------------------------------------------------------------------------------------------
51 | 2: equalsIgnoreCase() يقارن نصين مع بعض دون حساسية تحقق من الحالة الاحرف الكبيرة و الصغيرة
52 | Compares two strings, ignoring case considerations
53 | ----------------------------------------------------------------------------------------------------------------
54 | 3: contains() للتحقق مما إذا كانت النص تحتوي على نص الذي تحدده
55 | Checks whether a string contains a sequence of characters
56 | ----------------------------------------------------------------------------------------------------------------
57 | 4: isEmpty() يتحقق مما إذا كانت النص فارغة أم لا
58 | The isEmpty() method checks whether a string is empty or not
59 | ----------------------------------------------------------------------------------------------------------------
60 | 5: startsWith() يستخدم لتحقق إن كان النص يبدأ بجزء الذي تحدده او لا
61 | Checks whether a string starts with specified characters
62 | ----------------------------------------------------------------------------------------------------------------
63 | 6: endsWith() يستخدم لتحقق إن كان النص ينتهي بجزء الذي تحدده او ل
64 | Checks whether a string ends with the specified character(s)
65 | ----------------------------------------------------------------------------------------------------------------
66 |
67 | Java String methods - Part 4 الجزء الرابع
68 | ----------------------------------------------------------------------------------------------------------------
69 | 1:split() : String[] يستخدم لإنشاء قائمة (ارراي) من احد نصوص
70 | Splits a string into an array of substrings
71 | ----------------------------------------------------------------------------------------------------------------
72 | 2:charAt() : char يستخدم لتحديد الشكل الذي يتواجد في التمركز الذي تحدده ويعيد لك ذلك شكل
73 | Returns the character at the specified index (position)
74 | ----------------------------------------------------------------------------------------------------------------
75 | 3:valueOf() : String يستخدم لتحويل انواع البيانات الاساسية إلى بيانات بصيغة البيانات النصية
76 | Returns the string representation of the specified value
77 | ----------------------------------------------------------------------------------------------------
78 | 4:toString() يستخدم لتحويل بيانات من نوع اوبجكت إلى بيانات بصيغة البيانات النصي
79 | A toString() is an in-built method in Java that returns the value given to it in string format.
80 | */
81 |
82 |
83 |
--------------------------------------------------------------------------------
/Lesson 45 old - الدرس/App.java:
--------------------------------------------------------------------------------
1 |
2 | public class App{
3 |
4 |
5 | public static void main(String[] args) {
6 | StringBuffer text = new StringBuffer("Coder");
7 | int length = text.length();
8 | text.append(" Shiyar");
9 | text.delete(0, 6);
10 | text.insert(0, " I love ");
11 | text.append(text.charAt(0) + ": ");
12 |
13 | if(text.length() >= 12){
14 |
15 | String textSubstring = text.substring(0);
16 |
17 | System.out.print(textSubstring);
18 | }else{
19 | System.out.print("التمركز الذي قمت بتحديدها , لا يتوجد بسبب عدد احرف في البيانات المتغير , يكون أقل من تمركز الذي قمت بتحديدها");
20 | }
21 |
22 |
23 |
24 |
25 |
26 | // Part 1 - StringBuffer - جزء الأول
27 | // append(String s) يتم استخدامها لإضافة النص
28 | // insert(int offset, String s) يُستخدم لإدراج النص المحدد إلى القيمة الذي يملك المتغير في الموضع الذي تحدده
29 | // replace(int startIndex, int endIndex, String str) يستخدم لإستبدال جزء من النص الذي تحدده بقيمة جديدة تحددها بنفسك
30 |
31 |
32 |
33 | // Part 2 - StringBuffer - جزء الثاني
34 | // delete(int startIndex, int endIndex) يستخدم لحذف جزء من النص , تحدده بنفسك أي جزء ترغب بحذفها
35 | // reverse() يستخدم لعكس النص.
36 | // charAt(int index) يستخدم لإرجاع الحرف في الموضع المحدد.
37 |
38 |
39 | // Part 3 - StringBuffer - جزء الثالث
40 | // length() تُستخدم لإرجاع طول النص ، أي العدد الإجمالي للأحرف.
41 | // substring(int beginIndex) يقوم بإعادة لك القيمة الذي يملكه المتغير ابتداء من تمركز الذي تحدده
42 |
43 | // يقوم بإعادة لك القيمة الذي يملكه المتغير ابتداء من تمركز الذي تحدده إلى تمركز الذي تقوم بتحديدها
44 | // substring(int beginIndex, int endIndex)
45 |
46 |
47 | }
48 |
49 | }
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/Lesson 45- الدرس/App.java:
--------------------------------------------------------------------------------
1 | class App {
2 | public static void main(String[] args) {
3 | String password = "1234";
4 | String email = "test@gmail.com";
5 | // System.out.println(email.contains("@gmail.net"));
6 | // System.out.println(email.isEmpty());
7 | boolean startsWithTest = email.startsWith("test");
8 | System.out.println(startsWithTest);
9 | boolean endsWithdotCom = email.endsWith(".com");
10 | System.out.println(endsWithdotCom);
11 | if(password.equals("1234") && email.equalsIgnoreCase("TEST@gmail.com")){
12 | System.out.println("Correct");
13 | }else{
14 | System.out.println("Not Correct");
15 | }
16 | }
17 | }
18 | /* ---------------------------------------------------------------------------------------------------------------
19 | Java String methods - Part 3 الجزء الثالث
20 | ----------------------------------------------------------------------------------------------------------------
21 | 1: equals() يقارن نصين . إرجاع صحيح إذا كانت النصوص متساوية ، وإرجاع خطأ إذا لم يكن كذلك
22 | Compares two strings. Returns true if the strings are equal, and false if not
23 | ----------------------------------------------------------------------------------------------------------------
24 | 2: equalsIgnoreCase() يقارن نصين مع بعض دون حساسية تحقق من الحالة الاحرف الكبيرة و الصغيرة
25 | Compares two strings, ignoring case considerations
26 | ----------------------------------------------------------------------------------------------------------------
27 | 3: contains() للتحقق مما إذا كانت النص تحتوي على نص الذي تحدده
28 | Checks whether a string contains a sequence of characters
29 | ----------------------------------------------------------------------------------------------------------------
30 | 4: isEmpty() يتحقق مما إذا كانت النص فارغة أم لا
31 | The isEmpty() method checks whether a string is empty or not
32 | ----------------------------------------------------------------------------------------------------------------
33 | 5: startsWith() يستخدم لتحقق إن كان النص يبدأ بجزء الذي تحدده او لا
34 | Checks whether a string starts with specified characters
35 | ----------------------------------------------------------------------------------------------------------------
36 | 6: endsWith() يستخدم لتحقق إن كان النص ينتهي بجزء الذي تحدده او ل
37 | Checks whether a string ends with the specified character(s) */
38 |
39 |
40 |
41 |
42 | /* ---------------------------------------------------------------------------------------------------------
43 | Java String methods - Part 1 الجزء الاول
44 | ---------------------------------------------------------------------------------------------------------
45 | 1:toUpperCase() Converts a string to lower case letters - تحويل الاحرف النص إلى الاحرف الكبيرة
46 | 2:toLowerCase() Converts a string to upper case letters - تحويل الاحرف النص إلى الاحرف الصغيرة
47 | 3:length() Returns the length of a specified string. يعيد طول نص المحدد
48 | 4:trim() Removes whitespace from both ends of a string يزيل المسافة البيضاء من طرفي النص
49 |
50 | ----------------------------------------------------------------------------------------------------------
51 | Java String methods - Part 2 الجزء الثاني
52 | ----------------------------------------------------------------------------------------------------------
53 | 1: String replace(oldChar, newChar) يقوم بإستبداول قيمة يطابق مع الجزء المحدد من النص , بالجزء جديد
54 | Searches a string for a specified value, and returns a new string where the specified values are replaced
55 | ---------------------------------------------------------------------------------------------------------
56 | 2: String substring(int startIndex, int endIndex) يستخدم لقطع نص
57 | This method can be used to cut a string
58 | ---------------------------------------------------------------------------------------------------------
59 | 3: indexOf() ترجع تمركز الأول للحرف (الأحرف) المحدد في النص المحدد
60 | The indexOf() method returns the position of the first occurrence of specified character(s) in a string
61 | ---------------------------------------------------------------------------------------------------------
62 | 4: lastIndexOf() ترجع موضع التواجد الأخير للحرف (الأحرف) المحدد في النص المحدد
63 | The lastIndexOf() method returns the position of the last occurrence of specified character(s) in a string
64 | ---------------------------------------------------------------------------------------------------------------
65 |
66 | ----------------------------------------------------------------------------------------------------------------
67 | Java String methods - Part 4 الجزء الرابع
68 | ----------------------------------------------------------------------------------------------------------------
69 | 1:split() : String[] يستخدم لإنشاء قائمة (ارراي) من احد نصوص
70 | Splits a string into an array of substrings
71 | ----------------------------------------------------------------------------------------------------------------
72 | 2:charAt() : char يستخدم لتحديد الشكل الذي يتواجد في التمركز الذي تحدده ويعيد لك ذلك شكل
73 | Returns the character at the specified index (position)
74 | ----------------------------------------------------------------------------------------------------------------
75 | 3:valueOf() : String يستخدم لتحويل انواع البيانات الاساسية إلى بيانات بصيغة البيانات النصية
76 | Returns the string representation of the specified value
77 | ----------------------------------------------------------------------------------------------------
78 | 4:toString() يستخدم لتحويل بيانات من نوع اوبجكت إلى بيانات بصيغة البيانات النصي
79 | A toString() is an in-built method in Java that returns the value given to it in string format.
80 | */
--------------------------------------------------------------------------------
/Lesson 46 - الدرس/App.java:
--------------------------------------------------------------------------------
1 | class App {
2 | public static void main(String[] args) {
3 | String date = "19/11/2025";
4 | String[] dateItems = date.split("/");
5 | System.out.println(dateItems[2]);
6 |
7 | String time = "23:11:19";
8 | String[] timeItems = time.split(":");
9 | System.out.println(timeItems[0]);
10 |
11 | String name = "Coder Shiyar";
12 | System.out.println(name.charAt(0));
13 |
14 | int number1 = 10;
15 | int number2 = 20;
16 | System.out.println(String.valueOf(number1) + String.valueOf(number2) );
17 |
18 | Integer number3 = 30;
19 | System.out.println(number3.toString()+40);
20 | System.out.println(String.valueOf(number3)+40);
21 | }
22 | }
23 |
24 | // ----------------------------------------------------------------------------------------------------------------
25 | // Java String methods - Part 4 الجزء الرابع
26 | // ----------------------------------------------------------------------------------------------------------------
27 | // 1:split() : String[] يستخدم لإنشاء قائمة (ارراي) من احد نصوص
28 | // Splits a string into an array of substrings
29 | // ----------------------------------------------------------------------------------------------------------------
30 | // 2:charAt() : char يستخدم لتحديد الشكل الذي يتواجد في التمركز الذي تحدده ويعيد لك ذلك شكل
31 | // Returns the character at the specified index (position)
32 | // ----------------------------------------------------------------------------------------------------------------
33 | // 3:valueOf() : String يستخدم لتحويل انواع البيانات الاساسية إلى بيانات بصيغة البيانات النصية
34 | // Returns the string representation of the specified value
35 | // ----------------------------------------------------------------------------------------------------
36 | // 4:toString() يستخدم لتحويل بيانات من نوع اوبجكت إلى بيانات بصيغة البيانات النصي
37 | // A toString() is an in-built method in Java that returns the value given to it in string format.
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 | /* ---------------------------------------------------------------------------------------------------------
46 | Java String methods - Part 1 الجزء الاول
47 | ---------------------------------------------------------------------------------------------------------
48 | 1:toUpperCase() Converts a string to lower case letters - تحويل الاحرف النص إلى الاحرف الكبيرة
49 | 2:toLowerCase() Converts a string to upper case letters - تحويل الاحرف النص إلى الاحرف الصغيرة
50 | 3:length() Returns the length of a specified string. يعيد طول نص المحدد
51 | 4:trim() Removes whitespace from both ends of a string يزيل المسافة البيضاء من طرفي النص
52 | ----------------------------------------------------------------------------------------------------------
53 | Java String methods - Part 2 الجزء الثاني
54 | ----------------------------------------------------------------------------------------------------------
55 | 1: String replace(oldChar, newChar) يقوم بإستبداول قيمة يطابق مع الجزء المحدد من النص , بالجزء جديد
56 | Searches a string for a specified value, and returns a new string where the specified values are replaced
57 | ---------------------------------------------------------------------------------------------------------
58 | 2: String substring(int startIndex, int endIndex) يستخدم لقطع نص
59 | This method can be used to cut a string
60 | ---------------------------------------------------------------------------------------------------------
61 | 3: indexOf() ترجع تمركز الأول للحرف (الأحرف) المحدد في النص المحدد
62 | The indexOf() method returns the position of the first occurrence of specified character(s) in a string
63 | ---------------------------------------------------------------------------------------------------------
64 | 4: lastIndexOf() ترجع موضع التواجد الأخير للحرف (الأحرف) المحدد في النص المحدد
65 | The lastIndexOf() method returns the position of the last occurrence of specified character(s) in a string
66 | ---------------------------------------------------------------------------------------------------------------
67 | Java String methods - Part 3 الجزء الثالث
68 | ----------------------------------------------------------------------------------------------------------------
69 | 1: equals() يقارن نصين . إرجاع صحيح إذا كانت النصوص متساوية ، وإرجاع خطأ إذا لم يكن كذلك
70 | Compares two strings. Returns true if the strings are equal, and false if not
71 | ----------------------------------------------------------------------------------------------------------------
72 | 2: equalsIgnoreCase() يقارن نصين مع بعض دون حساسية تحقق من الحالة الاحرف الكبيرة و الصغيرة
73 | Compares two strings, ignoring case considerations
74 | ----------------------------------------------------------------------------------------------------------------
75 | 3: contains() للتحقق مما إذا كانت النص تحتوي على نص الذي تحدده
76 | Checks whether a string contains a sequence of characters
77 | ----------------------------------------------------------------------------------------------------------------
78 | 4: isEmpty() يتحقق مما إذا كانت النص فارغة أم لا
79 | The isEmpty() method checks whether a string is empty or not
80 | ----------------------------------------------------------------------------------------------------------------
81 | 5: startsWith() يستخدم لتحقق إن كان النص يبدأ بجزء الذي تحدده او لا
82 | Checks whether a string starts with specified characters
83 | ----------------------------------------------------------------------------------------------------------------
84 | 6: endsWith() يستخدم لتحقق إن كان النص ينتهي بجزء الذي تحدده او ل
85 | Checks whether a string ends with the specified character(s)
86 | */
--------------------------------------------------------------------------------
/Lesson 46 - الدرس/AppExtra.java:
--------------------------------------------------------------------------------
1 |
2 | public class App{
3 |
4 | App(){
5 |
6 | }
7 | public static void main(String[] args) {
8 |
9 |
10 | // replaceAll() من خلالها يمكنك استبداله جزء من النص بجزء جديد
11 | // replaceFirst() يقوم بإستبداول قيمة يطابق مع الجزء المحدد من النص , بالجزء جديد
12 | // isEmpty() يستخدم لتحقق إذا كان متغير من نوع بيانات نصي خالي من بيانات او لا
13 | // lastIndexOf() تمركز اخر جزء يطابق مع الجزء المحدد
14 | // startsWith() يستخدم لتحقق إن كان النص يبدأ بجزء الذي تحدده او لا
15 | // endsWith() يستخدم لتحقق إن كان النص ينتهي بجزء الذي تحدده او لا
16 | String text = "Java, I like Java.";
17 | text = text.replaceFirst("not", "@");
18 | boolean isEmpty = text.isEmpty();
19 | int lastIndexOf = text.indexOf("Java");
20 |
21 | boolean startsWith = text.startsWith(" ");
22 | boolean endsWith = text.endsWith(".");
23 | // if(text.isEmpty()){
24 |
25 | // }else{
26 |
27 | // }
28 | System.out.println(endsWith);
29 |
30 | }
31 |
32 | }
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/Lesson 46 - الدرس/string_method.txt:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | // بالدرس 9 تم شرح عناصر التالية
5 | // toLowerCase() Converts a string to lower case letters - تحويل النص إلى احرف الصغيرة
6 | // toUpperCase() Converts a string to upper case letters - يحول النص إلى أحرف كبيرة
7 | // concat() Appends a string to the end of another string - إلحاق النص بنهايةأخرى
8 | // length() Returns the length of a specified string - إرجاع طول النص المحدد
9 | // إرجاع تمركز نص الذي يطابق مع الجزء المحددة
10 | // indexOf() Returns the position of the first found occurrence of specified characters in a string
11 |
12 | // بالدرس 30 تم شرح عناصر التالية
13 | // charAt() Returns the character at the specified index (position) - إرجاع الحرف عند الفهرس المحدد )
14 | // substring Extracts the characters from a string - يستخدم لقطع النص وإعادة لك الجزء المحدد الذي قطعته
15 | // trim() Removes whitespace from both ends of a string يحذف الفراغات من بداية ونهاية النص
16 |
17 | // equals() // يقارن 2 نصوص . ويقوم بإعادة
18 | // true
19 | // إذا تطابق 2 نصوص , ويقوم بإعادة
20 | // false
21 | // إذا لم تطابق 2 نصوص
22 | Compares two strings. Returns true if the strings are equal, and false if not
23 |
24 | //يبحث في نص لقيمة محددة ، ويعيد نص جديدة حيث يتم استبدال القيم المحددة
25 | // replace() // Searches a string for a specified value, and returns a
26 | // new string where the specified values are replaced
27 |
--------------------------------------------------------------------------------
/Lesson 47 - الدرس/App.java:
--------------------------------------------------------------------------------
1 | public class App extends Settings{
2 | public void printName(){
3 | System.out.println("Name: test");
4 | }
5 | public static void main(String[] args) {
6 | // final String name = "Shiyar";
7 | // name = "Coder Shiyar";
8 |
9 | }
10 | }
11 |
12 | final class Settings{
13 | final public void printName(){
14 | System.out.println("Name: Coder Shiyar");
15 | }
16 | }
17 |
18 |
19 | /* final(نهائي) : يتم استخدامها إذا كنت ترغب بجعل قيمة متغير ثابتة غير قابلة للتعديل
20 | او ا كنت ترغب بجعل كلاس او ميتود غير قابل للتعديل
21 | ------------------------------------------------------------------------------------------------------------------------
22 | 1: The final keyword is a non-access modifier used for classes, attributes and methods, which makes them non-changeable
23 | ------------------------------------------------------------------------------------------------------------------------
24 | 2: The final keyword is useful when you want a variable to always store the same value, like PI (3.14159...)
25 | ------------------------------------------------------------------------------------------------------------------------
26 | */
--------------------------------------------------------------------------------
/Lesson 48 - الدرس/App.java:
--------------------------------------------------------------------------------
1 |
2 | public class App{
3 |
4 | App(){
5 |
6 | }
7 | public static void main(String[] args) {
8 |
9 | int number1 = 10;
10 | int number2 = 20;
11 | System.out.println("العدد الأكبر يكون : " + Math.max(number1, number2));
12 | System.out.println("العدد الأصغر يكون : " + Math.min(number1, number2));
13 | System.out.println("الجذر تربيعي للعدد 36 يكون " + Math.sqrt(36));
14 | int number3 = -15;
15 | System.out.println("القيمة مطلقة للعدد - 15 يكون : " + Math.abs(number3));
16 |
17 | double random_number = Math.random();
18 | System.out.println("العدد العشوائي يكون : " + random_number);
19 | }
20 |
21 | }
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Lesson 48 - الدرس/math_java.txt:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | // Math.max(x,y) يستخدم لإيجاد العدد الأكبر بين عددين
8 | // Math.min(x,y) يستخدم لإيجاد العدد الأصغر بين عددين
9 | // Math.sqrt(x) يستخدم لعرض الجذر التربيعي للعدد الذي تحدده
10 |
11 | // Math.abs(x) يستخدم لتحويل عدد سلبي إلى عدد إيجابي
12 | // Math.random() يقوم بجلب لك عدد عشوائي بين 0 و 1
13 |
14 |
15 |
16 | Coder Shiyar - مهندس شيار
17 | --------------------------------
18 | https://youtube.com/codershiyar
--------------------------------------------------------------------------------
/Lesson 49 - الدرس/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | "configurations": [
3 | {
4 | "type": "java",
5 | "name": "CodeLens (Launch) - App",
6 | "request": "launch",
7 | "mainClass": "Java.App",
8 | "projectName": "java_c87954b4"
9 | },
10 | {
11 | "type": "java",
12 | "name": "CodeLens (Launch) - App",
13 | "request": "launch",
14 | "mainClass": "App",
15 | "projectName": "java_c87954b4"
16 | }
17 | ]
18 | }
--------------------------------------------------------------------------------
/Lesson 49 - الدرس/Java/App.java:
--------------------------------------------------------------------------------
1 | package Java;
2 |
3 | public class App {
4 |
5 | public static void main(String[] args) {
6 | App app = new App();
7 |
8 | App.App2 app2 = app.new App2("Coder Shiyar");
9 | // app2.print_message();
10 | }
11 |
12 | class App2{
13 | public void print_message(){
14 | System.out.println("تم تشغيل ميتود الذي يتواجد ضمن ال كلاس الداخلي");
15 | }
16 | App2(){
17 | System.out.println("تم تشغيل كونستركتور كلاس الداخلي");
18 | }
19 |
20 | App2(String name){
21 | System.out.println("Name: " + name);
22 | }
23 |
24 | }
25 |
26 | }
--------------------------------------------------------------------------------
/Lesson 50 - الدرس/Abstract_Java.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codershiyar/java/f160878ec0010e062bafdb5e5fc5072892c64f98/Lesson 50 - الدرس/Abstract_Java.bmp
--------------------------------------------------------------------------------
/Lesson 50 - الدرس/Java/App.java:
--------------------------------------------------------------------------------
1 | package Java;
2 |
3 | public class App extends App2 {
4 |
5 | public static void main(String[] args) {
6 |
7 | App.show_message();
8 | // App2 app2 = new App2();
9 | }
10 |
11 | }
12 |
13 |
--------------------------------------------------------------------------------
/Lesson 50 - الدرس/Java/App2.java:
--------------------------------------------------------------------------------
1 | package Java;
2 |
3 | public abstract class App2 {
4 | public static void show_message(){
5 |
6 | System.out.println("رسالة من ميتود داخل كلاس ابستركت");
7 | }
8 | }
--------------------------------------------------------------------------------
/Lesson 51 - الدرس/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | "configurations": [
3 | {
4 | "type": "java",
5 | "name": "CodeLens (Launch) - App",
6 | "request": "launch",
7 | "mainClass": "Java.App",
8 | "projectName": "java_c87954b4"
9 | },
10 | {
11 | "type": "java",
12 | "name": "CodeLens (Launch) - App",
13 | "request": "launch",
14 | "mainClass": "App",
15 | "projectName": "java_c87954b4"
16 | }
17 | ]
18 | }
--------------------------------------------------------------------------------
/Lesson 51 - الدرس/Java/App.java:
--------------------------------------------------------------------------------
1 | package Java;
2 |
3 | public class App extends App2 {
4 |
5 | @Override
6 | public void show_name(){
7 | System.out.println("Name: Coder Shiyar");
8 | }
9 |
10 | public static void main(String[] args) {
11 | App app = new App();
12 | app.show_name();
13 |
14 | }
15 |
16 | }
17 |
18 |
--------------------------------------------------------------------------------
/Lesson 51 - الدرس/Java/App2.java:
--------------------------------------------------------------------------------
1 | package Java;
2 |
3 | public abstract class App2 {
4 |
5 | public abstract static void show_name();
6 |
7 | public static void show_message(){
8 | System.out.println("رسالة من ميتود داخل كلاس ابستركت");
9 | }
10 | }
--------------------------------------------------------------------------------
/Lesson 51 - الدرس/method_abstract.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codershiyar/java/f160878ec0010e062bafdb5e5fc5072892c64f98/Lesson 51 - الدرس/method_abstract.bmp
--------------------------------------------------------------------------------
/Lesson 52 - الدرس/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | "configurations": [
3 | {
4 | "type": "java",
5 | "name": "CodeLens (Launch) - App",
6 | "request": "launch",
7 | "mainClass": "Java.App",
8 | "projectName": "java_c87954b4"
9 | },
10 | {
11 | "type": "java",
12 | "name": "CodeLens (Launch) - App",
13 | "request": "launch",
14 | "mainClass": "App",
15 | "projectName": "java_c87954b4"
16 | }
17 | ]
18 | }
--------------------------------------------------------------------------------
/Lesson 52 - الدرس/Java/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | "configurations": [
3 | {
4 | "type": "java",
5 | "name": "CodeLens (Launch) - App",
6 | "request": "launch",
7 | "mainClass": "Java.App",
8 | "projectName": "Java_281ceabd"
9 | }
10 | ]
11 | }
--------------------------------------------------------------------------------
/Lesson 52 - الدرس/Java/Java/App.java:
--------------------------------------------------------------------------------
1 | package Java;
2 | // extends + implements معنى
3 |
4 | // extends = مدد او رث
5 | // يعني مدد الكلاس مع كلاس أخر - او اجعل يرث الكلاس من كلاس اخر
6 |
7 | // implements - زود
8 | // يعني تزويد الكلاس بإنترفيس
9 |
10 | class App extends App2 implements Color , Background {
11 | public static void main(String[] args) {
12 | System.out.println(App.name);
13 | }
14 | }
15 |
16 |
17 | class App2{
18 | static String name = "Coder Shiyar";
19 | }
--------------------------------------------------------------------------------
/Lesson 52 - الدرس/Java/Java/Background.java:
--------------------------------------------------------------------------------
1 | package Java;
2 |
3 | public interface Background {
4 |
5 | }
--------------------------------------------------------------------------------
/Lesson 52 - الدرس/Java/Java/Color.java:
--------------------------------------------------------------------------------
1 | package Java;
2 |
3 | public interface Color {
4 |
5 | }
--------------------------------------------------------------------------------
/Lesson 53 - الدرس/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | "configurations": [
3 | {
4 | "type": "java",
5 | "name": "CodeLens (Launch) - App",
6 | "request": "launch",
7 | "mainClass": "Java.App",
8 | "projectName": "java_c87954b4"
9 | },
10 | {
11 | "type": "java",
12 | "name": "CodeLens (Launch) - App",
13 | "request": "launch",
14 | "mainClass": "App",
15 | "projectName": "java_c87954b4"
16 | }
17 | ]
18 | }
--------------------------------------------------------------------------------
/Lesson 53 - الدرس/Java/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | "configurations": [
3 | {
4 | "type": "java",
5 | "name": "CodeLens (Launch) - App",
6 | "request": "launch",
7 | "mainClass": "Java.App",
8 | "projectName": "Java_281ceabd"
9 | }
10 | ]
11 | }
--------------------------------------------------------------------------------
/Lesson 53 - الدرس/Java/Java/App.java:
--------------------------------------------------------------------------------
1 | package Java;
2 |
3 | class App implements AppInterface{
4 | @Override
5 | public void setName(String name){
6 | System.out.println("الأسم: "+ name);
7 | System.out.println(App.course_name);
8 | };
9 |
10 | public static void setName2(String name){
11 | System.out.println("الأسم: "+ name);
12 | System.out.println(App.course_name);
13 | }
14 | public static void main(String[] args) {
15 | App app = new App();
16 | // app.setName("Coder Shiyar");
17 |
18 | App.setName2("Coder Shiyar");
19 |
20 | AppInterface appInterface = new AppInterface(){
21 | public void setName(String name){
22 | System.out.println(name);
23 | };
24 | };
25 |
26 | appInterface.setName("تم تنفيذ اوامر من داخل انترفيس اوبجكت غير نظامي");
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Lesson 53 - الدرس/Java/Java/AppInterface.java:
--------------------------------------------------------------------------------
1 | package Java;
2 |
3 | public interface AppInterface {
4 |
5 | String course_name = "دورة جافا";
6 | public void setName(String name);
7 | }
--------------------------------------------------------------------------------
/Lesson 53 - الدرس/شرح الإنترفيس ( Interface ).pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codershiyar/java/f160878ec0010e062bafdb5e5fc5072892c64f98/Lesson 53 - الدرس/شرح الإنترفيس ( Interface ).pptx
--------------------------------------------------------------------------------
/Lesson 54 - الدرس/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | "configurations": [
3 | {
4 | "type": "java",
5 | "name": "CodeLens (Launch) - App",
6 | "request": "launch",
7 | "mainClass": "Java.App",
8 | "projectName": "java_c87954b4"
9 | },
10 | {
11 | "type": "java",
12 | "name": "CodeLens (Launch) - App",
13 | "request": "launch",
14 | "mainClass": "App",
15 | "projectName": "java_c87954b4"
16 | }
17 | ]
18 | }
--------------------------------------------------------------------------------
/Lesson 54 - الدرس/Java/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | "configurations": [
3 | {
4 | "type": "java",
5 | "name": "CodeLens (Launch) - App",
6 | "request": "launch",
7 | "mainClass": "Java.App",
8 | "projectName": "Java_281ceabd"
9 | }
10 | ]
11 | }
--------------------------------------------------------------------------------
/Lesson 54 - الدرس/Java/Java/App.java:
--------------------------------------------------------------------------------
1 | package Java;
2 |
3 | class App implements AppInterface {
4 |
5 | public static void main(String[] args) {
6 | System.out.println(App.package_name);
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/Lesson 54 - الدرس/Java/Java/App2.java:
--------------------------------------------------------------------------------
1 | package Java;
2 |
3 | public class App2 implements AppInterface {
4 |
5 | }
--------------------------------------------------------------------------------
/Lesson 54 - الدرس/Java/Java/App3.java:
--------------------------------------------------------------------------------
1 | package Java;
2 |
3 | public class App3 implements AppInterface {
4 |
5 | }
--------------------------------------------------------------------------------
/Lesson 54 - الدرس/Java/Java/AppInterface.java:
--------------------------------------------------------------------------------
1 | package Java;
2 |
3 | public interface AppInterface {
4 | String package_name = "com.codershiyar";
5 | String app_name = "Coder Shiyar";
6 | }
--------------------------------------------------------------------------------
/Lesson 55 - الدرس/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | "configurations": [
3 | {
4 | "type": "java",
5 | "name": "CodeLens (Launch) - App",
6 | "request": "launch",
7 | "mainClass": "Java.App",
8 | "projectName": "java_c87954b4"
9 | },
10 | {
11 | "type": "java",
12 | "name": "CodeLens (Launch) - App",
13 | "request": "launch",
14 | "mainClass": "App",
15 | "projectName": "java_c87954b4"
16 | }
17 | ]
18 | }
--------------------------------------------------------------------------------
/Lesson 55 - الدرس/Java/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | "configurations": [
3 | {
4 | "type": "java",
5 | "name": "CodeLens (Launch) - App",
6 | "request": "launch",
7 | "mainClass": "Java.App",
8 | "projectName": "Java_281ceabd"
9 | }
10 | ]
11 | }
--------------------------------------------------------------------------------
/Lesson 55 - الدرس/Java/Java/App.java:
--------------------------------------------------------------------------------
1 | package Java;
2 |
3 | class App extends App2 {
4 |
5 | public static void main(String[] args) {
6 |
7 | System.out.println(App.name);
8 | App.show_message();
9 | App.show_message2();
10 | }
11 | }
12 |
13 | class App2 extends App3 {
14 | static String name = "Coder Shiyar Java";
15 | }
16 |
17 |
18 | class App3 extends App4{
19 | public static void show_message(){
20 | System.out.println("من كلاس الثالث");
21 | }
22 | }
23 |
24 | class App4{
25 | public static void show_message2(){
26 | System.out.println("من كلاس الرابع");
27 | }
28 | }
--------------------------------------------------------------------------------
/Lesson 56 - الدرس/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | "configurations": [
3 | {
4 | "type": "java",
5 | "name": "CodeLens (Launch) - App",
6 | "request": "launch",
7 | "mainClass": "Java.App",
8 | "projectName": "java_c87954b4"
9 | },
10 | {
11 | "type": "java",
12 | "name": "CodeLens (Launch) - App",
13 | "request": "launch",
14 | "mainClass": "App",
15 | "projectName": "java_c87954b4"
16 | }
17 | ]
18 | }
--------------------------------------------------------------------------------
/Lesson 56 - الدرس/Java/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | "configurations": [
3 | {
4 | "type": "java",
5 | "name": "CodeLens (Launch) - App",
6 | "request": "launch",
7 | "mainClass": "Java.App",
8 | "projectName": "Java_281ceabd"
9 | }
10 | ]
11 | }
--------------------------------------------------------------------------------
/Lesson 56 - الدرس/Java/Java/App.java:
--------------------------------------------------------------------------------
1 | package Java;
2 |
3 | class App {
4 | public static void callAppHome(AppHome appHome){
5 |
6 | }
7 | public static void main(String[] args) {
8 | App.callAppHome(new AppHome(" كل شي يعمل"));
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Lesson 56 - الدرس/Java/Java/AppHome.java:
--------------------------------------------------------------------------------
1 | package Java;
2 |
3 | public class AppHome{
4 | AppHome(String message){
5 | System.out.println("تم تنفيذ اوامر كونستركتور");
6 | System.out.println(message);
7 | }
8 | }
--------------------------------------------------------------------------------
/Lesson 57 - الدرس/App.java:
--------------------------------------------------------------------------------
1 |
2 | public class App{
3 |
4 |
5 | public static void main(String[] args) {
6 |
7 | String text = "Coder Shiyar";
8 |
9 | StringBuffer textBuffer = new StringBuffer("Coder Shiyar");
10 | textBuffer.append(" is a teacher");
11 | textBuffer.insert(0, "1: ");
12 | textBuffer.replace(0, 2, "YouTube: ");
13 |
14 | System.out.println(textBuffer);
15 |
16 | // Part 1 - StringBuffer - جزء الأول
17 | // append(String s) يتم استخدامها لإضافة النص
18 | // insert(int offset, String s) يُستخدم لإدراج النص المحدد إلى القيمة الذي يملك المتغير في الموضع الذي تحدده
19 | // replace(int startIndex, int endIndex, String str) يستخدم لإستبدال جزء من النص الذي تحدده بقيمة جديدة تحددها بنفسك
20 |
21 |
22 |
23 | }
24 |
25 | }
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/Lesson 57 old - الدرس/App.java:
--------------------------------------------------------------------------------
1 |
2 | import java.util.Scanner;
3 |
4 | public class App{
5 | public static void main(String[] args) {
6 | Scanner scan = new Scanner(System.in);
7 | // String name = scan.nextLine();
8 | // boolean isMarried = scan.nextBoolean();
9 | // System.out.println("Name is : " + name);
10 |
11 | System.out.println("ضع رقم الأول");
12 | int number1 = scan.nextInt();
13 | System.out.println("ضع الرقم الثاني");
14 | int number2 = scan.nextInt();
15 |
16 | if(number1>number2){
17 | System.out.println("القيمة المتغير الأول اكبر");
18 | }else if(number1==number2){
19 | System.out.println("العددين متساويين");
20 | }
21 | else{
22 | System.out.println("القيمة المتغير الثاني أكبر");
23 | }
24 |
25 | double double_number = scan.nextDouble();
26 | }
27 | }
--------------------------------------------------------------------------------
/Lesson 57 old - الدرس/websites_links.txt:
--------------------------------------------------------------------------------
1 | رابط الموقع الأول:
2 | https://www.onlinegdb.com/online_java_compiler
3 | رابط الموقع الثاني :
4 | https://www.w3schools.com/java/java_user_input.asp
--------------------------------------------------------------------------------
/Lesson 58 - الدرس/app.java:
--------------------------------------------------------------------------------
1 |
2 | public class App{
3 |
4 |
5 | public static void main(String[] args) {
6 | StringBuffer textBuffer = new StringBuffer("Coder Shiyar Java");
7 | textBuffer.delete(0, 5);
8 | // textBuffer.reverse();
9 | char position10 = textBuffer.charAt(10);
10 | System.out.print(position10);
11 |
12 |
13 |
14 | }
15 |
16 | }
17 |
18 | // Part 1 - StringBuffer - جزء الأول
19 | // append(String s) يتم استخدامها لإضافة النص
20 | // insert(int offset, String s) يُستخدم لإدراج النص المحدد إلى القيمة الذي يملك المتغير في الموضع الذي تحدده
21 | // replace(int startIndex, int endIndex, String str) يستخدم لإستبدال جزء من النص الذي تحدده بقيمة جديدة تحددها بنفسك
22 |
23 |
24 |
25 | // Part 2 - StringBuffer - جزء الثاني
26 | // delete(int startIndex, int endIndex) يستخدم لحذف جزء من النص , تحدده بنفسك أي جزء ترغب بحذفها
27 | // reverse() يستخدم لعكس النص.
28 | // charAt(int index) يستخدم لإرجاع الحرف في الموضع المحدد.
29 |
30 | // Part 2 - StringBuffer - جزء الثاني
31 | // delete(int startIndex, int endIndex) يستخدم لحذف جزء من النص , تحدده بنفسك أي جزء ترغب بحذفها
32 | // reverse() يستخدم لعكس النص.
33 | // charAt(int index) يستخدم لإرجاع الحرف في الموضع المحدد.
34 |
35 |
36 | // Part 3 - StringBuffer - جزء الثالث
37 | // length() تُستخدم لإرجاع طول النص ، أي العدد الإجمالي للأحرف.
38 | // substring(int beginIndex) يقوم بإعادة لك القيمة الذي يملكه المتغير ابتداء من تمركز الذي تحدده
39 |
40 | // يقوم بإعادة لك القيمة الذي يملكه المتغير ابتداء من تمركز الذي تحدده إلى تمركز الذي تقوم بتحديدها
41 | // substring(int beginIndex, int endIndex)
42 |
--------------------------------------------------------------------------------
/Lesson 58 old - الدرس/app.java:
--------------------------------------------------------------------------------
1 | // 1: Scanner
2 | // 2: Boolean datatype - if statment
3 | // 3: String equals()
4 | // 4: int + Strings
5 | // 5: if without {}
6 | import java.util.Scanner;
7 | public class app {
8 | public static void main(String[] args) {
9 | if(false)
10 | System.out.println("True");
11 |
12 | else{
13 | System.out.println("false");
14 | }
15 |
16 |
17 |
18 | System.out.println(2+0+2+6 + " Year " );
19 |
20 | // String text = "Java";
21 | // if(text.equals("Java") ){
22 | // System.out.println("Correct");
23 | // }
24 | // boolean isRunning = false;
25 | // if(isRunning){
26 | // System.out.println("Yes it is working");
27 | // }
28 |
29 | // Scanner input = new Scanner(System.in);
30 | // System.out.println("Age: ");
31 | // int age = input.nextInt();
32 | // input.nextLine();
33 | // System.out.println("number: ");
34 | // int number = input.nextInt();
35 | // input.nextLine();
36 |
37 | // System.out.println("Name: ");
38 | // String name = input.nextLine();
39 |
40 |
41 |
42 | // System.out.println("Name: " + name + " Age:" + age);
43 | }
44 | }
--------------------------------------------------------------------------------
/Lesson 59 - الدرس/App.java:
--------------------------------------------------------------------------------
1 |
2 | public class App{
3 | public static Payment payment;
4 | App(){
5 | System.out.println("مرحبا انا من كونستروكتور");
6 | }
7 | public static void main(String[] args) {
8 |
9 | App.payment = new Payment();
10 | // constructor = البناء
11 | // class = فئة - صنف
12 | // method = اسلوب - طريقة وظيفة
13 |
14 | // App app2 = new App();
15 | }
16 |
17 | }
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Lesson 59 - الدرس/Payment.java:
--------------------------------------------------------------------------------
1 |
2 | public class Payment {
3 | Payment(){
4 | System.out.println("طرق الدفع : ");
5 | System.out.println("1: Visa Card");
6 | System.out.println("2: Master Card");
7 | System.out.println("3: PayPal");
8 | }
9 |
10 | }
--------------------------------------------------------------------------------