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)

CSE 205 UPDATED ACTUAL Exam Questions and CORRECT Answers

Rating
-
Sold
-
Pages
24
Grade
A+
Uploaded on
20-08-2025
Written in
2025/2026

CSE 205 UPDATED ACTUAL Exam Questions and CORRECT Answers If no visibility modifier is defined for a method, the method will be treated as public by default and it can be accessed by any other classes from anywhere. - CORRECT ANSWER False - A wrapper class represents a particular primitive data type. In total there are 7 wrapper classes in Java, except the one for boolean data type. - CORRECT ANSWER - False The purpose of inheritance is "code reuse". i.e. instead of repeating similar data/method definitions in several classes, we can define one class with the common instance data/methods and let other classes inherit these data/methods. - CORRECT ANSWER - True

Show more Read less
Institution
CSE 205
Course
CSE 205

Content preview

CSE 205 UPDATED ACTUAL Exam
Questions and CORRECT Answers
If no visibility modifier is defined for a method, the method will be treated as public by default
and it can be accessed by any other classes from anywhere. - CORRECT ANSWER -
False


A wrapper class represents a particular primitive data type. In total there are 7 wrapper classes in
Java, except the one for boolean data type. - CORRECT ANSWER - False


The purpose of inheritance is "code reuse". i.e. instead of repeating similar data/method
definitions in several classes, we can define one class with the common instance data/methods
and let other classes inherit these data/methods. - CORRECT ANSWER - True


An aggregation relationship defines a "has-a" relationship, such as the relationship between class
Company and Address in our assignment #4. - CORRECT ANSWER - True


In software engineering, a walk through refers to a meeting in which several people carefully
review a design or section of code to see if the design satisfies requirement or the
implementation represents the design. - CORRECT ANSWER - True


ArrayList is a data structure that can only store one type of data inside. - CORRECT
ANSWER - False


In an inheritance relationship, a child class will inherit all instance variables and methods from
its parent's class. - CORRECT ANSWER - False


A child class can redefine an inherited method from the parent class, The new method must have
the same signature and return data type, we call this scenario method overloading. - CORRECT
ANSWER - False

,In java, there can only be one catch clause in a try-catch block. - CORRECT ANSWER -
False


In a Java program, if no exception is thrown in the try clause, program will continue with the
first following catch clause. - CORRECT ANSWER - False


Which of the following visibility modifiers should be used in the parent class when you try to
derive new sub classes from it? - CORRECT ANSWER - Protected



Which of the following is a valid Java identifier? - CORRECT ANSWER - first_test


Which of the following statement about exception handling is invalid? - CORRECT
ANSWER - We can only have one catch clause inside each try..catch block.



Which of the following statements is invalid? - CORRECT ANSWER - An abstract class
cannot contain static methods.


Which of the following boolean expressions is invalid? - CORRECT ANSWER - (1 < x <
10 ) && (y > -1)


Given two String objects s1 and s2, we should use which of the following to check whether they
contain exactly the same contents or not? - CORRECT ANSWER - if (s1.equals(s2) )


Which of the following is a valid overloaded method for the following methodA( )? public
double methodA(String name, char value1, int value2) - CORRECT ANSWER - public
int methodA(String custName, int input1)


Given the following two reference variables, which of the following assignment is invalid?
Object obj = new Object( );Customer aCustomer = new Customer("John Smith"); - CORRECT
ANSWER - aCustomer = obj;

, Which of the following keywords is used to refer to the methods and variables in a parent's
class? - CORRECT ANSWER - Super



DecimalFormat class is in which of the following package? - CORRECT ANSWER -
java.text


For the following program, enter "Wrong" if there are any errors on that line, otherwise enter
"Correct".
public class Sample {private int i;static int k = 0;
public Sample(int x) {
i = x; //---
}
public static void main(String[ ] args) {
int j = i; //---
int z = k + xMethod(); //---
}
public static int xMethod() {
i = i + k; //--- return i;
}

} - CORRECT ANSWER - Correct
Wrong
Correct
Wrong


Fill in the blank for the following program's output. Tab cover 3 empty spaces.
String line = "www.asu.edu/cse205/test1";
Scanner scan = new Scanner(line).useDelimiter("[/ .]");
while (scan.hasNext( ) ) {
String word = scan.next( );

Written for

Institution
CSE 205
Course
CSE 205

Document information

Uploaded on
August 20, 2025
Number of pages
24
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$13.49
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


Also available in package deal

Thumbnail
Package deal
CSE 205 Bundled Exam Questions WITH CORRECT Answers
-
25 2025
$ 118.89 More info

Get to know the seller

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.
MGRADES Stanford University
View profile
Follow You need to be logged in order to follow users or courses
Sold
1459
Member since
2 year
Number of followers
105
Documents
97742
Last sold
22 hours ago
MGRADES

Welcome to MGRADES ,Based at Stanford University in California. I guarantee success and you may end up coming back again and again. We do this for you . We offer the best study and exam materials for a wide range of courses and units. Make your study sessions more efficient and effective. Dive in and discover all you need to excel in your academic journey!

3.8

235 reviews

5
97
4
50
3
53
2
15
1
20

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