Deck 1: Introduction

Full screen (f)
exit full mode
Question
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
Use Space or
up arrow
down arrow
to flip the card.
Question
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
Question
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
Question
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
Question
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
Question
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
Question
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
Question
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
Question
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
Question
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
Question
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
Question
Which character below is not allowed in an identifier?

A) $
B) _
C) 0 (zero)
D) q
E) ^
Question
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
Question
6 bits can be used to represent ________ distinct items or values

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

A) RAM
B) ROM
C) disk
D) software
E) computer networks
Question
A Java program is best classified as

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

A) 1ForAll
B) oneForAll
C) one/4/all
D) 1_4_all
E) 1forall
Question
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
Question
All information is stored in the computer using binary numbers.
Question
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
Question
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
Question
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
Question
The word "Public" is a reserved word.
Question
Java byte codes are directly executable whereas Java source code is not.
Question
Which of the following is a legal Java identifier?

A) i
B) class
C) ilikeclass!
D) idon'tlikeclass
E) i-like-class
Question
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
Question
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
Question
Code placed inside of comments will not be compiled and therefore will not execute.
Question
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
Question
Java is a case-sensitive language meaning that Current, current and CURRENT will all reference the same identifier.
Question
System.out.print is used in a program to denote that a documentation comment follows.
Question
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
Question
Java is similar in syntax to what other high level language?

A) Pascal
B) Ada
C) C++
D) FORTRAN
E) BASIC
Question
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
Question
In a Java program, dividing by 0 is a syntax error.
Question
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?
");
}
}
Question
What is wrong with the following class definition?
public class Program2
public static void main(String[ ] args)
{
System.out.println("My second Java program");
}
Question
Provide a brief explanation of the role of main memory, the control unit, the arithmetic logic unit, and registers. (see figure 1.13)
Question
There are a number of reserved words in Java that have no current meaning (denoted with an * in figure 1.18). Why?
Question
Polymorphism is the idea that we can refer to multiple types of related objects in consistent ways.
Question
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?
Question
In Java, identifiers may be of any length up to a limit determined by the compiler.
Question
During translation, the compiler puts its output (the compiled Java program) into ROM.
Question
What is wrong with the following println statement?
System.out.println("My fourth Java Program);
Question
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
Question
Objects are defined by a class that describes the characteristics common to all instances of the class.
Question
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!"
);
} }
Question
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
Question
Reserved words in Java can be redefined by the programmer to mean something other than their original intentions.
Question
Inheritance is a form of software reuse.
Question
Provide identifier names that would be used to represent a person's social security number, income tax withheld, and net pay.
Question
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");
}
}
Question
What is wrong with the following class definition?
public class Program1
{
public static void main(String[ ] args)
{
System.out.println("My first Java program")
}
}
Question
Examine figure 1.7 before answering this question. What 8-bit value comes immediately before and what 8-bit value comes immediately after 10010111?
Question
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?
Question
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 *\
}
)
Question
Write a Java program that will display the following three lines when it is run:
*
* * *
* * * * *
Question
Name five of the fundamental terms which encompass object-oriented programming.
Question
Write a Java program that will output on two separate lines the names of the authors of this textbook.
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/65
auto play flashcards
Play
simple tutorial
Full screen (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
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
k this deck
12
Which character below is not allowed in an identifier?

A) $
B) _
C) 0 (zero)
D) q
E) ^
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
k this deck
19
Volatility is a property of

A) RAM
B) ROM
C) disk
D) software
E) computer networks
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
k this deck
20
A Java program is best classified as

A) hardware
B) software
C) storage
D) processor
E) input
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
k this deck
21
Java is an object-oriented programming language.
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
k this deck
22
The Java compiler is able to find all programmer errors.
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
k this deck
25
All information is stored in the computer using binary numbers.
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
k this deck
29
The word "Public" is a reserved word.
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
k this deck
30
Java byte codes are directly executable whereas Java source code is not.
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
k this deck
34
Code placed inside of comments will not be compiled and therefore will not execute.
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
k this deck
36
Java is a case-sensitive language meaning that Current, current and CURRENT will all reference the same identifier.
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
k this deck
37
System.out.print is used in a program to denote that a documentation comment follows.
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
k this deck
41
In a Java program, dividing by 0 is a syntax error.
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
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?
");
}
}
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
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");
}
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
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)
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
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?
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
k this deck
46
Polymorphism is the idea that we can refer to multiple types of related objects in consistent ways.
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
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?
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
k this deck
48
In Java, identifiers may be of any length up to a limit determined by the compiler.
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
k this deck
49
During translation, the compiler puts its output (the compiled Java program) into ROM.
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
k this deck
50
What is wrong with the following println statement?
System.out.println("My fourth Java Program);
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
k this deck
52
Objects are defined by a class that describes the characteristics common to all instances of the class.
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
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!"
);
} }
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
k this deck
55
Reserved words in Java can be redefined by the programmer to mean something other than their original intentions.
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
k this deck
56
Inheritance is a form of software reuse.
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
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.
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
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");
}
}
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
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")
}
}
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
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?
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
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?
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
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 *\
}
)
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
k this deck
63
Write a Java program that will display the following three lines when it is run:
*
* * *
* * * * *
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
k this deck
64
Name five of the fundamental terms which encompass object-oriented programming.
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
k this deck
65
Write a Java program that will output on two separate lines the names of the authors of this textbook.
Unlock Deck
Unlock for access to all 65 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 65 flashcards in this deck.