Section 1

Preview this deck

What does the != indicate? A.Greater than B.Equal C.Not equal D.Less than

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (70)

Section 1

(50 cards)

What does the != indicate? A.Greater than B.Equal C.Not equal D.Less than

Front

C

Back

Which input method from the Scanner class would get the next token "Ken" up to the white space if the input was: "Ken Dewey" A..nextLine(); B..nextDouble(); C..next(); D..nextInt();

Front

C

Back

This refers to the programs that tell a computer what to do? A.Auxiliary memory B.Software components C.Central Processing Unit D.Hardware Components

Front

B

Back

Select the proper main method heading from the choices below: A.public static void main{string [] args} B.public static void main(String [] args) C.public static void main (string [] args) D.public static void main{String [] args}

Front

B

Back

Which flowchart symbol below surrounds print, input, and assignment statements? A.Rectangle B.Diamond C.Triangle D.Arrow E.Circle

Front

A

Back

Select the correct Loop termination techniques discussed in the chapter. A.Counter B.Sentinel Value C.User Query D.All of the above

Front

D

Back

Computers have many ways of storing data. Which type of storage below is considered Volatile? A.CD-Rom Drive B.USB Flash Drive C.Main memory D.Hard drive

Front

C

Back

Which statements contain one or more choices and only one of the choices is executed? A.Looping B.Sequential C.Conditional

Front

C

Back

Plagiarism involves the use of quotations without quotation marks, the use of quotations without indication of the source, the use of another's idea without acknowledging the source, the submission of a paper, laboratory report, project, or class assignment (any portion of such) prepared by another person, or incorrect paraphrasing, from the Park University 2010-2011 Undergraduate Catalog Page 92-93. Students caught plagiarizing any assignment or portion of assignment will: A. receive a zero for the current assignment B. Could also suffer more severe penalties may also be applied per the Park University catalog C. also, in the event plagiarism is detected on a previous assignment the previous assignment grade may be adjusted to reflect the above policy even if the assignment was already awarded a higher grade. D. zero for the previous assignment E. All of the above

Front

E

Back

To surround a description of what should be placed at a particular position you would use which of the following? A.[ ] B.> < C.~ ~ D.< >

Front

D

Back

When writing a trace of a declaration statement why would you put a ? in the declared variables column? A.It is what goes there B.It indicates that there is a variable but that it doesnt have a value yet C.It indicates that there is no value D.It indicates that the value can be anything

Front

B

Back

Width is? A.Specifies the minimum number of characters that are to be printed B.Width of an object C.Measurement of the program width D.A measurement of the program length

Front

A

Back

When running a computer Program you should follow a two step process which includes first compiling the program second running the program. True False

Front

True

Back

What is a nested loop? A.One loop after another B.None of the above C.A loop that ends after one iteration D.A loop within a loop

Front

D

Back

A ___________ is a class that surrounds a relatively simple item in order to add functionality to the simple item. A.Wrapper class B.Public class C.Private class D.Math class

Front

A

Back

This refers to all the physical components inside a computer? Correct! A.Hardware components B.Central Processing Units C.Software components D.Auxiliary memory

Front

A

Back

Select the logical operators in order for "and", "or", and "not". A.! && || B.|| && ! C.&& || ! D.! || &&

Front

C

Back

The Math class contains a named constant PI. What is it's approximate value? A.3.14 B.Private input C.None of the above D.Public input

Front

A

Back

A while loop is what is called a post-test loop. True False

Front

False

Back

What is the default type for a floating point constant? A.All of the above B.Float C.Index D.Double

Front

D

Back

Variables that hold decimals should be declared as one of the floating-point data types, which of the following may they be declared as? A.Double or float B.Float or index C.None of the above D.Double, float or index

Front

A

Back

Precision is? C.Both A and B A.Applies only to floating-point numbers B.Its syntax consists of a dot and then the number of digits that are to be printed to the right of the decimal point. D.None of the above

Front

C

Back

Which statements cause you to jump back to a previously executed statement? A.Looping B.Conditional C.Sequential

Front

A

Back

Which flowchart symbol below surrounds questions (for if conditions and loop conditions)? A.Arrow B.Rectangle C.Circle D.Triangle E.Diamond

Front

E

Back

What is the symbol used for the decrement operator? A.(||) B.(++) C.(==) D.(--)

Front

D

Back

Select the correct class heading statement from those below: A.public class Hello World B.public class HelloWorld C.class HelloWorld D.HelloWorld

Front

B

Back

What would you use to perform character-related operations? A.java.util.Scanner B.java.lang package C.Character wrapper class D.None of the above

Front

C

Back

_______ is when a program checks a user's input to make sure it's valid? A.Input validation B.Output C.Output validation D.Validation

Front

A

Back

Which type of memory is considered Nonvolatile? A.Main Memory B.Auxiliary Memory

Front

B

Back

Java programs that are embedded in web pages are called? A.Bytecode B.Algorithm C.Applets D.Pseudocode

Front

C

Back

Which of the following is NOT a form of an "if" statement? A."else, if else" B."if, else if" C."if, else" D."if"

Front

A

Back

In a do loop it first executes the loop, then checks the condition. True False

Front

True

Back

What does the conversion character tells the Java Virtual Machine (JVM)? A.What variable it is B.What type of class it is C.If the character is correct D.The type of thing needing to be printed

Front

D

Back

A Boolean variable is a variable that does what? A.Only holds the value false B.Holds the value true or the value false C.Only holds the value true D.Uses only 1's and 0's

Front

B

Back

In a do loop where is the condition located? A.Middle B.Bottom C.None of the above D.Top

Front

B

Back

In a for loop you know the exact number of loop iterations before the loop begins. True False

Front

