Deck 1: Introduction

ملء الشاشة (f)
exit full mode
سؤال
Comments should

A) rephrase the code it explains in English
B) be insightful and explain what the instruction's intention is
C) only be included in code that is difficult to understand
D) be used to define variables whose names are not easy to understand
E) all of the above
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
For a computer to communicate over the Internet, it must use

A) the TCP protocol
B) the IP protocol
C) the combined TCP/IP protocol
D) the Ethernet protocol
E) the ARPANET protocol
سؤال
The ability to directly obtain a stored item by referencing its address is known as

A) random access
B) sequential access
C) read-only access
D) fetch access
E) volatility
سؤال
Binary numbers are composed entirely of

A) 0s
B) 1s
C) 0s and 1s
D) 0s, 1s and 2s
E) any digits between 0 and 9
سؤال
It is important to dissect a problem into manageable pieces before trying to solve the problem because

A) most problems are too complex to be solved as a single, large activity
B) most problems are solved by multiple people and it is easy to assign each piece to a separate person
C) it is easier to integrate small pieces of a program into one program than it is to integrate one big chunk of code into one program
D) our first solution may not solve the problem correctly
E) all of the above
سؤال
A URL (Universal Resource Locator) specifies the address of

A) a computer on any network
B) a computer on the Internet
C) a local area network (LAN) on the Internet
D) a document or other type of file on the Internet
E) a Java program on the Internet
سؤال
Which phase of the fetch-decode-execute cycle might use a circuit in the arithmetic-logic unit?

A) fetch
B) decode
C) execute
D) during fetch or execute, but not decode
E) could be used in fetch, decode or execute phase
سؤال
Which memory capacity is the largest?

A) 1,500,000,000,000 bytes
B) 100 gigabytes
C) 3,500,000 kilobytes
D) 10 terabyte
E) 12,000,000 megabytes
سؤال
The main method for a Java program is defined by

A) public static main( )
B) public static main(String[ ] args);
C) public static main(String[ ] args)
D) private static main(String[ ] args)
E) the main method could be defined as in A, C or D but not B
سؤال
The instruction: System.out.println("Hello World"); might best be commented as

A) // prints "Hello World" to the screen
B) // prints a message
C) // used to demonstrate an output message
D) //
E) // meaningless instruction
سؤال
Java is an example of a(n)

A) machine language
B) assembly language
C) high-level language
D) fourth generation language
E) both C and D
سؤال
Which character below is not allowed in an identifier?

A) $
B) _
C) 0 (zero)
D) q
E) ^
سؤال
In order for a computer to be accessible over a computer network, the computer needs its own

A) MODEM
B) communication line
C) network address
D) packet
E) router
سؤال
6 bits can be used to represent ________ distinct items or values

A) 6
B) 20
C) 24
D) 32
E) 64
سؤال
Once we have implemented the solution, we are not done with the problem because

A) the solution may not be the best (most efficient)
B) the solution may have errors and need testing and fixing before we are done
C) the solution may, at a later date, need revising to handle new specifications
D) the solution may, at a later date, need revising because of new programming language features
E) all of the above
سؤال
The line of Java code "// System.out.println("Hello");" will

A) do nothing
B) cause "Hello" to be output
C) cause a syntax error
D) cause "(Hello)" to be output
E) there is no way to know without executing this line of code
سؤال
When executing a program, the processor reads each program instruction from

A) secondary memory (storage)
B) the Internet
C) registers stored in the processor
D) main memory
E) could be any of these
سؤال
In the following list, which statement is not True regarding Java as a programming language?

A) It is a relatively recent language, having been introduced in 1995
B) It is a language whose programs do not require translating into machine language before they are executed
C) It is an object-oriented programming language
D) It is a language that embraces the idea of writing programs to be executed using the World Wide Web
E) All of the above are True
سؤال
Volatility is a property of

A) RAM
B) ROM
C) disk
D) software
E) computer networks
سؤال
A Java program is best classified as

A) hardware
B) software
C) storage
D) processor
E) input
سؤال
Java is an object-oriented programming language.
سؤال
The Java compiler is able to find all programmer errors.
سؤال
Which of the following is a legal Java identifier?

