Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

Computer Science Test Questions (correct answers)

Rating
-
Sold
-
Pages
5
Grade
A+
Uploaded on
03-05-2023
Written in
2022/2023

Print writer correct answers What is used for writing output to a file? scanner correct answers What is used when getting input from a file? scanner correct answers Which of the following is not a primitive data type? float long Scanner char /n correct answers Which of the following is an example of an escape sequence? /n while main Scanner count == 1 correct answers Which of the following does not change the value of a variable? count++ count == 1 count += 1 count = 1 count = count + 1 M correct answers Which of the following should you use to compute the value that results when raising one variable to the power of another (i.e, exponentiation)? M Mm ** ++ ^ none ok will always be printed correct answers if( firstletter != 'y' || firstletter != 'Y') Sln ( "ok" ); Which of the following true: ok will always be printed ok will never be printed ok will be printed only when firstletter is neither 'y' nor 'Y' the value of firstletter will be printed only if it has the value 'n' none

Show more Read less
Institution
Course

Content preview

Computer Science Test Questions (correct answers)
PrintWriter correct answers What is used for writing output to a file?

scanner correct answers What is used when getting input from a file?

scanner correct answers Which of the following is not a primitive data type?
float
long
Scanner
char

/n correct answers Which of the following is an example of an escape sequence?
/n
while
main
Scanner

count == 1 correct answers Which of the following does not change the value of a
variable?
count++
count == 1
count += 1
count = 1
count = count + 1

Math.pow correct answers Which of the following should you use to compute the value
that results when raising one variable to the power of another (i.e, exponentiation)?
Math.pow
Math.random
**
++
^
none

ok will always be printed correct answers if( firstletter != 'y' || firstletter != 'Y')
System.out.println ( "ok" );

Which of the following true:
ok will always be printed
ok will never be printed
ok will be printed only when firstletter is neither 'y' nor 'Y'
the value of firstletter will be printed only if it has the value 'n'
none

, TestQuestion.java correct answers Suppose you implement a class with the header
// public class TestQuestion
The java source code for the class is stored in a file with the name:

19 correct answers How many times will the body of the loop execute?
for (int i = 1; i < 20, i++)
{
System.out.println ( i )
}

While correct answers What should you typically use if you want to continue asking the
user to enter a value whenever they type a invalid input?

Accumulating correct answers This term us used to describe variables that keep a
running total of something.

Variable correct answers A(n) _____ is a named storage location in a computer's
memory.

/* correct answers This marks the beginning of a multiline comment.

Literal correct answers A(n) ______ is a value like 'A' or 72 that is written into the code
of a program.

Narrowing Conversion correct answers A(n) _______ is a kind of type conversion which
causes an error because information may be lost.

Nested Loop correct answers This term describes a loop that appears inside another
loop.

Final correct answers This is a keyword used when declaring a variable which cannot
be changed.

A declaration opens up a space for a value in the computer's memory and an
assignment fills it with a value.
Declaration: Int Example;
Assignment: Example = #; correct answers What is the difference between a declaration
and an assignment? Give examples.

When your Java class doesn't have the right data type for what you need. correct
answers When is the use of a cast operation necessary?

= is a Simple assignment operator while == is Equal to. correct answers Explain how =
is different than ==.

Written for

Course

Document information

Uploaded on
May 3, 2023
Number of pages
5
Written in
2022/2023
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$15.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
Governor001

Also available in package deal

Get to know the seller

Seller avatar
Governor001 Exam Questions
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 year
Number of followers
0
Documents
296
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions