Q49- The following switch statement is correct switch(mark) { Case>59.99: System.out.println(" you passed"); break; Case =79.99: System.out.println("you passed with good score"); break; Case>89.99: System.out.println("you passed with distinguished score"); break; } True False
Q49- The following switch statement is correct switch(mark) } Case>59.99: System.out.println(" you passed"); ok break; :79.99= Case System.out.println("you passed with good score"); break Case>89.99: System.out.println("you passed with distinguished score"); break; }
True
False
ليش خطأ بتهيألي أنو الكود صح
خطأ
لأن case تأخذ أولا قيم محددة مثلا 8 أو 6 أو " H " أو ";"
و لا تأخذ float or decimal ولا تأخذ نطاق أو مدى >12.5
راجعي هيكلة switch من الكتاب و السلايدات
كل التوفيق
Ms. MalaK
طيب عندي سؤال تاني ؟؟؟؟؟ public void sum (int number1, int number2) int total = number1 + number2; System.out.println("the total = " + total); What is correct for this function? This method returns a value This method does not return a value This method cannot be called from the program that uses it This method is inaccessible
public void sum (int number1, int number2) } int total = number1 + number2
System.out.println("the total = " + total) { What is correct for this function? This method returns a value <---incorrect X This method does not return a value This method cannot be called from the program that uses it This method is inaccessible
ليش أخترنا هل الخيار مع أنو أستخدمنا void بالكود
The method is correct. it takes 2 parameters number1 and number 2. it calculates their summation and displays the result on the screen and thaere is NO return value because of void
the correct answer is
Q12- When the compiler sees //, it executes all text after it in the same line هذا السؤال موجود في الميد والاجابه هنا تقول خطا !!مع انو على حسب فهمي صح فممكن احد يشرح لنا لو تكرمتم وشكرااا ؟؟؟
هلا اختي انسانه طموحه حتى قلت كده المفروض الاجابه الثالثه لانه قال السؤال( الثاني والرابع ) اختي انسانه طموحه ممكن توضيحيلي السؤال الموجود اعلاء لماذا خطا مع انه صح ؟؟؟؟ اي معناه السؤال ان في كل سطر نضع هذه الاشاره صحيح كلامي او لا؟؟؟؟
Q12- When the compiler sees //, it executes all text after it in the same line هذا السؤال موجود في الميد والاجابه هنا تقول خطا !!مع انو على حسب فهمي صح فممكن احد يشرح لنا لو تكرمتم وشكرااا ؟؟؟
طبعا خطأ
اسألي نفسك ايش هادي العلامة معناها//
انها علامة التعليق يعني كل من هو بجانبها على السطر لن ينفذه الكومبيلر
// in-line Comment the compiler does not execute the text beside this mark
و هذا أول نوع
والنوع الثاني هو
multi-lines */
* comments
/*
the compiler does not execute the text inside these marks
refer to the book pages 41, 42,43
المفضلات