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
Document preview thumbnail
Preview 2 out of 6 pages
Exam (elaborations)

Java Chapter 7 Test Questions and Answers| 100% Solved

Document preview thumbnail
Preview 2 out of 6 pages

Java Chapter 7 Test Questions and Answers| 100% Solved

Content preview

Java Chapter 7 Test Questions and Answers|
100% Solved
A sequence of characters enclosed within double quotation marks is a _____. ✔️✔️literal string


To create a String object, you can use the keyword _____ before the constructor call, but you
are not required to use this format. ✔️✔️new


A String variable name is a _____ which is a variable that holds a memory address.
✔️✔️reference


The term that programmers use to describe objects that cannot be changed is _____.
✔️✔️immutable



Which of the following is not a commonly used Character method? ✔️✔️toUpper()



The Character class is defined in _____. ✔️✔️java.lang


The method that determines whether two String objects are equivalent, regardless of case, is
_____. ✔️✔️equalsIgnoreCase()



A String is an example of an object that can't be changed, also known as _____. ✔️✔️immutable


A String variable that does not yet hold a memory address is known as a(n) _____ String.
✔️✔️null



The actual length of the _____ is the capacity of the StringBuilder object. ✔️✔️buffer

, If String movie = new String("West Side Story");, the value of movie.indexOf(′s′) is _____. ✔️✔️2



The String class replace() method replaces _____. ✔️✔️every occurrence of a character in a
String with another characte



The toString() method converts a(n) _____ to a String. ✔️✔️all of the above:
float
b. char
d. in



Joining Strings with a '+' is called _____. ✔️✔️concatenation



The first position in a String _____. ✔️✔️is position zero



The method that extracts a string from within another string is _____. ✔️✔️substring()



The method parseInt() converts a(n) _____. ✔️✔️String to an integer



The difference between int and Integer is _____. ✔️✔️int is a primitive type; Integer is a class


For an alternative to the String class, and so you can change a String's contents, you can use
_____. ✔️✔️StringBuilder


Unlike when you create a String, when you create a StringBuilder, you must use the keyword
_____. ✔️✔️new



A String variable name is not a simple data type. ✔️✔️True

Document information

Uploaded on
March 21, 2025
Number of pages
6
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$8.49

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

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
KateJones
4.8
(12)
Sold
31
Followers
0
Items
5707
Last sold
1 week ago




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