Saturday, May 7, 2011

chapter 10

The StringBuilder constructor used in the following statement will

StringBuilder str = new StringBuilder(25);
~~~Give the object, str, 25 bytes of storage and not store anything in them

What will be the value of str after the following statements are executed?

StringBuilder str =
new StringBuilder("We have lived in Chicago, " +
"Trenton, and Atlanta.");
str.replace(17, 24, "Tampa");
~~~~We have lived in Tampa, Trenton, and Atlanta.

What will be the tokens in the following statement?

StringTokenizer strToken = new StringTokenizer("123-456-7890",
"-", true);
~~~123, 456, 7890, and -

If you do not specify delimiters in the StringTokenconstructor, which of the following cannot be a delimiter?
~~~Semicolon

What will be the tokens in the following statement?

String str = "red$green&blue#orange";
String tokens = str.split("[$&#]");

~~~"red", "green", "blue"and "orange"

If a string has more than one character used as a delimiter, we must write a loop to determine the tokens, one for each delimiter character.
~~false

What is the value of str after the following code has been executed?

String str;
String sourceStr = "Hey diddle, diddle, the cat and the fiddle";
str = sourceStr.substring(12,17);
~~~diddl

StringBuilder objects are not immutable.
~~true

What will be the value of matches after the following code has been executed?

boolean matches;
String str1 = "The cow jumped over the moon.";
String str2 = "moon";
matches = str1.endsWith(str2);
~~~false

If str is declared as

String str = "ABCDEFGHI";

what will be returned fromCharacter.toLowerCase(str.charAt(5))?
~~f


The String class’s valueOf() method accepts a string representation as an argument and returns its equivalent integer value.
~~False

What will be the value of loc after the following code is executed?

int loc;
String str = "The cow jumped over the moon.";
loc = str.lastIndexOf("ov", 14);

~~-1

What does the following statement do?

Float number = new Float(8.8);
~~All of the above

To convert the string, str = "285" to an int, use the following statement
~~int x = Integer.parseInt(str);

What will be the value of loc after the following code is executed?

int loc;
String str = "The cow jumped over the moon.";
loc = str.indexOf("ov");
~~. 15

The following statement correctly creates aStringBuilder object.

StringBuilder str = "Caesar Salad";
~~false

What would be the results of executing the following code?

StringBuilder str = new StringBuilder(12);
str.append("The cow");
str.append(" jumped over the ");
str.append("moon.");
~~strbuff would equal "The cow jumped over the moon."


Two ways of concatenating two Strings are
~~Use the concat() method or use the + between the two Strings


The following statement correctly creates aStringBuilder object.

StringBuilder str = "Caesar Salad";

==false

If a string has more than one character used as a delimiter, we must write a loop to determine the tokens, one for each delimiter character.
==flase

What will be printed after the following code is executed?

String str = "abc456";
int m = 0;
while ( m < 6 )
{
if (!Character.isLetter(str.charAt(m)))
System.out.print(
Character.toUpperCase(str.charAt(m)));
m++;
}

==456

Which of the following statements will print the maximum value a double variable may have?
==System.out.println(Double.MAX_VALUE);

To convert the int variable, number to a string, use the following statement.
==String str = Integer.toString(number);

The no-arg constructor for a StringBuilder object gives the object enough storage space to hold this many characters.
=16 characters

chapter 9

When an object reference is passed to a method, the method may change the values in the object.
==true

You cannot use the fully-qualifed name of an enum constant for this.
==a case expression***

Look at the following declaration.

enum Tree { OAK, MAPLE, PINE }

What is the ordinal value of the MAPLE enum constant?
==1

If the this variable is used as a constructor call,
=A compiler error will result, if it is not the first statement of the constructor

A class's static methods do not operate on the fields that belong to any instance of the class.
==true

If you have defined a class SavingsAccount with a public static method getNumberOfAccounts(), and created a SavingsAccount object referenced by the variable account20, which of the following will call the getNumberOfAccounts()method?
==SavingsAccount.getNumberOfAccounts();


The JVM periodically performs this process to remove unreferenced objects from memory.
==garbage collection

If the following is from the method section of a UML diagram, which of the following statements is true?

+ equals(object2:Stock) : boolean
==This is a public method that accepts a FeetInches object as its argument and returns a boolean value

You may use this to compare two enum data values.
==The equals and compareTo methods that automatically come with the enum data type


Look at the following declaration.

enum Tree { OAK, MAPLE, PINE }

