CSE 110 FINAL PAPER 2026 QUESTIONS WITH ANSWERS GRADED A+, Exams of Java Programming

CSE 110 FINAL PAPER 2026 QUESTIONS WITH ANSWERS GRADED A+

Typology: Exams

2025/2026

Available from 10/12/2025

FocusFile7
FocusFile7 🇺🇸

4

(8)

27K documents

1 / 15

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CSE 110 FINAL PAPER 2026 QUESTIONS WITH
ANSWERS GRADED A+
In java, functions are called . Answer: methods
The Java statement counter++ will . Answer: add 1 to the variable
count
To help us collect information from the user through the keyboard in
Java, we use a . Answer: Scanner
Every Java program consists of at least one . Answer: class definition
Which of the following are characteristics of the python programming
language . Answer: compiled
interpreted
A name defined in an outer scope is also available in all blocks nested
inside that scope . Answer: True
Operation are things an object . Answer: does
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download CSE 110 FINAL PAPER 2026 QUESTIONS WITH ANSWERS GRADED A+ and more Exams Java Programming in PDF only on Docsity!

CSE 110 FINAL PAPER 2026 QUESTIONS WITH

ANSWERS GRADED A+

◉In java, functions are called. Answer: methods ◉The Java statement counter++ will. Answer: add 1 to the variable count ◉To help us collect information from the user through the keyboard in Java, we use a. Answer: Scanner ◉Every Java program consists of at least one. Answer: class definition ◉Which of the following are characteristics of the python programming language. Answer: compiled interpreted ◉A name defined in an outer scope is also available in all blocks nested inside that scope. Answer: True ◉Operation are things an object. Answer: does

◉An object's attributes are implemented as. Answer: variables ◉In Java class members are declared with the keyword. Answer: static ◉A default constructor takes _____ arguments. Answer: 0 ◉Java boolean literal values are expressed in all lowercase. Answer: True ◉The java expression like the one below will evaluate to ________. new Bunny("Flopsy", 8). Answer: an object reference ◉A reference type variable stores a _____________. Answer: reference ◉If a reference type variable does not store a reference to an object, then it stores __________.. Answer: a null reference ◉All of the Java primitive types are _______.. Answer: value types ◉The two kinds of types in the Java programming language are ___________.. Answer: value and reference types

◉Which method can be called to remove all elements from an ArrayList at once?. Answer: clear ◉Which method can be used to remove an element from an ArrayList?. Answer: remove ◉Java ArrayLists are like re-sizable arrays. Answer: True ◉Which method can be used to insert an element into an ArrayList?. Answer: add ◉Only an enhanced for loop can be used to iterate over an ArrayList. Answer: False ◉Which object oriented element is used to define "is a" relationships?. Answer: Answered: Encapsulation, Message Passing, Polymorphism, Composition ◉Which object oriented element is used to define "has a" relationship?. Answer: Answered: Data Hiding ◉Which object oriented element is best defined as "an object should have complete authority over its responsibilities"?. Answer: Answered: Inheritance, Encapsulation

◉We can more easily debug a program when the responsibilities are well encapsulated. Answer: True ◉An advantage of composition is the fact that we can sometimes reuse classes that we have already written, instead of having to design and write new classes.. Answer: True ◉Data hiding can allow us to separate the information from its representation.. Answer: True ◉Java uses the same operator for exponentiation as Python. Answer: False ◉Which of the following are characteristics of the Java programming language?. Answer: none of these ◉Java uses the keyword ________ to return a value from a method. Answer: return ◉Method overloading distinguishes between methods based on. Answer: data types of arguments and number of arguments

◉Arrays cannot be passed as arguments to methods in Java.. Answer: False ◉Which of the following is/are true about arrays? Choose all that apply.

