CSCI 1301 Final Exam Study Guide Exam Questions and Answers 100% Pass
2 views 0 purchase
Course
CSCI
Institution
CSCI
CSCI 1301 Final Exam Study Guide
Exam Questions and Answers 100%
Pass
Which of the following declares a variable that will store a measurement
with fractional parts?
A) int measure;
B) double measure;
C) String measure;
D) integer measure; - B) double measure;
Assuming that the user inputs...
Which of the following declares a variable that will store a measurement
with fractional parts?
A) int measure;
B) double measure;
C) String measure;
D) integer measure; - ✔✔B) double measure;
Assuming that the user inputs "Joe" at the prompt, what is the output of the
following code snippet?
A) The code snippet does not compile because the += operator cannot be
used in this context
B) Joe, Good morning
C) , Good morning
,D) Joe - ✔✔B) Joe, Good morning
The assignment operator
A) denotes mathematical equality
B) places a new value into a variable
C) means the same as the equal sign used in algebra
D) makes it illegal to write a statement like "sum = sum + 4" - ✔✔B) places
a new value into a variable
What term is used to refer a to a sequence of characters enclosed in
quotation marks?
A) string
B) object
C) comment
D) variable - ✔✔A) string
What is the result of the following statement
String s = "You" + "had" + "me" + "at" + "hello";
A) The string s has the following value: "You had me at hello"
B) The statement results in an error because the + operator can be only
used with numbers
, C) The statement results in an error because the + operator cannot be
performed on string literals
D) The string s has the following value: "Youhadmeathello" - ✔✔D) The
string s has the following value: "Youhadmeathello"
A method may be called by specifying which 3 items in the specified order?
- ✔✔Object, method name, parameters
When a Java application starts, what is the name of the method that is
executed?
A) main
B) start
C) begin
D) Main - ✔✔A) main
What will be printed by the statement below
int x = 20;
int y = x;
x += 3;
y *= 2;
System.out.print("x = " + x + ", y = " + y);
The benefits of buying summaries with Stuvia:
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
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
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 JOSHCLAY. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $8.99. You're not tied to anything after your purchase.