True

Back

To check if a given character is a digit you need to use isDigit, what type of return value is this? A.Integer B.Boolean C.Character D.String

Front

B

Back

Why would there be no need to import the math class to do math calculations? A.It is included in the java.lang package that is automatically imported C.Both A and B D.None of the above B.It is included in the java.util.Scanner and you should already have that

Front

A

Back

What does API stand for? A.Appendix preference interface B.Application programming interface C.Appointed programming involvement D.Application protocol interface

Front

B

Back

When using the increment operator (++) how many do you increment? A.0 B.3 C.2 D.1

Front

D

Back

What is the output of the following code segment? String myStr - "Now is the time for all good me to come to the aide of their country!"; System.out.println(myStr.lastIndexOf("e ")); // that is an 'e' and a space A.49 B.50 C.come D.aide E.51 F.me

Front

B

Back

Algorithms are written with ________? A.Pseudocode B.Applets C.Applications D.Bytecode

Front

A

Back

Which of the following are rules for Java code? A.Using a ; at the end of the line. B.Using the / for division. C.Using the dash for subtraction. D.All of the above

Front

D

Back

Which flowchart symbol below connects the rectangles and diamonds and shows the direction of the logic flow? A.Diamond B.Circle C.Arrow D.Triangle E.Rectangle

Front

C

Back

Select the proper print statement from the choices below: A.System.out.println("Hello World"); B.System.out.println('Hello World'); C.System.out.println("Hello World") D.System.out.println(Hello World);

Front

A

Back

A sequence of characters surrounded by quotes is called a? A.Length B.String C.Variable D.Prompt

Front

B

Back

The name of the Java program's file must match the name of the Java program's class (except that the filename has a .java extension added to it). True False

Front

True

Back

Since Java is case-sensitive, that means the filename should start with a lowercase first letter. True False

Front

False

Back

Which statements are executed in sequence, one after the other? A.Looping B.Sequential C.Conditional

Front

B

Back

What does the code equalsIgnoreCase indicate? A.That all letters upper and lower are treated as lower case. B.That upper and lower case letters are treated the same. C.That upper and lower case letters are treated as different. D.That all letters upper and lower are treated as upper case.

Front

B

Back

Section 2

(20 cards)

A class's instance variables specify the type of data that an object can store. True False

Front

True

Back

What are the correct Default values below? A.integer types get 0.0 floating point types get 0 boolean types get true reference types get 0 B.integer types get 0 floating point types get 0.0 boolean types get false reference types get null C.integer types get 0.0 floating point types get 0.0 boolean types get false reference types get null D.integer types get 0 floating point types get 0.0 boolean types get false reference types get 0 Refer to lecture notes for This chapter.

Front

B

Back

What does a constructor do? A.It allows you to specify default values for any object declarations. B.It allows you to specify the return types for all methods contained within a specific class. C.It allows you to specify what happens to an object when it is instantiated with new. D.It allows you to return the value of a method while assigning that value to the referencing object.

Front

C

Back

What is the purpose of assigning one reference variable to another? A.So that both reference variables then point to the same object B.To reference one through the other C.So it can use the other variable also D.None of the above

Front

A

Back

A class is a description for a set of _________? A.Integers B.Objects C.Characters D.Methods

Front

B

Back

The object that appears at the left of the dot in a call to an instance method. A.object call B.reference object C.this reference D.calling object

Front

D

Back

A class's instance methods specify the behavior that an object can exhibit. True False

Front

True

Back

What method does Java use to pass arguments to methods? A.pass-by-address B.pass-by-value C.pass-by-argument D.pass-by-method

Front

B

Back

What statement below uses method-call chaining? A.cat.setMake("Honda"); car.setYear("Honda"); car.printIt(); B.car.setMake("Honda); C.There is nothing called method-call chaining. D.car.setMake("Honda").setYear(1998).printIt();

Front

D

Back

When passing references as arguments, what happens? A.A copy of the address of the argument is passed. B.The value of the argument is passed. C.The address of the argument is passed. D.A copy of value of the argument is passed.

Front

A

Back

What could be the calling object in the below line of code? A.cat.setWeight(2); B.cat.setWeight(2) C.2 D.setWeight E.cat

Front

D

Back

What is the proper format to call a method called "set" that takes a String as the first argument and then 2 integers as arguments 3 and 4? A.set(Kenneth, 45, 32); B.set('Kenneth', "45", "32"); C.set("Kenneth", 45, 32); D.set("Kenneth", "45" "32");

Front

C

Back

What is the proper command to compare two strings String1 and String2? A.Either String1 = String2 OR String1 == String2 B.Either String1.equals(String2) OR String1.equalsIgnoreCase(String2)

Front

B

Back

Since the parameter and the argument hold the same address value, they point to the same object. True False

Front

True

Back

Which set of statements below utilizes overloading? A.findAverageFor2Ints(20, 8); findAverageFor3Ints(5, 12, 34); findAverageFor4Ints(2, 3, 4, 5); B.findAverage(20,8); findAverage(5, 12, 34); findAverage(2, 3, 4, 5);

Front

B

Back

A constructor is NOT called automatically when an object is instantiated. True False

Front

False

Back

A constructor lets you specify what happens to an object when it is instantiated with new. True False

Front

True

Back

When you apply an access modifier to a member of a class, what are you determining? A.How easy it is for the member to be accessed B.What's in the access modifier C.Evaluating the data stored in the class D.All of the above

Front

A

Back

The most popular programming technique is called? A.Java programming B.Object-oriented programming C.Procedural programming D.None of the above

Front

B

Back

Any time you instantiate an object (with new), there must be a matching ___________? A.Constructor B.Application C.Method D.Instance

Front

A

Back