Java Chapter One

¡Supera tus tareas y exámenes ahora con Quizwiz!

8.

One byte has _______ bites

.java

The extension name of a Java source code file is...

Java.

The following is an Architecture-Neutral: Java, C++, C, Ada, or Pascal?

Java.

The following is interpreted: Java, C++, C, Ada, or Pascal?

public static void main (String[ ] args)

The main method header is written as...

Java bytecode

A Java compiler translates Java source cod into __________.

False.

A Java interpreter is a program that translates Java source code into Java bytecode.

Braces.

A block is enclosed inside __________.

Machine language.

A computer can execute code in...

NIC.

A device to connect to a local area network (LAN)...

A semicolon.

Every statement in Java ends with...

32.

Four bytes have ______ bits.

A logic error

If the program compiles fine, but it produces incorrect results, then the program suffers...

A compilation error.

If you forget to put a closing quotation mark on a string, what kind of error will be raised?

Software and programs.

Instructions to a computer...

Applets.

Java __________ can run from a web browser.

Good programming style makes a program more readable and helps reduce programming error

Programming style is important, because ____________.

All except RAM.

Secondary storage from the list: floppy disks, hard disks, CD, RAM.

Any name with extension .java

Suppose to define a Java class as follows: public class Test { } in order to compile this program, the source code should be stored in a file named...

CPU

The "brain" of the computer...

javac Test.java

The JDK command to compile a class in the file Test.java is...

Class loader.

The ___________loads Java bytecode to the memory.

javac Test.java

The command to compile a class in the file Test.java is...

False. If the program has syntax errors, no bytecode is generated.

The compiler generates bytecode even if the program has syntax errors.

.class

The extension name of a Java bytecode file is...

Hardware

The physical aspect of a computer that can be seen...

Gigahertz or megahertz (Megahertz equals 1 million pulses per sec. and 1 gigahertz is 1,000 megahertz.)

The speed of a computer is measured in...

True.

True or False? A Java application must have a main method.

True.

True or False? A Java program black starts with an open brace ({) and ends with a closing brace (})

True

True or False? Java is an object-oriented programming language.

False.

True or False? Java source code can be executed on a Java virtual machine.

True

True or False? Java was originally developed by a team led by James Gosling at Sun Microsystem.

True.

True or False? The keywords in Java are all in lowercase.

True

True or False? The public class name must be the same as the filename that contains the class.

java ByteCode

Which JDK command is correct to run a Java application in ByteCode.class

Java, C++, C#, and Python.

Which is an object-oriented programming language: Java, C++, C, C#, Python?

All of the above.

Which of the following are storage devices: floppy disk, hard disk, flash drive, or CD-ROM.

All of the above

Which of the following are the reserved words: public, static, void, class?

WIndows XP.

Which of the following is an OS: Java. C++, Windows XP, Visual Basics. and/or ADA?

--comments and **comments**

Which of the following lines is not a Java comment: a. /** comments */ b. //comments c. --comments d. /* comments */ e. ** comments **

b. Every statement in a program must end with a semicolon.

Which of the following statements are 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 in a program must end with a semicolon. d. Every method must end with a semicolon. e. Every class must end in a semicolon.

b. A Java applet can be executed from a Web Browser.

Which of the following statements is true. a. A Java application can be executed from a Web Browser. b. A Java applet can be executed from a Web Browser.

An Operating System

Which of the is a program that runs on a computer to manage and control a computer's activities: Operating System, Java, Modem, Interpreter, Compiler?

Sun Microsystems.

Who was Java developed by?

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

Why do computers use zeros or ones?

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

Write a correct statement to display "Welcome to Java" on the console.

java.

You use _____________ to run a Java program

Java JDK.

__________ consists of a set of separate programs for developing and testing Java programs, each of which is invoked from a command line.

Java IDE.

__________ provides and integrated development environment (IDE) for rapidly developing Java programs. Editing, compiling, building, debugging, and online help are integrated in one graphical user interface.

A compiler.

____________ is able to translate high-level language program into machine language program.

Java language specifications.

______________ is a technical definition of the language that includes the syntax and semantic of the Java programming language...

A Java virtual machine.

_______________ is a software that interprets Java bytecode.

Java API.

__________________ contains predefined classes and interfaces for deveolping Java.


Conjuntos de estudio relacionados

Chapter 51 Caring for Clients with Diabetes Mellitus

View Set

Chapter 32 - the toddler and family (evolve)

View Set

Dynamics of Healthcare, Chapter 3, Unit test

View Set

Postpartum Psychosocial Adaptations Ch. 18

View Set