Intro to Java Programming Chapter 1

Ace your homework & exams now with Quizwiz!

No matter which Java development environment you use, what happens to the Java source code in order for a Java program to execute? A. A Java compiler translates the source code into class files. B. The source code is backed up to a network storage facility. C. The source code is automatically separated into many files. D. A Java compiler converts all uppercase letters to lowercase.

A Java compiler translates the source code into class files.

Which statement best describes a computer program? A. A program can only perform one simple task. B. A program is a sequence of instructions and decisions that the computer carries out. C. A program can decide what task it is to perform. D. A program is a sequence of comments.

A program is a sequence of instructions and decisions that the computer carries out.

What is the Java Virtual Machine? A. A program that translates Java code into machine instructions. B. A library that makes it possible to write portable programs. C. A CPU that runs compiled Java code. D. A program that simulates a real CPU running compiled Java code.

A program that simulates a real CPU running compiled Java code.

What Persian mathematician, writing in Arabic, gave his name to "Algorithm" and promoted algebra and the use of Hindu-Arabic numerals? A. Gore Vidal B. Al-Gerbil C. Al Gore D. Al-Khwarizmi

Al-Khwarizmi

What does CPU stand for? A. Computer Programming Unit B. Central Programming Unit C. Central Processing Unit D. Computer Processing Unit

Central Processing Unit

Who was one of the inventors of the Java Language? A. Ryan Gosling B. Niklaus Wirth C. James Gosling D. Nicolas Cage

James Gosling

Suppose that a computer virus infects your computer and corrupts the files you were going to submit for your current homework assignment. What precaution could have saved you from a disastrously bad grade for this assignment? A. Purchase an anti-virus program to remove the virus from your computer. B. Make regular backups of all your important files. C. Purchase an extended warranty for your computer. D. Defragment the hard drive.

Make regular backups of all your important files.

Which statement best describes the portability characteristic of Java? A. There are only small differences between the Java programming language on different operating systems. B. The same already-compiled Java programs will run on Windows, UNIX, Linux, or Macintosh operating systems without any change. C. The same Java compiler can be used on many operating systems. D. It is easy to change a Java program so that it will work on different operating systems.

The same already-compiled Java programs will run on Windows, UNIX, Linux, or Macintosh operating systems without any change.

Assume that the main method of the class named Welcome does not contain any compile-time errors. What is the name of the file generated by the Java compiler? A. Welcome.java B. No additional file is generated. C. Welcome D. Welcome.class

Welcome.class

Every Java program consists of one or more of these fundamental building blocks. A. CPU B. applet C. parameter D. class

class

A sequence of steps that can be carried out in practice is ______________. A. executable B. terminating C. unambiguous D. documented

executable

What is the correct order of the steps in the program development process: i. Develop and describe the algorithm. ii. Translate the algorithm into Java. iii. Understand the problem. iv. Compile and test the program. v. Test the algorithm with different inputs. A. iii, i, v, ii, iv B. i, ii, iv, v, iii C. i, iii, v, ii, iv D. iii, i, ii, iv, v

iii, i, v, ii, iv

Where must program instructions and data reside in order for the CPU to directly read and execute them? A. memory B. hard disk C. bus D. somewhere on the computer network

memory

Which type of storage is made from electronic circuits that can store data? A. primary storage B. compact disk (CD) C. secondary storage D. hard disk

primary storage

What is the term used to describe an error causing a program to take an action that the programmer did not intend? A. compile-time error B. syntax error C. typo D. run-time error

run-time error

Which one of the following memory types provides storage that persists without electricity? A. secondary storage B. RAM C. memory D. primary storage

secondary storage


Related study sets

Ch. 11 ~ Marital Residence & Kinship

View Set

Week 16: Understanding Muscle Growth

View Set

Physiology Lab #2 Skeletal Muscle Physiology Review

View Set

First 20 Elements of the Periodic Table

View Set