. Answer: an array is a set of variables ◉Which of the following correctly demonstrates the use of an array initializer list? Choose all that apply.. Answer: int[] my_array = {1, 2, 3, 4, 5}; ◉The first element of an array is located at index _____.. Answer: 0 ◉Which method can be used to replace an element in an ArrayList? Choose all that apply.. Answer: Answered: replace ◉The Java reference type equivalent of the primitive type int is _____.. Answer: Answered: integer, String ◉The Java String type is a reference type.. Answer: True ◉Which method can be used to add an element to an ArrayList? Choose all that apply.. Answer: answered: at, none of these ◉ArrayLists can only store reference types.. Answer: True

◉Which object oriented element is best supports object collaboration?. Answer: Message Passing ◉When doing an object oriented analysis of a problem, we call the ways that various kinds of users will use the system _____.. Answer: use cases ◉We can implement a getter method without a setter method, thus creating a read-only value.. Answer: True ◉Which object oriented element is best defined as "objects best viewed as packages of responsibility"?. Answer: Answered: composition ◉Methods used to access an object's private data are called _____.. Answer: getters and setters ◉Data hiding helps make encapsulation work.. Answer: True ◉In general, data hiding means that an object keeps what it knows private.. Answer: True ◉Java has a reference type equivalent for each primitive type. Answer: True

◉Immediately after the object's variables are placed in memory _____.

. Answer: Answered: the object is instantiated, the variables are destroyed, the object is destroyed ◉A value type variable can store a null reference in Java.. Answer: False ◉The first step in the object life cycle is _____.. Answer: instantiation ◉Which keyword is used in Java to define a class?. Answer: class ◉Which keyword is used in Java to create an object?. Answer: new ◉The Java keywords "public" and "private" are called _____.. Answer: access modifiers ◉An object's attributes are implemented as _____.. Answer: varaibles ◉Java has a string multiplication operator just like Python.. Answer: False ◉Which of the following are characteristics of the Java programming language?. Answer: Answered: interpreted and compiled

◉Which of the following is a Java primitive data type?. Answer: Answered: String,float, int boolean, double, ◉Creating an object of a class is called ________.. Answer: Answered: classification ◉When there are no remaining references to an object, the object will be _____.. Answer: destroyed ◉Which of the following would declare and instantiate an array of 5 integers in Java?. Answer: int[] my_array = new int[5]; ◉The idea of looping through an array (element-by-element) looking for some element that meets our criteria, is called a(n) _____.. Answer: linear search ◉When there are no remaining references to an object in your Java program, the object will be destroyed.. Answer: True ◉which of the following would instantiate an array of 5 integers in Java? Choose all that apply.. Answer: new int[5]

◉Which of the following expression would be a valid index for an array of 5 elements? Choose all that apply.. Answer: Answered: 2*2, 2+2 and 4 ◉When we instantiate an ArrayList we must specify the initial size.. Answer: False ◉Which method can be called to get the size (number of elements) of an ArrayList?. Answer: Answered: count ◉We can use square brackets and and index value to access ArrayLIst elements, just like arrays.. Answer: False ◉Encapsulation is about assigning responsibilities to objects.. Answer: True ◉Responsibilities that are very closely related can and should generally be assigned to a single object.. Answer: True ◉An object and the variable that refers to it are two different things.. Answer: True ◉A variable of a primitive type can never be empty.. Answer: True

◉In Java, a two dimensional array requires _____ indexes to access a specific element.. Answer: 2 ◉To declare or instantiate a specialized ArrayList, we must include a(n) _____ in the declaration or instantiation.. Answer: type parameter ◉In general, a setter method will take at least one argument. Answer: True ◉The most widely used modeling tool for software design and construction is _____.. Answer: answered: flowcharts, pseudocode ◉The first last in the object life cycle is _____.. Answer: destruction ◉Java ArrayLists are like resizable arrays.. Answer: True ◉During what activity do we directly analyze the language of the problem to identify objects, their attributes, and their behaviors?. Answer: Answered: class outlining, problem description ◉Immediately after the object's variables are initialized _____.. Answer: answered: the object is ready for use ◉Objects encapsulate state. Answer: True