Deck 1: Introduction

ملء الشاشة (f)
exit full mode
سؤال
Which character below is not allowed in an identifier?

A) $
B) _
C) 0 (zero)
D) q
E) ^
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
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
سؤال
A Java program is best classified as

A) hardware
B) software
C) storage
D) processor
E) input
سؤال
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
سؤال
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
سؤال
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
سؤال
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
سؤال
6 bits can be used to represent ________ distinct items or values

A) 6
B) 20
C) 24
D) 32
E) 64
سؤال
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
سؤال
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
سؤال
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 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
سؤال
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
سؤال
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
سؤال
Volatility is a property of

A) RAM
B) ROM
C) disk
D) software
E) computer networks
سؤال
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
سؤال
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
سؤال
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
سؤال
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
سؤال
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
سؤال
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
سؤال
The word "Public" is a reserved word.
سؤال
Java is similar in syntax to what other high level language?

A) Pascal
B) Ada
C) C++
D) FORTRAN
E) BASIC
سؤال
System.out.print is used in a program to denote that a documentation comment follows.
سؤال
Code placed inside of comments will not be compiled and therefore will not execute.
سؤال
All information is stored in the computer using binary numbers.
سؤال
Which of the following is a legal Java identifier?

A) i
B) class
C) ilikeclass!
D) idon'tlikeclass
E) i-like-class
سؤال
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
سؤال
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
سؤال
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
سؤال
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
سؤال
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
سؤال
Java is an object-oriented programming language.
سؤال
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 is a legal Java identifier?

A) 1ForAll
B) oneForAll
C) one/4/all
D) 1_4_all
E) 1forall
سؤال
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
سؤال
Java byte codes are directly executable whereas Java source code is not.
سؤال
Java is a case-sensitive language meaning that Current, current and CURRENT will all reference the same identifier.
سؤال
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
سؤال
The Java compiler is able to find all programmer errors.
سؤال
What is wrong with the following class definition?
public class Program1
{
public static void main(String[ ] args)
{
System.out.println("My first 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)
سؤال
Objects are defined by a class that describes the characteristics common to all instances of the class.
سؤال
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
سؤال
Inheritance is a form of software reuse.
سؤال
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");
}
}
سؤال
In Java, identifiers may be of any length up to a limit determined by the compiler.
سؤال
Polymorphism is the idea that we can refer to multiple types of related objects in consistent ways.
سؤال
Examine figure 1.7 before answering this question. What 8-bit value comes immediately before and what 8-bit value comes immediately after 10010111?
سؤال
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
سؤال
During translation, the compiler puts its output (the compiled Java program) into ROM.
سؤال
Provide identifier names that would be used to represent a person's social security number, income tax withheld, and net pay.
سؤال
What is wrong with the following println statement?
System.out.println("My fourth Java Program);
سؤال
There are a number of reserved words in Java that have no current meaning (denoted with an * in figure 1.18). Why?
سؤال
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?
");
}
}
سؤال
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!"
);
} }
سؤال
Reserved words in Java can be redefined by the programmer to mean something other than their original intentions.
سؤال
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?
سؤال
What is wrong with the following class definition?
public class Program2
public static void main(String[ ] args)
{
System.out.println("My second Java program");
}
سؤال
Name five of the fundamental terms which encompass object-oriented programming.
سؤال
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:
*
* * *
* * * * *
سؤال
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?
سؤال
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
Which character below is not allowed in an identifier?

A) $
B) _
C) 0 (zero)
D) q
E) ^
E
Explanation: E) Java identifiers can consist of any letter, digit, $ or _ as long as the identifier starts with a letter or _. ^ is not a legal character.
2
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
A
Explanation: A) The characters "//" denote the beginning of a comment. The comment is not compiled and so, nothing would happen when this code is executed.
3
A Java program is best classified as

A) hardware
B) software
C) storage
D) processor
E) input
B
Explanation: B) Programs are classified as software to differentiate them from the mechanisms of the computer (hardware). Storage and the processor are two forms of hardware while input is the information that the program processes.
4
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
5
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
6
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
7
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
8
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
9
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
10
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
11
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
12
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
13
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
14
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
15
Volatility is a property of

A) RAM
B) ROM
C) disk
D) software
E) computer networks
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
16
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
17
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
18
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
19
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
20
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
21
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
22
The word "Public" is a reserved word.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
23
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
24
System.out.print is used in a program to denote that a documentation comment follows.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
25
Code placed inside of comments will not be compiled and therefore will not execute.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
26
All information is stored in the computer using binary numbers.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
27
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
28
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
29
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
30
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
31
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
32
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
33
Java is an object-oriented programming language.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
34
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
35
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
36
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
37
Java byte codes are directly executable whereas Java source code is not.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
38
Java is a case-sensitive language meaning that Current, current and CURRENT will all reference the same identifier.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
39
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
40
The Java compiler is able to find all programmer errors.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
41
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
42
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
43
Objects are defined by a class that describes the characteristics common to all instances of the class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
44
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
45
Inheritance is a form of software reuse.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
46
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
47
In Java, identifiers may be of any length up to a limit determined by the compiler.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
48
Polymorphism is the idea that we can refer to multiple types of related objects in consistent ways.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
49
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
50
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
51
During translation, the compiler puts its output (the compiled Java program) into ROM.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
52
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
53
What is wrong with the following println statement?
System.out.println("My fourth Java Program);
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
54
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
55
In a Java program, dividing by 0 is a syntax error.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
56
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
57
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
58
Reserved words in Java can be redefined by the programmer to mean something other than their original intentions.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 65 في هذه المجموعة.
فتح الحزمة
k this deck
59
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
60
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
61
Name five of the fundamental terms which encompass object-oriented programming.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 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
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
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 في هذه المجموعة.