• 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 3 out of 18 pages
Exam (elaborations)

Java Latest Questions and Correct Answers

Document preview thumbnail
Preview 3 out of 18 pages

Java Latest Questions and Correct Answers

Content preview

Page 1



Java Latest Questions and Correct
Answers
What do real world objects contain?

Ans: state and behavior


Where is a software object's state contained?

Ans: fields (Java) or variables (C++)


Where is a software object's behavior exposed?

Ans: methods (Java) or functions (C++)


Hiding internal data from the outside world, and accessing it
only through publicly exposed methods is known as data...

Ans: encapsulation


A blueprint for a software object is called a...

Ans: class


Common behavior can be defined in a ___ and inherited into
a ___ using the ___ keyword.

Ans: superclass, subclass, extends

, Page 2


A collection of methods with no implementation is called an
___.

Ans: interface


A namespace that organizes classes and interfaces by
functionality is called a ___.

Ans: package


The term API stands for ___?

Ans: application programmer interface


The term "instance variable" is another name for...

Ans: non-static field - instance variables are specific to
an object


The term "class variable" is another name for ___.

Ans: static field - class variables are fixed and global
across all instances of the class


A local variable stores temporary state; it is declared inside a
___.

Ans: method - for example a counter in a loop int i=0;

, Page 3


A variable declared within the opening and closing
parenthesis of a method signature is called a ____.

Ans: parameter


What are the eight primitive data types supported by the
Java programming language?

Ans: byte
short
long
float
double
int
char
boolean


Character strings are represented by the class ___.

Ans: java.lang.String


An ___ is a container object that holds a fixed number of
values of a single type.

Ans: array


Consider the following code snippet.

Document information

Uploaded on
May 2, 2025
Number of pages
18
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$13.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.
Ivie
3.6
(8)
Sold
35
Followers
1
Items
8504
Last sold
1 month 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