Deck 2: Java Fundamentals

ملء الشاشة (f)
exit full mode
سؤال
What is the result of the following expression? 10 + 5 * 3 - 20

A) -5
B) 5
C) 25
D) -50
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
Character literals are enclosed in _____;string literals are enclosed in _____.

A) single quotes;single quotes
B) double quotes;double quotes
C) single quotes;double quotes
D) double quotes;single quotes
سؤال
Which of the following is not a primitive data type?

A) short
B) long
C) float
D) String
سؤال
A Java program must have at least one of these:

A) Class definition
B) Variable
C) Comment
D) System.out.println();statement
سؤال
What is the result of the following expression? 25 / 4 + 4 * 10 % 3

A) 19
B) 5.25
C) 3
D) 7
سؤال
The ___________ is normally considered the standard output and standard input devices,and usually refer to the monitor and keyboard.

A) CRT
B) CPU
C) secondary storage devices
D) console
سؤال
What will be displayed as a result of executing the following code? int x = 6;
String msg = "I am enjoying this class.";
String msg1 = msg.toUpperCase();
String msg2 = msg.toLowerCase();
Char ltr = msg.charAt(x);
Int strSize = msg.length();
System.out.println(msg);
System.out.println(msg1);
System.out.println(msg2);
System.out.println("Character at index x = " +
Ltr);
System.out.println("msg has " + strSize +
"characters.");

A) I am enjoying this class.
I AM ENJOYING THIS CLASS.
I am enjoying this class.
Character at index x = e
Msg has 24 characters.
B) I am enjoying this class.
I AM ENJOYING THIS CLASS.
I am enjoying this class.
Character at index x = e
Msg has 25 characters.
C) I am enjoying this class.
I AM ENJOYING THIS CLASS.
I am enjoying this class.
Character at index x = n
Msg has 24 characters.
D) I am enjoying this class.
I AM ENJOYING THIS CLASS.
I am enjoying this class.
Character at index x = n
Msg has 25characters.
سؤال
What will be displayed as a result of executing the following code? int x = 5,y = 20;
X += 32;
Y /= 4;
System.out.println("x = " + x + ",y = " + y);

A) x = 32,y = 4
B) x = 9,y = 52
C) x = 37,y = 5
D) x = 160,y = 80
سؤال
Which of the following is valid?

A) float y;
Y = 54.9;
B) float y;
Double z;
Z = 934.21;
Y = z;
C) float w;
W = 1.0f;
D) float v;
V = 1.0;
سؤال
In the following Java statement what value is stored in the variable name? String name = "John Doe";

A) John Doe
B) The memory address where "John Doe" is located
C) name
D) The memory address where name is located
سؤال
Which of the following is not a valid comment statement?

A) // comment 1
B) /* comment 2 */
C) */ comment 3 /*
D) /** comment 4 */
سؤال
If the following Java statements are executed,what will be displayed? System.out.println("The top three winners are \ n");
System.out.print("Jody,the Giant \ n");
System.out.print("Buffy,the Barbarian");
System.out.println("Adelle,the Alligator");

A) The top three winners are
Jody,the Giant
Buffy,the Barbarian
Adelle,the Alligator
B) The top three winners are
Jody,the Giant \ nBuffy,the BarbarianAdelle,the Alligator
C) The top three winners are Jody,the Giant \ nBuffy,the BarbarianAdelle,and the Albino
D) The top three winners are
Jody,the Giant
Buffy,the BarbarianAdelle,the Alligator
سؤال
The boolean data type may contain values in the following range of values

A) true or false
B) -128 to + 127
C) - 2,147,483,648 to +2,147,483,647
D) - 32,768 to +32,767
سؤال
What will be the value of z as a result of executing the following code? int x = 5,y = 28;
Float z;
Z = (float)(y / x);

A) 5.60
B) 5.6
C) 3.0
D) 5.0
سؤال
To compile a program named First,use the following command

A) java First.java
B) javac First
C) javac First.java
D) compile First.javac
سؤال
What would be printed out as a result of the following code? System.out.println("The quick brown fox" +
"jumped over the \ n"
"slow moving hen.");

A) The quick brown fox jumped over the \ nslow moving hen.
B) The quick brown fox jumped over the
Slow moving hen.
C) The quick brown fox
Jumped over the
Slow moving hen.
D) Nothing.This is an error.
سؤال
Which of the following is not a rule that must be followed when naming identifiers?

