Java 1 final study practice test

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

The program runs fine and displays It is even!

Analyze the following code: boolean even = false; if (even = true) { System.out.println("It is even!"); }

applets

Java ________ can run from a Web browser.

Java bytecode

Java compiler translates Java source code into ________.

Sun Microsystems

Java was developed by ________.

0

25 % 1 is ________.

10

How many times will the following code print "Welcome to Java"? int count = 0; while (count < 10) { System.out.println("Welcome to Java"); count++; }

a logic error

If a program compiles fine, but it produces incorrect result, then the program suffers ________.

3

Suppose x is 1. What is x after x += 2?

c

Suppose x is a char variable with a value 'b'. What is the printout of the statement System.out.println(++x)?

Test.java

Suppose you 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

Java 123

The expression "Java " + 1 + 2 + 3 evaluates to ________.

true

What is 1 + 1 + 1 + 1 + 1 == 5?

5

What is i printed in the following code? public class Test { public static void main(String[ ] args) { int j = 0; int i = j++ + j * 5; System.out.println("What is i? " + i); } }

11

What is the result of 45 / 4?

x is 2.

What is x after the following statements? int x = 1; x *= x + 1;

java ByteCode

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

if (radius > 0) System.out.println(radius * radius * 3.14159);

Which of the following code displays the area of a circle if the radius is positive?

37 % 6

Which of the following expression results in a value 1?

Every statement in a program must end with a semicolon.

Which of the following statements is correct?

Java API

________ contains predefined classes and interfaces for developing Java programs.

Java virtual machine

________ is a software that interprets Java bytecode.

Windows XP

________ is an operating system.

CPU

________ is the brain of a computer.

Java

________is Architecture-Neutral.

Java language specification

________is a technical definition of the language that includes the syntax and semantics of the Java programming language.

Java

________is interpreted.

Java IDE

________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.


Conjuntos de estudio relacionados

1.2 Levels of Structural Organization

View Set

Chapter 11 Managerial Accounting

View Set

Chapter 11: The Basics of Capital Budgeting

View Set

Chapter 9: Violence and Abuse PrepU

View Set

Chapter 10: Measuring a Nation's Income

View Set

Exam 2: RDC, special considerations, infections, perfusion

View Set

Immunology & Microbiology 10 : Apoptosis, Necrosis & NETosis

View Set