What is the fully-qualified name of the PINE enum constant?
==Tree.PINE

If the this variable is used as a constructor call,
==A compiler error will result if it is not the first statement of the constructor

To copy an object to another object of the same class
==Write a copy method that will make a field by field copy of the two objects

Enumerated types have this method, which returns the position of an enum constant in the declaration list.
==ordinal

If you have defined a class named SavingsAccountwith a public static data member namednumberOfAccounts, and created a SavingsAccountobject referenced by the variable account20, which of the following will assign numberOfAccounts tonumAccounts?
==numAccounts = SavingsAccount.numberOfAccounts;

When a method's return type is a class, what is actually returned to the calling program?
==A reference to an object of that class

The only limitation that static methods have is
==They cannot refer to non-static members of the class

When the this variable is used to call a constructor,
==. It must be the first statement in the constructor making the call


You can declare an enumerated data type inside of a method.
==false

The term for the relationship created by object aggregation is
==Has a


If you write a toString method to display the contents of an object, object1, for a class, Class1, then the following two statements are equivalent:

System.out.println(object1);
System.out.println(object1.toString());
~~true


You cannot use the fully-qualifed name of an enum constant for this
~~a case expression

To compare two objects
~~Write an equals method that will make a field by field comparison of the two object

What will be returned from a method, if the following is the method header:

public Rectangle getRectangle()
~~The address of an object in the class Rectangl


An instance of a class does not have to exist in order for values to be stored in a class's static fields
~~~true

If you write a toString method for a class, Java will automatically call the method any time you concatenate an object of the class with a string.
~~true

Which of the following is not true about static methods?
~~They are called from an instance of the class.

Friday, May 6, 2011

chapter 8

What will be the value of x[1] after the following code is executed?

int[] x = { 22, 33, 44 };
arrayProcess(x);
...
public static void arrayProcess(int[] a)
{
for(int k = 0; k < 3; k++)
{
a[k] = a[k] + 5;
}
}

==38

A ragged array is
==A two-dimensional array when the rows are of different lengths

What will be the value of x[8] after the following code has been executed?

final int SUB = 12;
int[] x = new int[SUB];
int y = 20;
for(int i = 0; i < SUB; i++)
{
x[i] = y;
y += 5;
}
====60

What would be the results of the following code?

int[] array1 = new int[25];
… // Code that will put values in array1
int value = array1[0];
for (int a = 1; a < array1.length; a++)
{
if (array1[a] < value)
value = array1[a];
}
==value contains the lowest value in array1

What would be the results after the following code was executed?

int[] x = {23, 55, 83, 19};
int[] y = {36, 78, 12, 24};
for(int a = 0; a < x.length; a++)
{
x[a] = y[a];
y[a] = x[a];
}
===x[] = {36, 78, 12, 24} and y[] = {36, 78, 12, 24}

What will be the value of x[8] after the following code has been executed?

final int SUB = 12;
int[] x = new int[SUB];
int y = 100;
for(int i = 0; i < SUB; i++)
{
x[i] = y;
y += 10;
}
===180

If numbers is a two-dimensional int array that has been initialized and total is an int that has been set to 0, which of the following will sum all the elements in the array?
==
for (int row = 0; row < numbers.length; row++)
{
for (int col = 0; col < numbers[row].length; col++)
total += numbers[row][col];
}



What would be the results after the following code was executed?

int[] x = {23, 55, 83, 19};
int[] y = {36, 78, 12, 24};
x = y;
y = x;
===x[] = {36, 78, 12, 24} and y[] = {36, 78, 12, 24}

What would be the results of the following code?

int[] x = { 55, 33, 88, 22, 99,
11, 44, 66, 77 };
int a = 10;
if(x[2] > x[5])
a = 5;
else
a = 8;
==  a = 5

If a[] and b[] are two integer arrays, the expression a == b compares the array contents.
==false


Given the following two-dimensional array declaration, which statement is true?

int [][] numbers = new int [6] [9];

~~The array numbers has 6 rows and 9 columns

What does the following statement do?

double[] array1 = new double[10];


~~All of the above

The sequential search algorithm
~~Uses a loop to sequentially step through an array, starting with the first element



Any items typed on the command-line, separated by space, after the name of the class are considered to be one or more arguments that are to be passed into the main method.
~true

Java does not limit the number of dimensions that an array may have.
~true

The binary search algorithm
~~Will cut the portion of the array being searched in half each time the loop fails to locate the search value

What will be the value of x[1] after the following code is executed?