A) 1ForAll
B) oneForAll
C) one/4/all
D) 1_4_all
E) 1forall
سؤال
A color image is broken down into individual pixels (points), each of which is represented by

A) a 1 for white and a 0 for black
B) 3 values denoting the intensity of red, green, and blue in the image
C) a single number indicating the intensity of color between white and black
D) two numbers, a value that denotes where between white and black the color is, and a brightness
E) none of the above, it is not possible to represent a color image
سؤال
All information is stored in the computer using binary numbers.
سؤال
A unique aspect of Java that allows code compiled on one machine to be executed on a machine of a different hardware platform is Java's

A) bytecodes
B) syntax
C) use of objects
D) use of exception handling
E) all of the above
سؤال
Following Java naming convention, which of the following would be the best name for a class about store customers?

A) StoreCustomer
B) Store Customer
C) storeCustomer
D) STORE_CUSTOMER
E) Store-Customer
سؤال
Which of the following characters does not need to have an associated "closing" character in a Java program?

A) {
B) (
C) [
D) <
E) all of these require closing characters
سؤال
The word "Public" is a reserved word.
سؤال
Java byte codes are directly executable whereas Java source code is not.
سؤال
Which of the following is a legal Java identifier?

A) i
B) class
C) ilikeclass!
D) idon'tlikeclass
E) i-like-class
سؤال
Which of the following would be a good variable name for the current value of a stock?

A) curstoval
B) theCurrentValueOfThisStockIs
C) currentStockVal
D) csv
E) current
سؤال
Which of the following is True regarding Java syntax and semantics?

A) a Java compiler can determine if you have followed proper syntax but not proper semantics
B) a Java compiler can determine if you have followed proper semantics but not proper syntax
C) a Java compiler can determine if you have followed both proper syntax and semantics
D) a Java compiler cannot determine if you have followed either proper syntax or semantics
E) a Java compiler can determine if you have followed proper syntax and can determine if you have followed proper semantics if you follow the Java naming convention rules
سؤال
Code placed inside of comments will not be compiled and therefore will not execute.
سؤال
Mistyping "println" as "printn" will result in

A) a syntax error
B) a run-time error
C) a logical error
D) no error at all
E) converting the statement into a comment
سؤال
Java is a case-sensitive language meaning that Current, current and CURRENT will all reference the same identifier.
سؤال
System.out.print is used in a program to denote that a documentation comment follows.
سؤال
An error in a program that results in the program outputting $100 instead of the correct answer, $250 is

A) a programmer error
B) a syntax error
C) a run-time error
D) a logical error
E) a snafu
سؤال
Java is similar in syntax to what other high level language?

A) Pascal
B) Ada
C) C++
D) FORTRAN
E) BASIC
سؤال
Which of the following is not syntactically legal in Java?

