1
CSE 205 Exam 1 Questions with Correct
Answers | Updated (100% Correct Answers)
A java application always contains a single method, this method is
called? Give the
signature of this method. Answer: main
public static void main(String[] args)
How is data given to this parameter? Answer: Through a command
line interface. For example: java someCompiledClass data
Identifiers can only begin with? Answer: Letters, underscores, dollar
sign
Is Java a Functional Language, Procedural Language, Object-
Oriented Language, or
Logic Language? Answer: Object-Oriented
What does API stand for? Answer: Application Programmer
Interface
What needs to be done to use the scanner class? Answer: import
java.util.Scanner;
© 2025 All rights reserved
, 2
What's the difference between println, and print Answer: println
ends with a line break
What is Encapsulation? Answer: The hiding of design decisions in a
computer program that are most likely to
change, thus protecting other parts of the program from change if
the design
decision is changed.
The variables contained in an object should be modified only within
the object
What are the three visibility modifiers and what is their scope?
Answer: public: can be accessed from anywhere
private: can only be accessed from inside the class
protected: the member can only be accessed within its own package
(as with
package-private) and, in addition, by a subclass of its class in
another package.
What is the purpose of toString()? Answer: The purpose is to give a
readable representation of the object.
© 2025 All rights reserved
CSE 205 Exam 1 Questions with Correct
Answers | Updated (100% Correct Answers)
A java application always contains a single method, this method is
called? Give the
signature of this method. Answer: main
public static void main(String[] args)
How is data given to this parameter? Answer: Through a command
line interface. For example: java someCompiledClass data
Identifiers can only begin with? Answer: Letters, underscores, dollar
sign
Is Java a Functional Language, Procedural Language, Object-
Oriented Language, or
Logic Language? Answer: Object-Oriented
What does API stand for? Answer: Application Programmer
Interface
What needs to be done to use the scanner class? Answer: import
java.util.Scanner;
© 2025 All rights reserved
, 2
What's the difference between println, and print Answer: println
ends with a line break
What is Encapsulation? Answer: The hiding of design decisions in a
computer program that are most likely to
change, thus protecting other parts of the program from change if
the design
decision is changed.
The variables contained in an object should be modified only within
the object
What are the three visibility modifiers and what is their scope?
Answer: public: can be accessed from anywhere
private: can only be accessed from inside the class
protected: the member can only be accessed within its own package
(as with
package-private) and, in addition, by a subclass of its class in
another package.
What is the purpose of toString()? Answer: The purpose is to give a
readable representation of the object.
© 2025 All rights reserved