int[] x = {22, 33, 44};
arrayProcess(x[1]);
...
public static void arrayProcess(int a)
{
a = a + 5;
}
~~33

An ArrayList object automatically expands in size to accommodate the items stored in it.
~true


The following statement creates an ArrayListobject. What is the purpose of the notation?

ArrayList<String> arr = new ArrayList<String>();
~**It specifies that only String objects may be stored in the ArrayList object.



What would be the results of the following code?

final int SIZE = 25;
int[] array1 = new int[SIZE];

... // Code that will put values in array1

int value = 0;
for (int a = 0; a < array1.length; a++)
{
value += array1[a];
}
~~~***value contains the sum of all the values in array1


Given that String[] str has been initialized, to get a copy of str[0] with all characters converted to upper case, use the following statement
==str[0].toUpperCase();


In memory, an array of String objects
===Consists of an array of references to Stringobjects


For the following code, what would be the value ofstr[2]?

String[] str = {"abc", "def", "ghi", "jkl"};

==A reference to the String "ghi"


What will be the result of executing the following code?

int[] x = {0, 1, 2, 3, 4, 5};
==An array of 6 values ranging from 0-5 and referenced by the variable x will be created


You can use this ArrayList class method to insert an item at a specific location in an ArrayList.
==add


  What will be the value of x[8] after the following code has been executed?

final int SUB = 12;
int[] x = new int[SUB];
int y = 100;
for(int i = 0; i < SUB; i++)
{
x[i] = y;
y += 10;
}
==180

In order to do a binary search on an array,
===The array must first be sorted in ascending order



You can use this ArrayList class method to replace an item at a specific location in anArrayList.
==set

This ArrayList class method deletes an item from an ArrayList.
===remove

The String[] args parameter in the main method header allows the program to receive arguments from the operating system command-line.
==true

chapter 7

Which of the following is not a rule for the FlowLayout manager?
==All of the above are rules for the FlowLayout manager

You would use this command at the operating system command line to execute the code in the MyApplication class and display the graphic image Logo.jpg as a splash screen.
==java -splash:Logo.jpg MyApplication

When an application uses many components, instead of deriving just one class from the JFrame class, a better approach is to
==Encapsulate smaller groups of related components and their event listeners into their own classes

When this is the argument passed to the JFrame class's setDefaultCloseOperation() method, the application is hidden, but not closed.
==B. JFrame. HIDE_ON_CLOSE**

In Java, the ability to display splash screens was introduced in Java 6.
==true

When an application uses many components, rather than deriving just one class from the JFrame class, it is often better to encapsulate smaller groups of related components and their event listeners into their own class. A commonly used technique to do this is
==To derive a class from the JPanel class to contain other components and their related code

If button1 is a JButton object, which of the following statements will make its background blue
==button1.setBackground(Color.blue);

To click the JRadioButton referenced by radio, write the following code.
==radio.doClick();

The FlowLayout manager does not allow the programmer to align components.
==false

When a splash screen is displayed, the application does not load and execute until the user clicks the splash screen image with the mouse.
==true

chapter 6

Instance methods do not have the key word static in their headers.
==true

Which of the following statements will create a reference, str, to the string, “Hello, world”?

(1) String str = new String("Hello, world");
(2) String str = "Hello, world";
==Both 1 and 2

It is common practice in object-oriented programming to make all of a class's
==fields private

Another term for an object of a class is a(n)
== instance

One or more objects may be created from a(n)________.
==class

This refers to the combining of data and code into a single object.
==Encapsulation

Which of the following statements will create a reference, str, to the String, "Hello, World"?
==String str = “Hello, World”;

Given the following code, what will be the value of finalAmount when it is displayed?

public class Order
{
private int orderNum;
private double orderAmount;
private double orderDiscount;

public Order(int orderNumber, double orderAmt,
double orderDisc)
{
orderNum = orderNumber;
orderAmount = orderAmt;
orderDiscount = orderDisc;
}
public int getOrderAmount()
{
return orderAmount;
}
public int getOrderDisc()
{
return orderDisc;
}
}

public class CustomerOrder
{
public static void main(String[] args)
{
int ordNum = 1234;
double ordAmount = 580.00;
double discountPer = .1;
Order order;
double finalAmount = order.getOrderAmount() —
order.getOrderAmount() * order.getOrderDisc();
System.out.println("Final order amount = $" +
finalAmount);
}
}
====There is no value because the object order has not been created

The following package is automatically imported into all Java programs.
==java.lang

The scope of a private instance field is
==the instance methods of the same class