A) public class Foo
B) System.out.println("Hi");
C) { }
D) s t a t i c main(String[ ] args)
E) only B is legally valid, all of the rest are illegal
سؤال
In a Java program, dividing by 0 is a syntax error.
سؤال
What is the output of the following when the main method is executed?
public class Question4
{
public static void main(String[ ] args)
{
System.out.println("hi there");
System.out.println(" ");
System.out.println("how are you doing today?
");
}
}
سؤال
What is wrong with the following class definition?
public class Program2
public static void main(String[ ] args)
{
System.out.println("My second Java program");
}
سؤال
Provide a brief explanation of the role of main memory, the control unit, the arithmetic logic unit, and registers. (see figure 1.13)
سؤال
There are a number of reserved words in Java that have no current meaning (denoted with an * in figure 1.18). Why?
سؤال
Polymorphism is the idea that we can refer to multiple types of related objects in consistent ways.
سؤال
A document of text is 15 pages long. Each page contains approximately 200 words and the average length of each word is 5 characters. Also assume one blank space between each word and no punctuation. How many bytes will it take to store this document in memory or on disk using ASCII?
سؤال
In Java, identifiers may be of any length up to a limit determined by the compiler.
سؤال
During translation, the compiler puts its output (the compiled Java program) into ROM.
سؤال
What is wrong with the following println statement?
System.out.println("My fourth Java Program);
سؤال
Provide a brief description of the roles of the following hardware elements (that is, what each is used for):
a) CPU
b) Main memory
c) Secondary memory devices
d) Input/Output devices
سؤال
Objects are defined by a class that describes the characteristics common to all instances of the class.
سؤال
Rewrite the following program with better formatting to make it easier to read.
public
class
MyProgram
{ public static void
main(
String[ ]
args)
{ System.out.println(
"Wow, this is messed up!"
);
} }
سؤال
Rewrite the following comment so that it can appear over multiple lines.
// This is one really enormously long comment that might run off the page
سؤال
Reserved words in Java can be redefined by the programmer to mean something other than their original intentions.
سؤال
Inheritance is a form of software reuse.
سؤال
Provide identifier names that would be used to represent a person's social security number, income tax withheld, and net pay.
سؤال
Given the following class definition, what are the reserved words and what are the identifiers?
public class Program3
{
public static void main(String[ ] args)
{
System.out.println("My third Java program");
}
}
سؤال
What is wrong with the following class definition?
public class Program1
{
public static void main(String[ ] args)
{
System.out.println("My first Java program")
}
}
سؤال
Examine figure 1.7 before answering this question. What 8-bit value comes immediately before and what 8-bit value comes immediately after 10010111?
سؤال
Considering that the Pentium IV processor runs at a clock speed of about 850 MHz. What clock speed might we expect from a Pentium chip that would be released in 3 years?
سؤال
Correct all the syntax errors in the following program.
Public Class Program \\ A problem program
(
Public static voided main[Strings( ) args]
{
system.out.println('This program'); \* oh, my... *\
system.out.println('has several syntax errors'); \* lots of errors *\
}
)
سؤال
Write a Java program that will display the following three lines when it is run:
*
* * *
* * * * *
سؤال
Name five of the fundamental terms which encompass object-oriented programming.
سؤال
Write a Java program that will output on two separate lines the names of the authors of this textbook.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/65
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 1: Introduction
1
Comments should

A) rephrase the code it explains in English
B) be insightful and explain what the instruction's intention is
C) only be included in code that is difficult to understand
D) be used to define variables whose names are not easy to understand
E) all of the above
B
Explanation: B) One might answer E, but that then includes A and C, making "all of the above" incorrect. Comments should not rephrase in English what an instruction says, but instead should explain what that instruction is doing in relation to the program. Introductory programmers often have difficult explaining their code and wind up stating the obvious in their comments. While answer D is partially correct, it is not entirely True all variables should have comments that explain their use.
2
For a computer to communicate over the Internet, it must use

A) the TCP protocol
B) the IP protocol
C) the combined TCP/IP protocol
D) the Ethernet protocol
E) the ARPANET protocol
C
Explanation: C) IP is the Internet Protocol, but the TCP (Transmission Control Protocol) also must be used because it handles such problems as how to piece together packets of the same message that arrive out of order. Ethernet is a LAN protocol, which might be used in addition to TCP/IP in some networks, but it is not needed to communicate over the Internet. There is no such thing as the ARPANET protocol.
3
The ability to directly obtain a stored item by referencing its address is known as

A) random access
B) sequential access
C) read-only access
D) fetch access
E) volatility
A
Explanation: A) Random access is meant to convey the idea that accessing any item is equally easy, and that any item is retrievable based solely on its address. Random access is the form of access used by both RAM and ROM memory. Disk access, called direct access, is a similar idea, and direct and random access are sometimes referred to synonymously. Sequential access is used by tape.
4
Binary numbers are composed entirely of

A) 0s
B) 1s
C) 0s and 1s
D) 0s, 1s and 2s
E) any digits between 0 and 9
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
5
It is important to dissect a problem into manageable pieces before trying to solve the problem because

A) most problems are too complex to be solved as a single, large activity
B) most problems are solved by multiple people and it is easy to assign each piece to a separate person
C) it is easier to integrate small pieces of a program into one program than it is to integrate one big chunk of code into one program
D) our first solution may not solve the problem correctly
E) all of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
6
A URL (Universal Resource Locator) specifies the address of

A) a computer on any network
B) a computer on the Internet
C) a local area network (LAN) on the Internet
D) a document or other type of file on the Internet
E) a Java program on the Internet
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
7
Which phase of the fetch-decode-execute cycle might use a circuit in the arithmetic-logic unit?

