-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6ac8f67
commit e706524
Showing
7 changed files
with
180 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
public class App { | ||
|
||
public static void main(String[] args) { | ||
// int number1 = 25; | ||
// int number2 = 10; | ||
// int result = number1%number2; | ||
// System.out.println(++number1); | ||
// System.out.println(number1); | ||
|
||
String text = " I love Java " + (20+25)+ " انا احب جافا"; | ||
|
||
System.out.println(text); | ||
} | ||
|
||
} | ||
|
||
// Arithmetic operators ^ العمليات الحسابية | ||
// ----------------------------------------------------------------------------------- | ||
// Operator | Name | ||
// ----------------------------------------------------------------------------------- | ||
// + Addition جمع | ||
// - Subtraction طرح | ||
// * Multiplication ضرب | ||
// / Division قسمة | ||
// % Modulus Returns the division remainder إعادة الباقي العدد مقسم | ||
// ++ Increment زيادة 1 للعدد المحدد المخزن ضمن احد متغيرات | ||
// -- Decrement نقص 1 للعدد المحدد المخزن ضمن احد متغيرات | ||
// = Assignment يساوي | ||
// ----------------------------------------------------------------------------------- | ||
// Java Assignment Operators عمليات استناد قيمة | ||
// ---------------------------------------------- | ||
// Operator | ||
// = | ||
// += | ||
// -= | ||
// *= | ||
// /= | ||
// %= | ||
|
||
|
||
|
||
|
||
// ------------------------------------------------------------------------------------------------------------------------ | ||
// Arithmetic priority - أولويات العمليات الحسابية | ||
// ------------------------------------------------------------------------------------------------------------------------ | ||
// 1: The order of operations is as follows: Parentheses, exponents, multiplication and division, addition and subtraction | ||
// يكون ترتيب العمليات كالآتي: “الأقواس، الأس، الضرب والقسمة، الجمع والطرح”. | ||
// ------------------------------------------------------------------------------------------------------------------------ | ||
// 2: This can be described by: Parentheses beat exponents, which beat multiplication and division | ||
// (but multiplication and division are in the same order). | ||
// ويمكن وصف ذلك من خلال: تفوق الأقواس الأسس، التي تتفوق على الضرب والقسمة (لكن الضرب، والقسمة في نفس الترتيب). | ||
// ------------------------------------------------------------------------------------------------------------------------ | ||
// 3: Multiplication and division take precedence over addition and subtraction (both in lower order), | ||
// in other words, the precedence is: | ||
// والضرب والقسمة يفوقان الجمع والطرح، (وهما معًا في الترتيب السفلي)، وبمعنى آخر، الأسبقية هي | ||
// ------------------------------------------------------------------------------------------------------------------------ | ||
// // 4:Multiplication and division (from right to left when the numbers are Arabic, and from | ||
// left to right when the numbers are English). | ||
// الضرب والقسمة (من اليمين إلى اليسار عندما تكون الأرقام عربية، ومن اليسار إلى اليمين عندما تكون الأرقام إنجليزية) | ||
// ------------------------------------------------------------------------------------------------------------------------ | ||
// 5: addition and subtraction (from right to left when the numbers are Arabic, | ||
// and from left to right when the numbers are English). | ||
// الجمع والطرح (من اليمين إلى اليسار عندما تكون الأرقام عربية، ومن اليسار إلى اليمين عندما تكون الأرقام إنجليزية) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
public class App { | ||
public static void main(String[] args) { | ||
int number1 = 10; | ||
boolean result = !(number1<20) ; | ||
System.out.println("Result: " + result); | ||
|
||
} | ||
} | ||
|
||
// Java Comparison Operators - العمليات المقارنة في جافا | ||
// ------------------------------------------------------------------------------------------------------------ | ||
// Comparison operators are used to compare two values: يتم استخدام رموز عمليات مقارنة لمقارنة بين عددين | ||
// ------------------------------------------------------------------------------------------------------------ | ||
// Operator - رمز Name - اسم | ||
// ------------------------------------------------------------------------------------------------------------ | ||
// == Equal to يساوي | ||
// != Not equal ليس متساوي | ||
// > Greater than اكبر من | ||
// < Less than اصغر من | ||
// >= Greater than or equal to أكبر من أو يساوي | ||
// <= Less than or equal to أصغر من أو يساوي | ||
|
||
// Java Logical Operators | ||
// --------------------------------------------------------------------------------------------------------------- | ||
//Operator(الرمز) Name(الاسم) Description (الوصف) | ||
// --------------------------------------------------------------------------------------------------------------- | ||
// && and و Returns true if both statements are true يعود صحيح إذا كانت كلتا العبارتين صحيحين | ||
// || or او Returns true if one of the statements is trueيعود صحيحًا إذا كان أحد العبارات صحيحًا | ||
// ! not لا Reverse the result, returns false if the result is true | ||
// اعكس النتيجة ، وإرجاع خطأ إذا كانت النتيجة صحيحة |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
public class App { | ||
|
||
public static void main(String[] args) { | ||
String language1 = "العربية"; | ||
String language2 = "Kurdi"; | ||
String language3 ="Nederlands"; | ||
String language4 = "English"; | ||
|
||
String[] languages = {"العربية" , "Kurdi" , "Nederlands" , "English"}; | ||
|
||
languages[1] = "Deutsch"; | ||
|
||
String[][] users = {{"shiyar","[email protected]" ,"1234"} ,{"Coder","[email protected]" ,"1234"}}; | ||
|
||
System.out.println(users[1][0]); | ||
// System.out.println(languages[languages.length -2 ]); | ||
// System.out.println(languages[5]); | ||
} | ||
} | ||
|
||
// How to create an Array - (ارراي)كيفية إنشاء مصفوفة | ||
// // ------------------------------------------------------------------------- | ||
// datatype [] variableName = {1,2} قوانين لانشاء متغيرات | ||
// ---------------------------------------------------------------------------- | ||
// How to store data in an Array - طريقة تخزين البيانات | ||
// ---------------------------------------------------------------------------- | ||
// How to access data in an Array - طريقة وصول الى البيانات | ||
// Change an Array Element - كيفية تحديث البيانات المخزنة في ارراي | ||
// Array Length - طريقة معرفة عدد القيم المخزنة في ارراي | ||
// ----------------------------------------------------------------------------- | ||
// Multidimensional Arrays - المصفوفات متعددة الأبعاد |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
public class App { | ||
|
||
public static void main(String[] args) { | ||
|
||
String[] languages = {"Arabic" , "Dutch" , "German" , "Kurdish" , "English"}; | ||
// System.out.println(languages[0]); | ||
// System.out.println(languages[1]); | ||
// System.out.println(languages[2]); | ||
// System.out.println(languages[3]); | ||
// System.out.println(languages[4]); | ||
int numbering = 0; | ||
for(String language : languages ){ | ||
++numbering; | ||
System.out.println(numbering + ": " + language); | ||
} | ||
|
||
} | ||
} | ||
|
||
// for (type variableName : arrayName) { | ||
// // code block to be executed - الكود الذي ترغب بتنفيذه | ||
// } | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
public class App { | ||
|
||
public static void main(String[] args) { | ||
// int counter = 1; | ||
// int number= 7; | ||
// while(counter<=20){ | ||
// System.out.println(counter + " * " + number + " = " + (counter * number) ); | ||
// counter++; | ||
// } | ||
|
||
String[] webLanguages = {"html","css" ,"JavaScript" , "PHP"}; | ||
|
||
int counter2 = 0; | ||
while(counter2<webLanguages.length){ | ||
System.out.println("Language " + (counter2 + 1) + " : " + webLanguages[counter2]); | ||
counter2++; | ||
} | ||
|
||
} | ||
} | ||
|
||
|
||
// Java While Loop | ||
// --------------------------------------------------------------------- | ||
// يستخدم لتكرار تنفيذ الأوامر الى ما يصبح الشرط الذي وضعته غير صحيح | ||
// --------------------------------------------------------------------- | ||
// while (condition الشرط) { | ||
// // code block to be executed - الكود الذي ترغب بان يتم تنفيذها | ||
// } |
File renamed without changes.
File renamed without changes.