Docsity

Introduction to Java Programming and Data Structures, 12th Edition (Y. Daniel Liang) – COM, Exams of Nursing

Partial preview of the text

Download Introduction to Java Programming and Data Structures, 12th Edition (Y. Daniel Liang) – COM and more Exams Nursing in PDF only on Docsity!

Introduction to Java Programming and Data Structures, 12th Edition (Y. Daniel Liang) – COMPLETE QUESTION BANK Questions with Verified Answers & Detailed Rationales | 2026 Complete Chapters 1–44 | Undergraduate Java Exam Prep TABLE OF CONTENTS | Part | Chapters | Questions | ||-|--| | Part I: Fundamentals | 1–8 | 1–80 |

| Part II: Object-Oriented Programming | 9– 13 | 81–130 | | Part III: GUI Programming | 14–16 | 131– 150 | | Part IV: Data Structures & Algorithms | 17– 29 | 151–220 | | Part V: Advanced Java | 30–44 | 221–270 | PART I: FUNDAMENTALS (Q1–80) Chapter 1: Introduction to Computers, Programs, and Java

  1. ________ is the physical aspect of the computer that can be seen.

C) Disk D) Motherboard Answer: B) CPU Rationale: The CPU (Central Processing Unit) is the brain of a computer, responsible for executing instructions.

  1. The speed of the CPU may be measured in __________. (Select all that apply) A) megabytes B) gigabytes

C) megahertz D) gigahertz Answer: C, D) megahertz, gigahertz Rationale: CPU speed is measured in megahertz (MHz) or gigahertz (GHz).

  1. Why do computers use zeros and ones? A) because combinations of zeros and ones can represent any numbers and characters. B) because digital devices have two stable states and it is natural to use one state for 0 and the other for 1.

B) 8

C) 12

D) 16

Answer: B) 8 Rationale: One byte consists of 8 bits.

  1. One gigabyte is approximately ________ bytes. A) 1 million B) 10 million C) 1 billion

D) 1 trillion Answer: C) 1 billion Rationale: One gigabyte is approximately 1 billion bytes.

  1. A program and its data must be moved into the computer's _______ before they can be executed by the CPU. A) memory B) hard disk C) CPU

D) CD-ROM

Answer: A) memory Rationale: RAM (memory) is volatile; hard disks and flash drives are non-volatile.

  1. Which of the following are storage devices? (Select all that apply) A) portable disk B) hard disk C) flash stick D) CPU

Answer: A, B, C Rationale: Portable disk, hard disk, and flash stick are storage devices. CPU is a processor.

  1. The ____________ specifies the number of pixels in horizontal and vertical dimensions of the display device. A) screen resolution B) pixel C) dot pitch D) refresh rate

Answer: D) NIC Rationale: A NIC (Network Interface Card) connects a computer to a LAN.

  1. ____________ are instructions to the computer. A) Hardware B) Software C) Programs D) Keyboards Answer: C) Programs

Rationale: Programs are instructions to the computer.

  1. Computer can execute the code in ____________. A) machine language B) assembly language C) high-level language D) none of the above Answer: A) machine language

Rationale: A compiler translates high-level language into machine language.

  1. ____________ is an operating system. A) Java B) C++ C) Windows D) Visual Basic Answer: C) Windows Rationale: Windows is an operating system.
  1. _____________ is a program that runs on a computer to manage and control a computer's activities. A) Java B) Operating system C) Modem D) Compiler Answer: B) Operating system Rationale: The operating system manages and controls computer activities.
  1. ________ is not an object-oriented programming language. A) Java B) C++ C) C D) C Answer: C) C Rationale: C is a procedural programming language, not object-oriented.
  1. ________ is interpreted. A) Java B) C++ C) Ada D) Pascal Answer: A) Java Rationale: Java is interpreted by the JVM (Java Virtual Machine).
  2. ________ is architecture-neutral.