Look at the following statement.

import java.util.*;

This is an example of
==A wildcard import

In a UML diagram to indicate the data type of a variable enter
==The variable name followed by a colon and the data type

When an object is created, the fields associated with the object are called
==instance fields

In your textbook the general layout of a UML diagram is a box that is divided into three sections. The top section has the _________; the middle section holds _________; the bottom section holds _________.
==Class name; fields; methods

A constructor is a method that is automatically called when an object is created.
==true

 
It is common practice in object-oriented programming to make all of a class's
==fields private

The following package is automatically imported into all Java programs
==java.lang

After the header, the body of the method appears inside a set of
==Braces, {}

A UML diagram does not contain ________.
==object names


What does the following UML diagram entry mean?

+ setHeight(h : double) : void
~~This is a public method with a parameter of data type double and does not return a value


In UML diagrams, this symbol indicates that a member is public.
~~ +

A class’s responsibilities include
~Both A and B

For the following code, which statement is not true?

public class Circle
{
private double radius;
public double x;
private double y;
}

~~~y is available to code that is written outside the Circle class



chapter 5

When writing the documentation comments for a method, you can provide a description of each parameter by using a
==@param tag

Which of the following would be a valid method call for the following method?

public static void showProduct(double num1, int num2)
{
double product;
product = num1 * num2;
System.out.println("The product is " +
product);
}
== showProduct(3.3, 55);

Which of the following would be a valid method call for the following method?

public static void showProduct (int num1, double num2)
{
int product;
product = num1 * (int)num2;
System.out.println("The product is " + product);
}
==showProduct(10, 4.5);

What will be the result of the following code?

int num;
string str = "555";
num = Integer.parseInt(string str) + 5;
==The last line of code will cause an error

What is wrong with the following method call?

displayValue (double x);
==The data type of the argument x should not be included in the method call

You must have a return statement in a value-returning method.
==true

Breaking a program down into small manageable methods
==all of the above

The header of a value-returning method must specify this.
==The data type of the return value

This part of a method is a collection of statements that are performed when the method is executed.
=Method body

In the following code, System.out.println(num), is an example of ________.

double num = 5.4;
System.out.println(num);
num = 0.0;
==A void method


No statement outside the method in which a parameter variable is declared can access the parameter by its name.
==true

Which of the following is not a part of the method header?
==semicolon

A parameter variable's scope is the method in which the parameter is declared.
==true

When an object, such as a String, is passed as an argument, it is
==Actually a reference to the object that is passed

Which of the following is not a benefit derived from using methods in programming?
==. All of the above are benefits

Any method that calls a method with a throws clause in its header must either handle the potential exception or have the same throws clause.
==true

All @param tags in a method's documentation comment must
==Appear after the general description of the method

Given the following method header, which of the method calls would be an error?

public void displayValues(double x, int y)
==displayValue(a,b); // where a is a short and b is a long


To document the return value of a method, use this in a documentation comment.
==The @return tag

A value-returning method can return a reference to a non-primitive type.
==true

When an argument value is passed to a method, the receiving parameter variable is
==Declared in the method header inside the parentheses

Constants, variables, and the values of expressions may be passed as arguments to a method.
==true

This type of method performs a task and then terminates.
==void

Which of the following is not a benefit derived from using methods in programming?
==All of the above are benefits

No statement outside the method in which a parameter variable is declared can access the parameter by its name.
==true

The expression in a return statement can be any expression that has a value.
==true

chapter 4

In a for loop, the control variable can only be incremented.
==true..

Before entering a loop to compute a running total, the program should first
==Set the accumulator where the total will be kept to an initial value, usually zero

What will be the values of x and y as a result of the following code?

int x = 12, y = 5;
x += y- -;
==x = 17, y = 4

When the break statement is encountered in a loop, all the statements in the body of the loop that appear after it are ignored, and the loop prepares for the next iteration.
==false

In the for loop, the control variable cannot be initialized to a constant value and tested against a constant value.
==false

A loop that repeats a specific number of times is known as a(n) ________.
==Counter-controlled loop

This is a sum of numbers that accumulates with each iteration of a loop
==Running total

This is an item that separates other items.
==Delimiter


When you open a file with the PrintWriter class, the class can potentially throw an IOException.
==true

If a loop does not contain within itself a way to terminate, it is called
==An infinite loop

Assuming that inputFile references a Scanner object that was used to open a file, which of the following statements will read an int from the file?
==int number = inputFile.nextInt();*****

