Chapter 1.1 to 1.7 CSCI 369

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Which of the following is not permanent storage devices? A. floppy disk B. hard disk C. flash stick D. CD-ROM E. main memory

main memory

What does JDK stand for? What does JRE stand for?

JDK stands for Java Development Toolkit. JRE stands for Java Runtime Environment.

________ is architecture-neutral. A. Java B. C++ C. C D. Ada E. Pascal

Java

Are tools like NetBeans and Eclipse different languages from Java, or are they dialects or extensions of Java?

NetBeans and Eclipse are not programming languages, nor dialects, nor extensions of Java. They are Java development tools.

runs multiple programs concurrently using multiple processors.

Multiprocessing

runs multiple programs sharing CPU.

Multiprogramming

________ is a technical definition of the language that includes the syntax and semantics of the Java programming language. A. Java language specification B. Java API C. Java JDK D. Java IDE

Java language specification

is English-like, easy to learn and use.

High-Level Language

What does IDE stand for?

IDE stands integrated development environment.

________ is interpreted. A. Java B. C++ C. C D. Ada E. Pascal

Java

________ contains predefined classes and interfaces for developing Java programs. A. Java language specification B. Java API C. Java JDK D. Java IDE

Java API

is a program written in a high-level programming language.

Source Code

Write a statement to display "Good Morning".

System.out.println("Good Morning");

What is the Java language specification?

The Java language specification specifies the syntax for the Java language.

________ is the physical aspect of the computer that can be seen. A. Hardware B. Software C. Operating system D. Application program

Hardware

is the physical aspect of the computer that can be touched.

Hardware

________ provides an integrated development environment (IDE) for rapidly developing Java programs. Editing, compiling, building, debugging, and online help are integrated in one graphical user interface. A. Java language specification B. Java API C. Java JDK D. Java IDE

Java IDE

________ consists of a set of separate programs for developing and testing Java programs, each of which is invoked from a command line. A. Java language specification B. Java API C. Java JDK D. Java IDE

Java JDK

What is a Java applet?

Java applet is a special program that runs from a Web browser. Due to security reasons, applets are no longer allowed to run from Web browsers.

Is Java case sensitive? What is the case for Java keywords?

Java source code is case sensitive. Java keywords are always in lowercase.

Who invented Java? Which company owns Java now?

Java was invented by a team led by James Gosling at Sun Microsystems in 1991. Originally called Oak, it became Java in 1995 when it was redesigned for developing Internet applications. Oracle bought Sun and Oracle now owns Java.

are reserved words, have a specific meaning to the compiler and cannot be used for other purpose.

Keywords

What is a keyword? List some Java keywords.

Keywords have specific meaning to the compiler and cannot be used for other purposes in the program such as variables or method names. Examples of keywords are class, static, and void.

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

Machine Language

What are the major responsibilities of an operating system? Show Answer

Major responsibilities: a. Controlling and monitoring system activities b. Allocating and assigning system resources c. Scheduling operations

The speed of the CPU may be measured in __________. A. megabytes B. gigabytes C. megahertz D. gigahertz

Megahertz and Gigahertz

stores data and program instructions for the CPU to execute. It is volatile, because information is lost when the power is turned off.

Memory

What is memory for? What does RAM stand for? Why is memory called RAM?

Memory is like a work area for programs. Before a program is executed, it is brought into the memory. RAM stands for random-access memory. It is called RAM because a memory cell can be accessed directly.

What is the primary difference between memory and a storage device?

Memory is volatile, because information is lost when the power is turned off. Programs and data are permanently stored on storage devices and are moved, when the computer actually uses them, to memory, which is much faster than storage devices.

What unit is used to measure memory size? What unit is used to measure disk size?

Memory size is measured in bytes. Disk size is measured in bytes.

Show the output of the following code: public class Test { public static void main(String[] args) { System.out.println("3.5 * 4 / 2 - 2.5 is "); System.out.println(3.5 * 4 / 2 - 2.5); } } Show Answer

Output is 3.5 * 4 / 2 - 2.5 is 4.5

is enclosed between /* and */.

Paragraph comment

Due to security reasons, Java ___________ cannot run from a Web browser in the new version of Java. A. applications B. applets C. servlets D. Micro Edition programs

applets

The main method header is written as: A. public static void main(string[] args) B. public static void Main(String[] args) C. public static void main(String[] args) D. public static main(String[] args) E. public void main(String[] args)

public static void main(String[] args)

manages and controls a computer's activities.

Operating System

One byte has ________ bits. A. 4 B. 8 C. 12 D. 16

8

What symbol is used to terminate a statement?

;

__________ is the brain of a computer.

CPU

is a computer's brain. It retrieves instructions from memory and executes them.

CPU

is for documenting a program.

Comment

reads one statement from the source file, translates it to the machine code, and executes it.

Interpreter

is preceded by two slashes.

Line comment

is computer's native language.

Machine Language

stores programs and data permanently.

Storage Device

What is the statement to display a string on the console?

System.out.println(string);

____________ is an operating system. A. Java B. C++ C. Windows D. Visual Basic E. Ada

Windows

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. C. because binary numbers are simplest. D. because binary numbers are the bases upon which all other number systems are built.

because digital devices have two stable states and it is natural to use one state for 0 and the other for 1.

Write a complete main method that prints "Hello, world" to the screen