A) The first character must be one of the letters a-z,A-Z,and underscore or a dollar sign.
B) Identifiers can contain spaces.
C) Uppercase and lowercase characters are distinct.
D) After the first character,you may use the letters a-z,A-Z,the underscore,a dollar sign,or digits 0-9.
سؤال
What will be the displayed when the following code is executed? final int x = 22,y = 4;
Y += x;
System.out.println("x = " + x +
",y = " + y);

A) x = 22,y = 4
B) x = 22,y = 26
C) x = 22,y = 88
D) Nothing,this is an error
سؤال
This is a value that is written into the code of a program.

A) literal
B) assignment statement
C) variable
D) operator
سؤال
What will be displayed as a result of executing the following code? public class test
{
Public static void main(String[] args)
{
Int value1 = 9;
System.out.println(value1);
Int value2 = 45;
System.out.println(value2);
System.out.println(value3);
Value = 16;
}
}

A) 9
45
16
B) 94516
C) 9 45 16
D) Nothing,this is an error
سؤال
To print "Hello,world" on the monitor,use the following Java statement

A) SystemOutPrintln("Hello,world");
B) System.out.println{"Hello,world"}
C) System.out.println("Hello,world");
D) Print "Hello,world";
سؤال
Given the declaration double r;,which of the following statements is invalid?

A) r = 326.75;
B) r = 9.4632e15;
C) r = 9.4632E15;
D) r = 2.9X106;
سؤال
What will be displayed after the following statements have been executed? final double x;
X = 54.3;
System.out.println("x = " + x );

A) x = 54.3
B) x
C) x = 108.6
D) Nothing,this is an error.
سؤال
This is a named storage location in the computer's memory.

A) Literal
B) Constant
C) Variable
D) Operator
سؤال
What is the result of the following expression? 17 % 3 * 2 - 12 + 15

A) 7
B) 8
C) 12
D) 105
سؤال
Variables are classified according to their

A) value
B) data type
C) names
D) location in the program
سؤال
What would be displayed as a result of the following code? int x = 578;
System.out.print("There are " +
X + 5 + " \ n" +
"hens in the hen house.");

A) There are 583 hens in the hen house.
B) There are 5785 hens in the hen house.
C) There are x5 \ nhens in the hen house.
D) There are 5785
Hens in the hen house.
سؤال
The primitive data types only allow a(n)_____ to hold a single value.

A) variable
B) object
C) class
D) literal
سؤال
This is a variable whose content is read only and cannot be changed during the program's execution.

A) operator
B) literal
C) named constant
D) reserved word
سؤال
What will be the value of z after the following statements have been executed? int x = 4,y = 33;
Double z;
Z = (double)(y / x);

A) 8.25
B) 4
C) 8
D) 8.0
سؤال
Variables of the boolean data type are useful for

A) working with small integers
B) evaluating true/false conditions
C) working with very large integers
D) evaluating scientific notation
سؤال
If x has been declared an int,which of the following statements is invalid?

A) x = 0;
B) x = -58932;
C) x = 1,000;
D) x = 592;
سؤال
To display the output on the next line,you can use the println method or use this escape sequence in the print method.

A) \ n
B) \ r
C) \ t
D) \ b
سؤال
Which of the following does not describe a valid comment in Java?

A) Single line comments,two forward slashes - //
B) Multi-line comments,start with /* and end with */
C) Multi-line comments,start with */ and end with /*
D) Documentation comments,any comments starting with /** and ending with */
سؤال
What will be displayed after the following statements have been executed? int x = 15,y = 20,z = 32;
X += 12;
Y /= 6;
Z -= 14;
System.out.println("x = " + x +
",y = " + y +
",z = " +z);

A) x = 27,y = 3.333,z = 18
B) x = 27,y = 2,z = 18
C) x = 27,y = 3,z = 18
D) x = 37,y = 14,z = 4
سؤال
What is the result of the following expression? 25 - 7 * 3 + 12 / 3

A) 6
B) 8
C) 10
D) 12
سؤال
Every Java application program must have

A) a class named MAIN
B) a method named main
C) comments
D) integer variables
سؤال
When saving a Java source file,save it with an extension of

A) .javac
B) .class
C) .src
D) .java
سؤال
Which of the following is a valid Java statement?

