From 6ac8f67148ce666443f572ef2a4896db9dab75a9 Mon Sep 17 00:00:00 2001 From: Coder Shiyar Date: Sun, 6 Feb 2022 15:38:02 +0100 Subject: [PATCH] new lessons --- .../JavaProject/.idea/.gitignore" | 3 + .../JavaProject/.idea/misc.xml" | 6 ++ .../JavaProject/.idea/modules.xml" | 8 +++ .../JavaProject/JavaProject.iml" | 11 ++++ .../out/production/JavaProject/App.class" | Bin 0 -> 522 bytes .../out/production/JavaProject/App2.class" | Bin 0 -> 237 bytes .../JavaProject/src/App.java" | 5 ++ .../JavaProject/src/App2.java" | 2 + .../app.java" | 8 ++- .../App.java" | 9 +++ .../App.java" | 24 ++++++++ .../App.java" | 29 +++++++++ .../App.java" | 36 +++++++++++ .../App.java" | 57 ++++++++++++++++++ .../App.java" | 44 ++++++++++++++ .../app.java" | 44 ++++++++++++++ 16 files changed, 284 insertions(+), 2 deletions(-) create mode 100644 "Lesson 01 - \330\247\331\204\330\257\330\261\330\263/JavaProject/.idea/.gitignore" create mode 100644 "Lesson 01 - \330\247\331\204\330\257\330\261\330\263/JavaProject/.idea/misc.xml" create mode 100644 "Lesson 01 - \330\247\331\204\330\257\330\261\330\263/JavaProject/.idea/modules.xml" create mode 100644 "Lesson 01 - \330\247\331\204\330\257\330\261\330\263/JavaProject/JavaProject.iml" create mode 100644 "Lesson 01 - \330\247\331\204\330\257\330\261\330\263/JavaProject/out/production/JavaProject/App.class" create mode 100644 "Lesson 01 - \330\247\331\204\330\257\330\261\330\263/JavaProject/out/production/JavaProject/App2.class" create mode 100644 "Lesson 01 - \330\247\331\204\330\257\330\261\330\263/JavaProject/src/App.java" create mode 100644 "Lesson 01 - \330\247\331\204\330\257\330\261\330\263/JavaProject/src/App2.java" create mode 100644 "Lesson 02 - \330\247\331\204\330\257\330\261\330\263/App.java" create mode 100644 "Lesson 03 - \330\247\331\204\330\257\330\261\330\263/App.java" create mode 100644 "Lesson 04 - \330\247\331\204\330\257\330\261\330\263/App.java" create mode 100644 "Lesson 05 - \330\247\331\204\330\257\330\261\330\263/App.java" create mode 100644 "Lesson 06 - \330\247\331\204\330\257\330\261\330\263/App.java" create mode 100644 "Lesson 07 - \330\247\331\204\330\257\330\261\330\263/App.java" create mode 100644 "Lesson 58 - \330\247\331\204\330\257\330\261\330\263/app.java" diff --git "a/Lesson 01 - \330\247\331\204\330\257\330\261\330\263/JavaProject/.idea/.gitignore" "b/Lesson 01 - \330\247\331\204\330\257\330\261\330\263/JavaProject/.idea/.gitignore" new file mode 100644 index 0000000..26d3352 --- /dev/null +++ "b/Lesson 01 - \330\247\331\204\330\257\330\261\330\263/JavaProject/.idea/.gitignore" @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git "a/Lesson 01 - \330\247\331\204\330\257\330\261\330\263/JavaProject/.idea/misc.xml" "b/Lesson 01 - \330\247\331\204\330\257\330\261\330\263/JavaProject/.idea/misc.xml" new file mode 100644 index 0000000..07115cd --- /dev/null +++ "b/Lesson 01 - \330\247\331\204\330\257\330\261\330\263/JavaProject/.idea/misc.xml" @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git "a/Lesson 01 - \330\247\331\204\330\257\330\261\330\263/JavaProject/.idea/modules.xml" "b/Lesson 01 - \330\247\331\204\330\257\330\261\330\263/JavaProject/.idea/modules.xml" new file mode 100644 index 0000000..9cc296d --- /dev/null +++ "b/Lesson 01 - \330\247\331\204\330\257\330\261\330\263/JavaProject/.idea/modules.xml" @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git "a/Lesson 01 - \330\247\331\204\330\257\330\261\330\263/JavaProject/JavaProject.iml" "b/Lesson 01 - \330\247\331\204\330\257\330\261\330\263/JavaProject/JavaProject.iml" new file mode 100644 index 0000000..c90834f --- /dev/null +++ "b/Lesson 01 - \330\247\331\204\330\257\330\261\330\263/JavaProject/JavaProject.iml" @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git "a/Lesson 01 - \330\247\331\204\330\257\330\261\330\263/JavaProject/out/production/JavaProject/App.class" "b/Lesson 01 - \330\247\331\204\330\257\330\261\330\263/JavaProject/out/production/JavaProject/App.class" new file mode 100644 index 0000000000000000000000000000000000000000..f14510bcbb9be6f8f1094b7b90daf819b049259f GIT binary patch literal 522 zcmZuu%TB^T6g>ll(pm*U@U7qqT-c=x)Wn#$B5HzR<7&VLhx9>8F>x<0{1IKa!G%T_ zet=)l{*3WXF;Nqm%$?kG?m1_s^ZE7u0bn0nIub~#PzTfdUp73RC0^YG0b!E}2v(0r5%6UAWzPt)-$w2RQ8a z8I&XM(qhOqglnA)owntl^R`V$zTtJa-QvEG{ST-FS7N}BYLK>0VuuR~DOE3~r4Y~k zE{zwa&-iq)-qLN vGJqAVQm0`J>x4-0Zfr)_Gt~U-3$nik@?n7_y_fRGM8gI)31=u%O`!4(M|^Nh literal 0 HcmV?d00001 diff --git "a/Lesson 01 - \330\247\331\204\330\257\330\261\330\263/JavaProject/out/production/JavaProject/App2.class" "b/Lesson 01 - \330\247\331\204\330\257\330\261\330\263/JavaProject/out/production/JavaProject/App2.class" new file mode 100644 index 0000000000000000000000000000000000000000..b4cf2e1cb191ee90311925b5e341d3f78912dfef GIT binary patch literal 237 zcmXYr%L>9U5JhkLwDr;AAGlK&7To#(5nL5rDBY(uXi9BMt^SuQ!G#~-M~RbS2JXx~ zlS$_DeZ2uJ;JeVE+b}vXVKMkAzw;pD`6<}NsYq%DYc6wHFB$aVD6-LFFji$brL-=N zg24-AF1EKzEUE*KGa~)4NO%_UN-F<{Mtzo7dM#ALGX{5G+^R%uq?&LPoT$GsfK4l@ m!zgGeQioj7c)%P#!5#!OxTLDBuC_@#O>I){Hmpag!TSL*%qhSC literal 0 HcmV?d00001 diff --git "a/Lesson 01 - \330\247\331\204\330\257\330\261\330\263/JavaProject/src/App.java" "b/Lesson 01 - \330\247\331\204\330\257\330\261\330\263/JavaProject/src/App.java" new file mode 100644 index 0000000..2c3b34e --- /dev/null +++ "b/Lesson 01 - \330\247\331\204\330\257\330\261\330\263/JavaProject/src/App.java" @@ -0,0 +1,5 @@ +public class App { + public static void main(String[] args) { + System.out.println("برنامج يعمل"); + } +} diff --git "a/Lesson 01 - \330\247\331\204\330\257\330\261\330\263/JavaProject/src/App2.java" "b/Lesson 01 - \330\247\331\204\330\257\330\261\330\263/JavaProject/src/App2.java" new file mode 100644 index 0000000..cc6fed5 --- /dev/null +++ "b/Lesson 01 - \330\247\331\204\330\257\330\261\330\263/JavaProject/src/App2.java" @@ -0,0 +1,2 @@ +public class App2 { +} diff --git "a/Lesson 01 - \330\247\331\204\330\257\330\261\330\263/app.java" "b/Lesson 01 - \330\247\331\204\330\257\330\261\330\263/app.java" index 04dd6a8..a838d2c 100644 --- "a/Lesson 01 - \330\247\331\204\330\257\330\261\330\263/app.java" +++ "b/Lesson 01 - \330\247\331\204\330\257\330\261\330\263/app.java" @@ -1,5 +1,9 @@ -class App{ +/** + * App + */ +public class App { + public static void main(String[] args) { - System.out.println("كودر شيار"); + System.out.println("برنامج يعمل"); } } \ No newline at end of file diff --git "a/Lesson 02 - \330\247\331\204\330\257\330\261\330\263/App.java" "b/Lesson 02 - \330\247\331\204\330\257\330\261\330\263/App.java" new file mode 100644 index 0000000..a838d2c --- /dev/null +++ "b/Lesson 02 - \330\247\331\204\330\257\330\261\330\263/App.java" @@ -0,0 +1,9 @@ +/** + * App + */ +public class App { + + public static void main(String[] args) { + System.out.println("برنامج يعمل"); + } +} \ No newline at end of file diff --git "a/Lesson 03 - \330\247\331\204\330\257\330\261\330\263/App.java" "b/Lesson 03 - \330\247\331\204\330\257\330\261\330\263/App.java" new file mode 100644 index 0000000..ca807ce --- /dev/null +++ "b/Lesson 03 - \330\247\331\204\330\257\330\261\330\263/App.java" @@ -0,0 +1,24 @@ +//--------------------------------------------------------------------------------------------------------- +//Coder Shiyar : Java Comments +//--------------------------------------------------------------------------------------------------------- +// Multi-line comments start with /* and ends with */ تبدأ التعليقات متعددة الأسطر بـ / * وتنتهي بـ +// Any text between /* and */ will be ignored by Java. سيتم تجاهل أي نص بين / * و * / بواسطة جافا +// Single-line comments start with two forward slashes (//)تبدأ التعليقات أحادية السطر بشرطتين مائلتين للأمام +// Any text between // and the end of the line is ignored by Java (will not be executed). +// يتم تجاهل أي نص بين // ونهاية السطر بواسطة جافا (لن يتم تنفيذه) + +public class App { + +public static void main(String[] args) { + // لطبع النص تعلم جافا + // System.out.println("Learn Java"); + System.out.println("Learn Java"); +/* + +تعلم جافا مع كودر شيار + +*/ + + } +} + diff --git "a/Lesson 04 - \330\247\331\204\330\257\330\261\330\263/App.java" "b/Lesson 04 - \330\247\331\204\330\257\330\261\330\263/App.java" new file mode 100644 index 0000000..5e0db93 --- /dev/null +++ "b/Lesson 04 - \330\247\331\204\330\257\330\261\330\263/App.java" @@ -0,0 +1,29 @@ +public class App { + +public static void main(String[] args) { +// String +// int +String text = "Learn Java In Arabic"; +int number = 100; + +System.out.println(text); +System.out.println(number+20); + } +} + +// القسم اول : طريقة انشاء متغيرات في جافا +//------------------------------------------------------------------ +// type variableName = value; +// النوع الاسم_المتغير = القيمة +//------------------------------------------------------------------ +// القسم الثاني : شرح انواع البيانات الذي يمكنك تخزينها في جافا +//------------------------------------------------------------------ +// القسم الثالث :شرح للقوانين انشاء اسماء متغيرات في جافا + +// Part 1: How to create variables in Java +//------------------------------------------------ ------------------ +// type variableName = value; +//------------------------------------------------ ------------------ +// Part 2: Explain the types of data that you can store in Java +//------------------------------------------------ ------------------ +// Part 3: An explanation of the rules for creating variable names in Java \ No newline at end of file diff --git "a/Lesson 05 - \330\247\331\204\330\257\330\261\330\263/App.java" "b/Lesson 05 - \330\247\331\204\330\257\330\261\330\263/App.java" new file mode 100644 index 0000000..0f79d56 --- /dev/null +++ "b/Lesson 05 - \330\247\331\204\330\257\330\261\330\263/App.java" @@ -0,0 +1,36 @@ + +public class App { + +public static void main(String[] args) { + + } +} + +// القسم الثاني : شرح انواع البيانات الذي يمكنك تخزينها في جافا +//------------------------------------------------------------------ +// Part 2: Explain the types of data that you can store in Java +//------------------------------------------------ ------------------ +// byte 1 byte Stores whole numbers from -128 to 127 2*2*2*2*2*2*2 +// short 2 bytes Stores whole numbers from -32,768 to 32,767 +// int 4 bytes Stores whole numbers from -2,147,483,648 to 2,147,483,647 +// long 8 bytes Stores whole numbers from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 +// float 4 bytes Stores fractional numbers. Sufficient for storing 6 to 7 decimal digits +// double 8 bytes Stores fractional numbers. Sufficient for storing 15 decimal digits +// boolean 1 bit Stores true or false values +// char 2 bytes Stores a single character/letter or ASCII values + +// Primitive types are predefined (already defined) in Java. Non-primitive types are created by the programmer +// 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. +// A primitive type has always a value, while non-primitive types can be null. +// A primitive type starts with a lowercase letter, while non-primitive types starts with an uppercase letter. +// The size of a primitive type depends on the data type, while non-primitive types have all the same size. + +// القسم اول : طريقة انشاء متغيرات في جافا +//------------------------------------------------------------------ +// القسم الثالث :شرح للقوانين انشاء اسماء متغيرات في جافا +//------------------------------------------------------------------ + +// Part 1: How to create variables in Java +//------------------------------------------------ ------------------ +// Part 3: An explanation of the rules for creating variable names in Java + diff --git "a/Lesson 06 - \330\247\331\204\330\257\330\261\330\263/App.java" "b/Lesson 06 - \330\247\331\204\330\257\330\261\330\263/App.java" new file mode 100644 index 0000000..fb4d108 --- /dev/null +++ "b/Lesson 06 - \330\247\331\204\330\257\330\261\330\263/App.java" @@ -0,0 +1,57 @@ + +public class App { + +public static void main(String[] args) { + +short short_number = 130; +short_number = 140; +System.out.println(short_number); + +float float_number = 1206548.5f; +System.out.println(float_number); + +double double_number = 1236341.5; +System.out.println(double_number); + +boolean isDeviceWorking = true; +System.out.println(isDeviceWorking); + +char character = 0X3F; +System.out.println(character); + +String text = "I learn Java \t with Coder Shiyar"; +System.out.println(text); + + } +} + +// القسم الثاني : شرح انواع البيانات الذي يمكنك تخزينها في جافا +//------------------------------------------------------------------ +// Part 2: Explain the types of data that you can store in Java +//------------------------------------------------ ------------------ +// byte 1 byte Stores whole numbers from -128 to 127 2*2*2*2*2*2*2 +// short 2 bytes Stores whole numbers from -32,768 to 32,767 +// int 4 bytes Stores whole numbers from -2,147,483,648 to 2,147,483,647 +// long 8 bytes Stores whole numbers from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 + +// float 4 bytes Stores fractional numbers. Sufficient for storing 6 to 7 decimal digits +// double 8 bytes Stores fractional numbers. Sufficient for storing 15 decimal digits + +// boolean 1 bit Stores true or false values +// char 2 bytes Stores a single character/letter or ASCII values + +// Primitive types are predefined (already defined) in Java. Non-primitive types are created by the programmer +// 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. +// A primitive type has always a value, while non-primitive types can be null. +// A primitive type starts with a lowercase letter, while non-primitive types starts with an uppercase letter. +// The size of a primitive type depends on the data type, while non-primitive types have all the same size. + +// القسم اول : طريقة انشاء متغيرات في جافا +//------------------------------------------------------------------ +// القسم الثالث :شرح للقوانين انشاء اسماء متغيرات في جافا +//------------------------------------------------------------------ + +// Part 1: How to create variables in Java +//------------------------------------------------ ------------------ +// Part 3: An explanation of the rules for creating variable names in Java + diff --git "a/Lesson 07 - \330\247\331\204\330\257\330\261\330\263/App.java" "b/Lesson 07 - \330\247\331\204\330\257\330\261\330\263/App.java" new file mode 100644 index 0000000..5422765 --- /dev/null +++ "b/Lesson 07 - \330\247\331\204\330\257\330\261\330\263/App.java" @@ -0,0 +1,44 @@ +public class App { + +public static void main(String[] args) { + // rule 1 + String text = "Learn Java in Arabic"; + // rule 4 + String texT = "تعلم جافا مع كودر شيار"; + // rule 5 + boolean IsWorking = true; + System.out.println(texT); + } +} + +// القسم الثالث :شرح للقوانين انشاء اسماء متغيرات في جافا +// القواعد العامة لتسمية المتغيرات هي: +// ------------------------------------------------ ------------------------- +// يمكن أن تحتوي الأسماء على أحرف وأرقام وشرطات سفلية وعلامات الدولار +// _ يجب أن تبدأ الأسماء بحرف او بـ $ أو +// ينصح أن تبدأ الأسماء بحرف صغير ولا يمكن أن تحتوي على مسافة +// الأسماء حساسة لحالة الأحرف هناك فرق بين احرف كبيرة وصغيرة +// لا يمكن استخدام الكلمات المحجوزة كأسماء + +// Part 3: An explanation of the rules for creating variable names in Java +//-------------------------------------------------------------------------- +// The general rules for naming variables are: +//------------------------------------------------------------------------ +// Names can contain letters, digits, underscores, and dollar signs +// Names must begin with a letter also with $ or _ +// Names should start with a lowercase letter and it cannot contain whitespace +// Names are case sensitive ("myVar" and "myvar" are different variables) +// Reserved words (like Java keywords, such as int or boolean) cannot be used as names + + +// List of Reserved Java Keywords - قائمة لبعض اسماء محجوزة في جافا +//------------------------------------------------------------------------ +// abstract assert boolean break byte case +// catch char class const continue default +// double do else enum extends false +// final finally float for goto if +// implements import instanceof int interface long +// native new null package private protected +// public return short static strictfp super +// switch synchronized this throw throws transient +// true try void volatile while diff --git "a/Lesson 58 - \330\247\331\204\330\257\330\261\330\263/app.java" "b/Lesson 58 - \330\247\331\204\330\257\330\261\330\263/app.java" new file mode 100644 index 0000000..51737ea --- /dev/null +++ "b/Lesson 58 - \330\247\331\204\330\257\330\261\330\263/app.java" @@ -0,0 +1,44 @@ +// 1: Scanner +// 2: Boolean datatype - if statment +// 3: String equals() +// 4: int + Strings +// 5: if without {} +import java.util.Scanner; +public class app { + public static void main(String[] args) { + if(false) + System.out.println("True"); + + else{ + System.out.println("false"); + } + + + + System.out.println(2+0+2+6 + " Year " ); + + // String text = "Java"; + // if(text.equals("Java") ){ + // System.out.println("Correct"); + // } + // boolean isRunning = false; + // if(isRunning){ + // System.out.println("Yes it is working"); + // } + + // Scanner input = new Scanner(System.in); + // System.out.println("Age: "); + // int age = input.nextInt(); + // input.nextLine(); + // System.out.println("number: "); + // int number = input.nextInt(); + // input.nextLine(); + + // System.out.println("Name: "); + // String name = input.nextLine(); + + + + // System.out.println("Name: " + name + " Age:" + age); + } +} \ No newline at end of file