public static void main(String[] args) { System.out.println("Hello, world"); }

What is a bit? What is a byte?

A bit is a binary digit 0 or 1. A byte is a sequence of 8 bits.

___________ translates high-level language program into machine language program. A. An assembler B. A compiler C. CPU D. The operating system

A compiler

What are hardware and software?

A computer is an electronic device that stores and processes data. A computer includes both hardware and software. In general, hardware is the physical aspect of the computer that can be seen, and software is the invisible instructions that control the hardware and make it work. The hardware of a computer consists of a CPU, cache, memory, hard disk, floppy disk, monitor, printer, and communication devices.

What is an interpreter? What is a compiler?

An interpreter is a software that reads one statement from the source code, translates it to the machine code or virtual machine code, and then executes it right away. A compiler is a software that translates a program in high-level language into machine language code.

What is the difference between an interpreted language and a compiled language?

An interpreter reads one statement from the source code, and translates it to the machine code or virtual machine code, and then executes it right away. A compiler translates the entire source code into a machine code file, and the machine code file is then executed.

What programming language does Android use?

Android uses the Java programming language.

is a program that translates assembly-language code into machine code.

Assembler

uses short descriptive word to represent each of the machine-language instructions.

Assembly Language

What is an assembly language? What is an assembler?

Assembly language is a low-level programming language in which a mnemonic is used to represent each of the machine language instructions. Assembler is a software that translates assembly language into machine language.

What does the acronym CPU stand for? What unit is used to measure CPU speed? Show Answer

CPU stands for Central Processing Unit. It is the brain of the computer. The unit of measurement of clock speed is the hertz (Hz), with 1 hertz equaling 1 pulse per second. The clock speed of a computer is usually stated in megahertz (MHz) (1 MHz is 1 million Hz).

What is a comment? Is the comment ignored by the compiler? How do you denote a comment line and a comment paragraph?

Comments are used to document what a program is for and how a program is constructed. Comments help the programmers or users to communicate and understand the program. Comments are not programming statements and are ignored by the compiler. In Java, comments are preceded by two forward slashes (//) in a line or enclosed between /* and */ in multiple lines. When the compiler sees //, it ignores all text after // in the same line. When it sees /*, it scans for the next */ and ignores any text between /* and */.

translates the entire source code into a machine-code file.

Compiler

refers to the text entry and display device of a computer.

Console

Which of the following statements is correct? A. Every line in a program must end with a semicolon. B. Every statement in a program must end with a semicolon. C. Every comment line must end with a semicolon. D. Every method must end with a semicolon. E. Every class must end with a semicolon.

Every statement in a program must end with a semicolon.

List five major hardware components of a computer.

Five major hardware components: CPU, Memory, Storage Devices, Input/Out Devices, and Communication Devices.

What are multiprogramming, multithreading, and multiprocessing?

Multiprogramming allows multiple programs to run simultaneously by sharing the CPU. Multithreading allows concurrency within a program, so that its subtasks can run at the same time. Multiprocessing, or parallel processing, uses two or more processors together to perform a task.

runs multiple tasks within one program concurrently.

Multithreading

____________ is a device to connect a computer to a local area network (LAN). A. Regular modem B. DSL C. Cable modem D. NIC

NIC

_____________ is a program that runs on a computer to manage and control a computer's activities. A. Operating system B. Java C. Modem D. Interpreter E. Compiler

Operating System

is the semicolon (;). Every statement in Java must end with a semicolon.

Semicolon(;)

are the invisible instructions that control the hardware and make it perform tasks.

Software

____________ are instructions to the computer. A. Hardware B. Software C. Programs D. Keyboards

Software and Programs

Java was developed by ____________. A. Sun Microsystems B. Microsoft C. Apple D. IBM E. Cisco Systems

Sun Micosystems

Write a statement to display "Hello World".

System.out.println("Hello World");

Suppose your name was Alan Turing. Write a statement that would print your last name, followed by a comma, followed by a space and your first name.

System.out.println("Turing, Alan");

Which of the following statements is correct to display Welcome to Java on the console? A. System.out.println('Welcome to Java'); B. System.out.println("Welcome to Java"); C. System.println('Welcome to Java'); D. System.out.println('Welcome to Java"); E. System.out.println("Welcome to Java');

System.out.println("Welcome to Java");

What is a high-level programming language? What is a source program?

The high-level languages are English-like and easy to learn and program. The program written in a programming language is called a source program.

What language does the CPU understand?

The machine language is a set of primitive instructions built into every computer. This is the language understood by a computer and executed by a computer.

What is an operating system? List some popular operating systems. Show Answer

The operating system (OS) is a program that manages and controls a computer's activities. The examples of OS are Windows 98, NT, 2000, XP, or ME. Windows. Application programs such as an Internet browser and a word processor run on top of an operating system.


Kaugnay na mga set ng pag-aaral

Astronomy Ch.1 Charting the Heavens: The Foundations of Astronomy, Astronomy Ch. 2 The Copernican Revolution: The Birth of Modern Science, Astronomy Ch. 6 The Solar System: Comparative Planetology and Formation Models, Astronomy Ch. 7 Earth: Our Home...

View Set

Autonomic Nervous System and Visceral Sensory Neurons

View Set

Accounting Online Ivy Software Chapter 2

View Set

Chapter 17:8 providing first aid for cold exposure

View Set