Deck 1: Introduction to Computers, Programs, and Java

ملء الشاشة (f)
exit full mode
سؤال
Assume x is 0. What is the output of the following statement? Assume x is 0. What is the output of the following statement?  <div style=padding-top: 35px>
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
What is the printout of the following switch statement? <strong>What is the printout of the following switch statement?  </strong> A) ab B) a C) aa D) abc E) abcd <div style=padding-top: 35px>

A) ab
B) a
C) aa
D) abc
E) abcd
سؤال
Which of the following is a constant, according to Java naming conventions?

A) read
B) MAX_VALUE
C) ReadInt
D) Test
سؤال
What is y after the following switch statement is executed? <strong>What is y after the following switch statement is executed?  </strong> A) 1 B) 4 C) 3 D) 2 E) 0 <div style=padding-top: 35px>

A) 1
B) 4
C) 3
D) 2
E) 0
سؤال
To declare a constant MAX_LENGTH inside a method with value 99.98, you write

A) final double MAX_LENGTH = 99.98;
B) double MAX_LENGTH = 99.98;
C) final MAX_LENGTH = 99.98;
D) final float MAX_LENGTH = 99.98;
سؤال
Analyze the following code: <strong>Analyze the following code:  </strong> A) Code 2 has syntax errors. B) Code 1 has syntax errors. C) Both Code 1 and Code 2 have syntax errors. D) Both Code 1 and Code 2 are correct, but Code 2 is better. <div style=padding-top: 35px>

A) Code 2 has syntax errors.
B) Code 1 has syntax errors.
C) Both Code 1 and Code 2 have syntax errors.
D) Both Code 1 and Code 2 are correct, but Code 2 is better.
سؤال
What is x after evaluating x = (2 > 3) ? 2 : 3;

A) 5
B) 2
C) 3
D) 4
سؤال
What is y after the following switch statement? <strong>What is y after the following switch statement?  </strong> A) 2 B) 1 C) 0 D) -1 <div style=padding-top: 35px>

A) 2
B) 1
C) 0
D) -1
سؤال
Analyze the following code. <strong>Analyze the following code.  </strong> A) The value of variable x is always printed. B) The symbol x is always printed twice. C) The symbol x is always printed. D) Nothing is printed because x > 0 is false. <div style=padding-top: 35px>

A) The value of variable x is always printed.
B) The symbol x is always printed twice.
C) The symbol x is always printed.
D) Nothing is printed because x > 0 is false.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/9
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 1: Introduction to Computers, Programs, and Java
1
Assume x is 0. What is the output of the following statement? Assume x is 0. What is the output of the following statement?
C
2
What is the printout of the following switch statement? <strong>What is the printout of the following switch statement?  </strong> A) ab B) a C) aa D) abc E) abcd

A) ab
B) a
C) aa
D) abc
E) abcd
B
3
Which of the following is a constant, according to Java naming conventions?

A) read
B) MAX_VALUE
C) ReadInt
D) Test
B
4
What is y after the following switch statement is executed? <strong>What is y after the following switch statement is executed?  </strong> A) 1 B) 4 C) 3 D) 2 E) 0

A) 1
B) 4
C) 3
D) 2
E) 0
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 9 في هذه المجموعة.
فتح الحزمة
k this deck
5
To declare a constant MAX_LENGTH inside a method with value 99.98, you write

A) final double MAX_LENGTH = 99.98;
B) double MAX_LENGTH = 99.98;
C) final MAX_LENGTH = 99.98;
D) final float MAX_LENGTH = 99.98;
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 9 في هذه المجموعة.
فتح الحزمة
k this deck
6
Analyze the following code: <strong>Analyze the following code:  </strong> A) Code 2 has syntax errors. B) Code 1 has syntax errors. C) Both Code 1 and Code 2 have syntax errors. D) Both Code 1 and Code 2 are correct, but Code 2 is better.

A) Code 2 has syntax errors.
B) Code 1 has syntax errors.
C) Both Code 1 and Code 2 have syntax errors.
D) Both Code 1 and Code 2 are correct, but Code 2 is better.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 9 في هذه المجموعة.
فتح الحزمة
k this deck
7
What is x after evaluating x = (2 > 3) ? 2 : 3;

A) 5
B) 2
C) 3
D) 4
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 9 في هذه المجموعة.
فتح الحزمة
k this deck
8
What is y after the following switch statement? <strong>What is y after the following switch statement?  </strong> A) 2 B) 1 C) 0 D) -1

A) 2
B) 1
C) 0
D) -1
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 9 في هذه المجموعة.
فتح الحزمة
k this deck
9
Analyze the following code. <strong>Analyze the following code.  </strong> A) The value of variable x is always printed. B) The symbol x is always printed twice. C) The symbol x is always printed. D) Nothing is printed because x > 0 is false.

A) The value of variable x is always printed.
B) The symbol x is always printed twice.
C) The symbol x is always printed.
D) Nothing is printed because x > 0 is false.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 9 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 9 في هذه المجموعة.