100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Starting out with Java Exam 1 (ch. 1 - 4) 100% Accurate!! £11.83   Add to cart

Exam (elaborations)

Starting out with Java Exam 1 (ch. 1 - 4) 100% Accurate!!

 11 views  0 purchase
  • Module
  • Java
  • Institution
  • Java

0.0 - ANSWERWhat would be the value of discountRate after the following statements are executed? double discountRate = 0.00; int purchase = 100; if( purchase > 1000 ) discountRate = .05; else if ( purchase > 750 ) discountRate = .03; else if ( purchase > 500 ) discountRate = ....

[Show more]

Preview 3 out of 19  pages

  • August 2, 2024
  • 19
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • Java
  • Java
avatar-seller
Starting out with Java Exam 1 (ch. 1 - 4) 100%
Accurate!!

0.0 - ANSWERWhat would be the value of discountRate after the following statements are executed?



double discountRate = 0.00;

int purchase = 100;

if( purchase > 1000 )

discountRate = .05;

else if ( purchase > 750 )

discountRate = .03;

else if ( purchase > 500 )

discountRate = .01;



.01

.05

0.0

.03



Read and interpreted by the JVM - ANSWERByte code instructions are:

Syntax errors

Another name for source code

Machine code instructions

Read and interpreted by the JVM



Correct A logical error - ANSWERA runtime error is usually the result of:

A compilation error

Bad data

A logical error

A syntax error

,All of these - ANSWERWhich of the following professions use the computer as a tool?

Accountants

Engineers

Mechanics

Nurses

All of these



A set of instructions that enable the computer to solve a problem or perform a task - ANSWERA
computer program is:

A. Main memory

B. Pseudocode

C. A flow chart

D. A set of instructions that enable the computer to solve a problem or perform a task



Words that have a special meaning in the programming language - ANSWERKey words are:

A. The data names in your program

B. Words that have a special meaning in the programming language

C. Symbols or words that perform operations on one or more operands

D. Words or names defined by the programmer



True - ANSWERApplication software refers to programs that make the computer useful to the user.

True

False



*/ comment 3 / - ANSWERWhich of the following is NOT a valid comment statement?

/** comment 4 */

/* comment 2 */

// comment 1

*/ comment 3 /

, The memory address where "John Doe" is located - ANSWERIn the following Java statement what
value is stored in the variable name?



String name = "John Doe";



John Doe

The memory address where "John Doe" is located

name

The memory address where name is located



Double.ParseDouble - ANSWERWhich one of the following methods would you use to convert a
string to a double?

Long.ParseLong

Integer.ParseInt

Byte.ParseByte

Double.ParseDouble

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



javac MyClass.java



Before entering the command, you must:

A. Execute the java.sun.com program

B. Save the program with the .comp extension

C. Make sure you are in the same directory or folder where MyClass.java is located

D. Close all other Windows on your computer system



Procedure - ANSWERThis is a set of programming language statements that, together, perform a
specific task.

Procedure

Compiler

Pseudocode

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller papersmaster01. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for £11.83. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

76799 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy revision notes and other study material for 14 years now

Start selling
£11.83
  • (0)
  Add to cart