A loop that executes as long as a particular condition exists is called a(n) ________.
==Conditional loop


A for loop normally performs which of these steps?
==All of the above**

What will be the value of x after the following code is executed?

int x = 10;
for (int y = 5; y < 20; y +=5)
x += y;
==40

The do-while loop is a pre-test loop.
==false

The do-while loop must be terminated with a semicolon.
==true

Look at the following code:

Scanner keyboard = new Scanner(System.in);
int studentGrade = 0;
int totalOfStudentGrades = 0;
while(studentGrade != -1)
{
System.out.println("Enter student grade: :");
studentGrade = keyboard.nextInt();
totalOfStudentGrades += studentGrade;
}

In the loop header: while(studentGrade != -1), what is the purpose of "-1"
====It is a sentinel

This is a value that signals when the end of a list of values has been reached.
==Sentinel

When the break statement is encountered in a loop, all the statements in the body of the loop that appear after it are ignored, and the loop prepares for the next iteration.
==false

How many times will the following do-while loop be executed?

int x = 11;
do
{
x += 20;
} while (x <= 100);

===5

What will be the values of x and y as a result of the following code?

int x = 25, y = 8;
x += y++;
==x = 33, y = 9

What will be the value of x after the following code is executed?

int x = 10, y = 20;
while (y < 100)
{
x += y;
}
==This is an infinite loop

How many times will the following do-while loop be executed?

int x = 11;
do
{
x += 20;
} while (x > 100);
==1

This type of loop is ideal in situations where the exact number of iterations is known.
==for loop

Which of the following will open a file named MyFile.txt and allow you to read data from it?
==File file = new File("MyFile.txt");
Scanner inputFile = new Scanner(file);

chapter 3

What would be the value of discountRate after the following statements are executed?

double discountRate = 0.0;
int purchase = 100;
if (purchase > 1000)
discountRate = .05;
else if (purchase > 750)
discountRate = .03;
else if (purchase > 500)
discountRate = .01;

===Cannot tell from code

Which of the following will format 12.78 to display as 12.8%?
==##0.0%

What does the following code display?

int d = 9, e = 12;
System.out.printf("%d %d\n", d, e);

===9 12

Which of the following correctly tests the char variable chr to determine whether it is not equal to the character B?
==if (chr != 'B')

This is a boolean variable that signals when some condition exists in the program
==Flag

The expression in an if statement must evaluate to
==true or false

A local variable's scope always ends at the closing brace of the block of code in which it is declared.
==true

Because the && operator performs short-circuit evaluation, your boolean expression will usually execute faster if the subexpression most likely false expression is on the left.
==true

If str1 and str2 are both Strings, which of the following expressions will correctly determine whether they are equal?

(1) (str1 == str2)
(2) str1.equals(str2)
(3) (str1.compareTo(str2) == 0)
===2 and 3

Which of the following is the correct boolean expression to test for: int x being a value between, but not including, 500 and 650, or int y not equal to 1000?
==((x > 500 && x < 650) || (y != 1000))


What would be the value of discountRate after the following statements are executed?

double discountRate = 0.0;
int purchase = 1250;
if (purchase > 1000)
discountRate = .05;
if (purchase > 750)
discountRate = .03;
if (purchase > 500)
discountRate = .01;
else
discountRate = 0

===0.01

A flag may have the values
==true or false

What does the following code display?

double x = 12.3798146;
System.out.printf("%.2f\n", x);
==12.38

What is the value of ans after the following code has been executed?

int x = 35;
int y = 20, ans = 80;
if (x < y);
ans += y;
==100


Because the || operator performs short-circuit evaluation, your boolean statement will generally run faster if the subexpression that is most likely to be true is on the left.
==true

What would be the value of bonus after the following statements are executed?

int bonus, sales = 85000;
char dept = 'S';
if (sales > 100000)
if (dept == 'R')
bonus = 2000;
else
bonus = 1500;
else if (sales > 75000)
if (dept == 'R')
bonus = 1250;
else
bonus = 1000;
else
bonus = 0;

==1000

What would be the value of discountRate after the following statements are executed?

double discountRate;
char custType = 'B';
switch (custType)
{
case 'A':
discountRate = .08;
break;
case 'B':
discountRate = .06;
case 'C':
discountRate = .04;
default:
discountRate = 0.0;
}

==0.0



Unicode is an international encoding system that is extensive enough to represent ALL the characters of ALL the world's alphabets.
==true