A) String str = 'John Doe';
B) string str = "John Doe";
C) string str = 'John Doe';
D) String str = "John Doe";
سؤال
What will be displayed as a result of executing the following code? int x = 8;
String msg = "I am enjoying java.";
String msg1 = msg.toUpperCase();
String msg2 = msg.toLowerCase();
Char ltr = msg.charAt(x);
Int strSize = msg.length();
System.out.println(msg);
System.out.println(msg1);
System.out.println(msg2);
System.out.println("Character at index x = " +
Ltr);
System.out.println("msg has " + strSize +
" characters.");

A) I am enjoying java.
I AM ENJOYING JAVA.
I am enjoying java.
Character at index x = j
Msg has 20 characters.
B) I am enjoying java.
I AM ENJOYING JAVA.
I am enjoying java.
Character at index x = o
Msg has 20 characters.
C) I am enjoying java.
I AM ENJOYING JAVA.
I am enjoying java.
Character at index x = o
Msg has 19 characters.
D) I am enjoying java.
I AM ENJOYING JAVA.
I am enjoying java.
Character at index x = y
Msg has 19 characters.
سؤال
A variable's scope is the part of the program that has access to the variable.
سؤال
Which of the following statements correctly creates a Scanner object for keyboard input?

A) Scanner kbd = new Scanner(System.keyboard);
B) Scanner keyboard(System.in);
C) Scanner keyboard = new Scanner(System.in);
D) Keyboard scanner = new Keyboard(System.in);
سؤال
Which Scanner class method reads an int?

A) readInt()
B) nextInt()
C) getInt()
D) read_int()
سؤال
Programming style includes techniques for consistently putting spaces and indentation in a program so visual cues are created.
سؤال
If the compiler encounters a statement that uses a variable before the variable is declared,an error will result.
سؤال
All Java statements end with semicolons.
سؤال
Assuming that pay has been declared a double,the following statement is valid.
pay = 2,583.44;
سؤال
Both character literals and string literals can be assigned to a char variable.
سؤال
Class names and key words are examples of variables.
سؤال
Although the dollar sign is a legal identifier character,you should not use it because it is normally used for special purposes.
سؤال
In Java the variable named one is the same as the variable named One.
سؤال
Named constants are initialized with a value,that value cannot be changed during the execution of the program.
سؤال
Which Scanner class method reads a String?

A) readString()
B) nextString()
C) getString()
D) nextLine()
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/53
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 2: Java Fundamentals
1
What is the result of the following expression? 10 + 5 * 3 - 20

A) -5
B) 5
C) 25
D) -50
B
2
Character literals are enclosed in _____;string literals are enclosed in _____.

A) single quotes;single quotes
B) double quotes;double quotes
C) single quotes;double quotes
D) double quotes;single quotes
C
3
Which of the following is not a primitive data type?

A) short
B) long
C) float
D) String
D
4
A Java program must have at least one of these:

A) Class definition
B) Variable
C) Comment
D) System.out.println();statement
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
5
What is the result of the following expression? 25 / 4 + 4 * 10 % 3

A) 19
B) 5.25
C) 3
D) 7
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
6
The ___________ is normally considered the standard output and standard input devices,and usually refer to the monitor and keyboard.

A) CRT
B) CPU
C) secondary storage devices
D) console
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
7
What will be displayed as a result of executing the following code? int x = 6;
String msg = "I am enjoying this class.";
String msg1 = msg.toUpperCase();
String msg2 = msg.toLowerCase();
Char ltr = msg.charAt(x);
Int strSize = msg.length();
System.out.println(msg);
System.out.println(msg1);
System.out.println(msg2);
System.out.println("Character at index x = " +
Ltr);
System.out.println("msg has " + strSize +
"characters.");

A) I am enjoying this class.
I AM ENJOYING THIS CLASS.
I am enjoying this class.
Character at index x = e
Msg has 24 characters.
B) I am enjoying this class.
I AM ENJOYING THIS CLASS.
I am enjoying this class.
Character at index x = e
Msg has 25 characters.
C) I am enjoying this class.
I AM ENJOYING THIS CLASS.
I am enjoying this class.
Character at index x = n
Msg has 24 characters.
D) I am enjoying this class.
I AM ENJOYING THIS CLASS.
I am enjoying this class.
Character at index x = n
Msg has 25characters.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
8
What will be displayed as a result of executing the following code? int x = 5,y = 20;
X += 32;
Y /= 4;
System.out.println("x = " + x + ",y = " + y);

