• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 12 pages
Exam (elaborations)

CSCI A201 JAVA Midterm Exam fully solved 2025(graded A+).

Document preview thumbnail
Preview 2 out of 12 pages

CSCI A201 JAVA Midterm Exam fully solved 2025(graded A+).

Content preview

CSCI A201 JAVA Midterm Exam
fully solved 2025(graded A+)
Given


String name;


the value of name is directly stored in its memory space. - answer
False


String objects are immutable. - answer True


Contents of the java.util package do not need to be imported into a
program in order to be used. - answer False


In order to use a predefined method, you simply need to know the
name of the method. - answer False


The method length in the class String returns the number of
characters in the string including whitespace characters. - answer
True


The method printf is used only to format the output of decimal
numbers. - answer False


The default output of decimal numbers of the type float is up to 15
decimal places. - answer False


A string consisting of only an integer or a floating-point number is
called a numeric string. - answer True

, The method parseInt is used to convert a numeric integer string into
a value of the type double. - answer False


The classes Integer, Float, and Double are not wrapper classes. -
answer False


Which of the following is a valid statement? - answer String name =
"Doe";


In Java, all variables declared using a class are ____. - answer
reference variables


Suppose str is a String variable. The statement
str = new String("Hello World");


is similar to which of the following? - answer str = "Hello World";


Which statement instructs a program to run the garbage collector? -
answer System.gc();


Suppose that str is a String variable. Write a Java statement that
uses the operator new to instantiate the object str and assign the
string "Java Programming" to str. - answer str = new String ("Java
Programming");


There are ____ types of methods in a class. - answer 2


Which package is automatically imported by the Java system? -
answer java.lang


What is the value of the following statement?

Document information

Uploaded on
December 24, 2024
Number of pages
12
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$14.99

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.
GUARANTEEDSUCCESS
4.3
(253)
Sold
691
Followers
314
Items
24783
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