In a switch statement, if two different values for theCaseExpression would result in the same code being executed, you must have two copies of the code, one after eachCaseExpression.
==false

What will be the value of ans after the following code has been executed?

int x = 65;
int y = 55;
if (x >= y)
int ans = x + y;
==120

When two Strings are compared using the compareTo method, the cases of the two strings are not considered.
==false


What is the value of ans after the following code has been executed?

int x = 40;
int y = 40;
int ans = 0;
if (x = y)
ans = x + 10;
==No value, this is a syntax error.

The ________ statement is used to make simple decisions in Java.
==if

What will be printed when the following code is executed?

double x = 45678.259;
DecimalFormat formatter =
new DecimalFormat("#,###,##0.00");
System.out.println(formatter.format(x));

====45,678.26

chapter 2

If the following Java statements are executed, what will be displayed?

System.out.println("The top three winners are\n");
System.out.print("Jody, the Giant\n");
System.out.print("Buffy, the Barbarian");
System.out.println("Adelle, the Alligator");

====
The top three winners are
Jody, the Giant
Buffy, the BarbarianAdelle, the Alligator

 
Variables are classified according to their ________.
==data type

 
Which of the following statements correctly creates a Scanner object for keyboard input?
===Scanner keyboard = new Scanner(System.in);


 
Which of the following is a valid Java statement?
Possible Answers
==String str = "John Doe";

 
A variable's scope is the part of the program that has access to the variable.
==true
 


 
Which of the following is not a rule that must be followed when naming identifiers?

===Identifiers can contain spaces.

 
Character literals are enclosed in ________; string literals are enclosed in ________.
==single quotes; double quotes


Every Java application program must have
==a method named main

The boolean data type may contain values in the following range of values
==true or false


What would be printed out as a result of the following code?

System.out.println("The quick brown fox" +
"jumped over the \n"
"slow moving hen.");

===Nothing. This is an error.

What will be the value of z after the following statements have been executed?

int x = 4, y = 33;
double z;
z = (double) (y / x);

===8.0

What is the result of the following statement?
25/4 + 4 * 10 % 3
==7

What will be the value of z as a result of executing the following code?

int x = 5, y = 28;
float z;
z = (float) (y / x);
===5.0

Variables of the boolean data type are useful for
===Evaluating true/false conditions

This is a variable whose content is read only and cannot be changed during the program's execution of the program
===Named constant

This is normally considered the standard output and standard input devices, and usually refer to the monitor and keyboard.
==console

A Java program must have at least one
==Class definition

Given the declaration double r;, which of the following statements is invalid?
==r = 2.9X106;


If the compiler encounters a statement that uses a variable before the variable is declared, an error will result
==true

What is the result of the following expression?

25 - 7 * 3 + 12/3

==8

What is the result of the following statement?
25/4 + 4 * 10 % 3
==7

The primitive data types only allow a(n) ________ to hold a single value.
==variable

chapter 1

Most commercial software applications are large and complex and are usually developed by a single individual.

===false

RAM is usually
== A volatile type of memory, used only for temporary storage

A byte is a collection of
=Eight bits

The Java Virtual Machine is a program that reads Java byte code instructions and executes them as they are read.
== true

An operating system can be categorized according to
==The number of users they can accommodate

Another term for programs is
==Software

In the Programming Process which of the following is not involved in defining what the program is to do
=Compile code

Colons are used to indicate the end of a Java statement.
=false

This is a cross between human language and a programming language.
==Pseudocode

The contents of a variable cannot be changed while the program is running.
=== false

Byte code instructions are
==Read and interpreted by the JVM

Suppose you are at an operating system command line, and you are going to use the following command to compile a program:
==Make sure you are in the same directory or folder where the MyClass.java file is located


Internally, the central processing unit (CPU) consists of two parts
===The control unit and the arithmetic and logic unit ALU

Which of the following will run the compiled program ReadIt?
==java ReadIt

Which of the following commands will compile a program named ReadIt?
=javac ReadIt.java

The major components of a typical computer system consist of
==All of the above

The original name for Java was
==Oak

The Java Virtual Machine is a program that reads Java byte code instructions and executes them as they are read
==True

A characteristic of ________ is that only an object's methods are able to directly access and make the changes to the object's data.
==Data hiding

Compiled byte code is also called source code.
== false

Software refers to
==Programs

The data contained in an object is known as ________.
==Attributes

Application software refers to
==The programs that make the computer useful to the user

When an object's internal data is hidden from outside code and access to that data is restricted to the object's methods, the data is protected from accidental corruption.
==true