A) x = 32,y = 4
B) x = 9,y = 52
C) x = 37,y = 5
D) x = 160,y = 80
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
9
Which of the following is valid?

A) float y;
Y = 54.9;
B) float y;
Double z;
Z = 934.21;
Y = z;
C) float w;
W = 1.0f;
D) float v;
V = 1.0;
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
10
In the following Java statement what value is stored in the variable name? String name = "John Doe";

A) John Doe
B) The memory address where "John Doe" is located
C) name
D) The memory address where name is located
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
11
Which of the following is not a valid comment statement?

A) // comment 1
B) /* comment 2 */
C) */ comment 3 /*
D) /** comment 4 */
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
12
If the following Java statements are executed,what will be displayed? System.out.println("The top three winners are \ n");
System.out.print("Jody,the Giant \ n");
System.out.print("Buffy,the Barbarian");
System.out.println("Adelle,the Alligator");

A) The top three winners are
Jody,the Giant
Buffy,the Barbarian
Adelle,the Alligator
B) The top three winners are
Jody,the Giant \ nBuffy,the BarbarianAdelle,the Alligator
C) The top three winners are Jody,the Giant \ nBuffy,the BarbarianAdelle,and the Albino
D) The top three winners are
Jody,the Giant
Buffy,the BarbarianAdelle,the Alligator
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
13
The boolean data type may contain values in the following range of values

A) true or false
B) -128 to + 127
C) - 2,147,483,648 to +2,147,483,647
D) - 32,768 to +32,767
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
14
What will be the value of z as a result of executing the following code? int x = 5,y = 28;
Float z;
Z = (float)(y / x);

A) 5.60
B) 5.6
C) 3.0
D) 5.0
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
15
To compile a program named First,use the following command

A) java First.java
B) javac First
C) javac First.java
D) compile First.javac
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
16
What would be printed out as a result of the following code? System.out.println("The quick brown fox" +
"jumped over the \ n"
"slow moving hen.");

A) The quick brown fox jumped over the \ nslow moving hen.
B) The quick brown fox jumped over the
Slow moving hen.
C) The quick brown fox
Jumped over the
Slow moving hen.
D) Nothing.This is an error.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
17
Which of the following is not a rule that must be followed when naming identifiers?

A) The first character must be one of the letters a-z,A-Z,and underscore or a dollar sign.
B) Identifiers can contain spaces.
C) Uppercase and lowercase characters are distinct.
D) After the first character,you may use the letters a-z,A-Z,the underscore,a dollar sign,or digits 0-9.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
18
What will be the displayed when the following code is executed? final int x = 22,y = 4;
Y += x;
System.out.println("x = " + x +
",y = " + y);

A) x = 22,y = 4
B) x = 22,y = 26
C) x = 22,y = 88
D) Nothing,this is an error
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
19
This is a value that is written into the code of a program.

A) literal
B) assignment statement
C) variable
D) operator
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
20
What will be displayed as a result of executing the following code? public class test
{
Public static void main(String[] args)
{
Int value1 = 9;
System.out.println(value1);
Int value2 = 45;
System.out.println(value2);
System.out.println(value3);
Value = 16;
}
}

A) 9
45
16
B) 94516
C) 9 45 16
D) Nothing,this is an error
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
21
To print "Hello,world" on the monitor,use the following Java statement

A) SystemOutPrintln("Hello,world");
B) System.out.println{"Hello,world"}
C) System.out.println("Hello,world");
D) Print "Hello,world";
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
22
Given the declaration double r;,which of the following statements is invalid?

A) r = 326.75;
B) r = 9.4632e15;
C) r = 9.4632E15;
D) r = 2.9X106;
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
23
What will be displayed after the following statements have been executed? final double x;
X = 54.3;
System.out.println("x = " + x );

A) x = 54.3
B) x
C) x = 108.6
D) Nothing,this is an error.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
24
This is a named storage location in the computer's memory.

A) Literal
B) Constant
C) Variable
D) Operator
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
25
What is the result of the following expression? 17 % 3 * 2 - 12 + 15

A) 7
B) 8
C) 12
D) 105
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
26
Variables are classified according to their

A) value
B) data type
C) names
D) location in the program
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
27
What would be displayed as a result of the following code? int x = 578;
System.out.print("There are " +
X + 5 + " \ n" +
"hens in the hen house.");