A) fetch
B) decode
C) execute
D) during fetch or execute, but not decode
E) could be used in fetch, decode or execute phase
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
8
Which memory capacity is the largest?

A) 1,500,000,000,000 bytes
B) 100 gigabytes
C) 3,500,000 kilobytes
D) 10 terabyte
E) 12,000,000 megabytes
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
9
The main method for a Java program is defined by

A) public static main( )
B) public static main(String[ ] args);
C) public static main(String[ ] args)
D) private static main(String[ ] args)
E) the main method could be defined as in A, C or D but not B
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
10
The instruction: System.out.println("Hello World"); might best be commented as

A) // prints "Hello World" to the screen
B) // prints a message
C) // used to demonstrate an output message
D) //
E) // meaningless instruction
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
11
Java is an example of a(n)

A) machine language
B) assembly language
C) high-level language
D) fourth generation language
E) both C and D
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
12
Which character below is not allowed in an identifier?

A) $
B) _
C) 0 (zero)
D) q
E) ^
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
13
In order for a computer to be accessible over a computer network, the computer needs its own

A) MODEM
B) communication line
C) network address
D) packet
E) router
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
14
6 bits can be used to represent ________ distinct items or values

A) 6
B) 20
C) 24
D) 32
E) 64
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
15
Once we have implemented the solution, we are not done with the problem because

A) the solution may not be the best (most efficient)
B) the solution may have errors and need testing and fixing before we are done
C) the solution may, at a later date, need revising to handle new specifications
D) the solution may, at a later date, need revising because of new programming language features
E) all of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
16
The line of Java code "// System.out.println("Hello");" will

A) do nothing
B) cause "Hello" to be output
C) cause a syntax error
D) cause "(Hello)" to be output
E) there is no way to know without executing this line of code
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
17
When executing a program, the processor reads each program instruction from

A) secondary memory (storage)
B) the Internet
C) registers stored in the processor
D) main memory
E) could be any of these
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
18
In the following list, which statement is not True regarding Java as a programming language?

A) It is a relatively recent language, having been introduced in 1995
B) It is a language whose programs do not require translating into machine language before they are executed
C) It is an object-oriented programming language
D) It is a language that embraces the idea of writing programs to be executed using the World Wide Web
E) All of the above are True
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
19
Volatility is a property of

A) RAM
B) ROM
C) disk
D) software
E) computer networks
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
20
A Java program is best classified as

A) hardware
B) software
C) storage
D) processor
E) input
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
21
Java is an object-oriented programming language.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
22
The Java compiler is able to find all programmer errors.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
23
Which of the following is a legal Java identifier?

A) 1ForAll
B) oneForAll
C) one/4/all
D) 1_4_all
E) 1forall
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
24
A color image is broken down into individual pixels (points), each of which is represented by

A) a 1 for white and a 0 for black
B) 3 values denoting the intensity of red, green, and blue in the image
C) a single number indicating the intensity of color between white and black
D) two numbers, a value that denotes where between white and black the color is, and a brightness
E) none of the above, it is not possible to represent a color image
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
25
All information is stored in the computer using binary numbers.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
26
A unique aspect of Java that allows code compiled on one machine to be executed on a machine of a different hardware platform is Java's

A) bytecodes
B) syntax
C) use of objects
D) use of exception handling
E) all of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
27
Following Java naming convention, which of the following would be the best name for a class about store customers?

A) StoreCustomer
B) Store Customer
C) storeCustomer
D) STORE_CUSTOMER
E) Store-Customer
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
28
Which of the following characters does not need to have an associated "closing" character in a Java program?

A) {
B) (
C) [
D) <
E) all of these require closing characters
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
29
The word "Public" is a reserved word.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
30
Java byte codes are directly executable whereas Java source code is not.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
31
Which of the following is a legal Java identifier?

A) i
B) class
C) ilikeclass!
D) idon'tlikeclass
E) i-like-class
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
32
Which of the following would be a good variable name for the current value of a stock?

A) curstoval
B) theCurrentValueOfThisStockIs
C) currentStockVal
D) csv
E) current
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
33
Which of the following is True regarding Java syntax and semantics?