A) There are 583 hens in the hen house.
B) There are 5785 hens in the hen house.
C) There are x5 \ nhens in the hen house.
D) There are 5785
Hens in the hen house.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
28
The primitive data types only allow a(n)_____ to hold a single value.

A) variable
B) object
C) class
D) literal
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
29
This is a variable whose content is read only and cannot be changed during the program's execution.

A) operator
B) literal
C) named constant
D) reserved word
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
30
What will be the value of z after the following statements have been executed? int x = 4,y = 33;
Double z;
Z = (double)(y / x);

A) 8.25
B) 4
C) 8
D) 8.0
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
31
Variables of the boolean data type are useful for

A) working with small integers
B) evaluating true/false conditions
C) working with very large integers
D) evaluating scientific notation
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
32
If x has been declared an int,which of the following statements is invalid?

A) x = 0;
B) x = -58932;
C) x = 1,000;
D) x = 592;
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
33
To display the output on the next line,you can use the println method or use this escape sequence in the print method.

A) \ n
B) \ r
C) \ t
D) \ b
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
34
Which of the following does not describe a valid comment in Java?

A) Single line comments,two forward slashes - //
B) Multi-line comments,start with /* and end with */
C) Multi-line comments,start with */ and end with /*
D) Documentation comments,any comments starting with /** and ending with */
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
35
What will be displayed after the following statements have been executed? int x = 15,y = 20,z = 32;
X += 12;
Y /= 6;
Z -= 14;
System.out.println("x = " + x +
",y = " + y +
",z = " +z);

A) x = 27,y = 3.333,z = 18
B) x = 27,y = 2,z = 18
C) x = 27,y = 3,z = 18
D) x = 37,y = 14,z = 4
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
36
What is the result of the following expression? 25 - 7 * 3 + 12 / 3

A) 6
B) 8
C) 10
D) 12
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
37
Every Java application program must have

A) a class named MAIN
B) a method named main
C) comments
D) integer variables
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
38
When saving a Java source file,save it with an extension of

A) .javac
B) .class
C) .src
D) .java
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
39
Which of the following is a valid Java statement?

A) String str = 'John Doe';
B) string str = "John Doe";
C) string str = 'John Doe';
D) String str = "John Doe";
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
40
What will be displayed as a result of executing the following code? int x = 8;
String msg = "I am enjoying java.";
String msg1 = msg.toUpperCase();
String msg2 = msg.toLowerCase();
Char ltr = msg.charAt(x);
Int strSize = msg.length();
System.out.println(msg);
System.out.println(msg1);
System.out.println(msg2);
System.out.println("Character at index x = " +
Ltr);
System.out.println("msg has " + strSize +
" characters.");

A) I am enjoying java.
I AM ENJOYING JAVA.
I am enjoying java.
Character at index x = j
Msg has 20 characters.
B) I am enjoying java.
I AM ENJOYING JAVA.
I am enjoying java.
Character at index x = o
Msg has 20 characters.
C) I am enjoying java.
I AM ENJOYING JAVA.
I am enjoying java.
Character at index x = o
Msg has 19 characters.
D) I am enjoying java.
I AM ENJOYING JAVA.
I am enjoying java.
Character at index x = y
Msg has 19 characters.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
41
A variable's scope is the part of the program that has access to the variable.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
42
Which of the following statements correctly creates a Scanner object for keyboard input?

A) Scanner kbd = new Scanner(System.keyboard);
B) Scanner keyboard(System.in);
C) Scanner keyboard = new Scanner(System.in);
D) Keyboard scanner = new Keyboard(System.in);
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
43
Which Scanner class method reads an int?

A) readInt()
B) nextInt()
C) getInt()
D) read_int()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
44
Programming style includes techniques for consistently putting spaces and indentation in a program so visual cues are created.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
45
If the compiler encounters a statement that uses a variable before the variable is declared,an error will result.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
46
All Java statements end with semicolons.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
47
Assuming that pay has been declared a double,the following statement is valid.
pay = 2,583.44;
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
48
Both character literals and string literals can be assigned to a char variable.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
49
Class names and key words are examples of variables.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
50
Although the dollar sign is a legal identifier character,you should not use it because it is normally used for special purposes.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
51
In Java the variable named one is the same as the variable named One.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
52
Named constants are initialized with a value,that value cannot be changed during the execution of the program.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
53
Which Scanner class method reads a String?

A) readString()
B) nextString()
C) getString()
D) nextLine()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.