A) a Java compiler can determine if you have followed proper syntax but not proper semantics
B) a Java compiler can determine if you have followed proper semantics but not proper syntax
C) a Java compiler can determine if you have followed both proper syntax and semantics
D) a Java compiler cannot determine if you have followed either proper syntax or semantics
E) a Java compiler can determine if you have followed proper syntax and can determine if you have followed proper semantics if you follow the Java naming convention rules
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
34
Code placed inside of comments will not be compiled and therefore will not execute.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
35
Mistyping "println" as "printn" will result in

A) a syntax error
B) a run-time error
C) a logical error
D) no error at all
E) converting the statement into a comment
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
36
Java is a case-sensitive language meaning that Current, current and CURRENT will all reference the same identifier.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
37
System.out.print is used in a program to denote that a documentation comment follows.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
38
An error in a program that results in the program outputting $100 instead of the correct answer, $250 is

A) a programmer error
B) a syntax error
C) a run-time error
D) a logical error
E) a snafu
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
39
Java is similar in syntax to what other high level language?

A) Pascal
B) Ada
C) C++
D) FORTRAN
E) BASIC
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
40
Which of the following is not syntactically legal in Java?

A) public class Foo
B) System.out.println("Hi");
C) { }
D) s t a t i c main(String[ ] args)
E) only B is legally valid, all of the rest are illegal
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
41
In a Java program, dividing by 0 is a syntax error.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
42
What is the output of the following when the main method is executed?
public class Question4
{
public static void main(String[ ] args)
{
System.out.println("hi there");
System.out.println(" ");
System.out.println("how are you doing today?
");
}
}
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
43
What is wrong with the following class definition?
public class Program2
public static void main(String[ ] args)
{
System.out.println("My second Java program");
}
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
44
Provide a brief explanation of the role of main memory, the control unit, the arithmetic logic unit, and registers. (see figure 1.13)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
45
There are a number of reserved words in Java that have no current meaning (denoted with an * in figure 1.18). Why?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
46
Polymorphism is the idea that we can refer to multiple types of related objects in consistent ways.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
47
A document of text is 15 pages long. Each page contains approximately 200 words and the average length of each word is 5 characters. Also assume one blank space between each word and no punctuation. How many bytes will it take to store this document in memory or on disk using ASCII?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
48
In Java, identifiers may be of any length up to a limit determined by the compiler.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
49
During translation, the compiler puts its output (the compiled Java program) into ROM.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
50
What is wrong with the following println statement?
System.out.println("My fourth Java Program);
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
51
Provide a brief description of the roles of the following hardware elements (that is, what each is used for):
a) CPU
b) Main memory
c) Secondary memory devices
d) Input/Output devices
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
52
Objects are defined by a class that describes the characteristics common to all instances of the class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
53
Rewrite the following program with better formatting to make it easier to read.
public
class
MyProgram
{ public static void
main(
String[ ]
args)
{ System.out.println(
"Wow, this is messed up!"
);
} }
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
54
Rewrite the following comment so that it can appear over multiple lines.
// This is one really enormously long comment that might run off the page
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
55
Reserved words in Java can be redefined by the programmer to mean something other than their original intentions.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
56
Inheritance is a form of software reuse.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
57
Provide identifier names that would be used to represent a person's social security number, income tax withheld, and net pay.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
58
Given the following class definition, what are the reserved words and what are the identifiers?
public class Program3
{
public static void main(String[ ] args)
{
System.out.println("My third Java program");
}
}
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
59
What is wrong with the following class definition?
public class Program1
{
public static void main(String[ ] args)
{
System.out.println("My first Java program")
}
}
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
60
Examine figure 1.7 before answering this question. What 8-bit value comes immediately before and what 8-bit value comes immediately after 10010111?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
61
Considering that the Pentium IV processor runs at a clock speed of about 850 MHz. What clock speed might we expect from a Pentium chip that would be released in 3 years?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
62
Correct all the syntax errors in the following program.
Public Class Program \\ A problem program
(
Public static voided main[Strings( ) args]
{
system.out.println('This program'); \* oh, my... *\
system.out.println('has several syntax errors'); \* lots of errors *\
}
)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
63
Write a Java program that will display the following three lines when it is run:
*
* * *
* * * * *
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
64
Name five of the fundamental terms which encompass object-oriented programming.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
65
Write a Java program that will output on two separate lines the names of the authors of this textbook.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.