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
Document preview thumbnail
Preview 2 out of 7 pages
Exam (elaborations)

JAVA PROGRAMMING EXAM QUESTIONS WITH 100% VERIFIED ANSWERS

Document preview thumbnail
Preview 2 out of 7 pages

JAVA PROGRAMMING EXAM QUESTIONS WITH 100% VERIFIED ANSWERS

Content preview

JAVA PROGRAMMING EXAM
QUESTIONS WITH 100%
VERIFIED ANSWERS

While - Answer- a period of time marked by a condition, i.e. Stay here while I go see the
doctor.

Return - Answer- a statement which gives the output of the specific task. This will be
used when you implement the conditional statement.

Public - Answer- accessible or shared by all members, i.e. I went into the public
restroom.

Static - Answer- not moving, i.e. The static content on the screen did not move.

single line comment - Answer- //......

multi line comment - Answer- /**....**/

boolean - Answer- a one-bit value (one digit) represented true or false, 1 or 0

float - Answer- a 4-byte value that represents values from 1.40129846432481707 x 10-
45 to 3.4028234

identifier - Answer- must start with a letter. It can be followed by a combination of
numbers and two allowed special characters: underscore '_' and dollar sign '$'. When
naming identifiers you need to be careful not to use any Java keywords.

assignment operator - Answer- As its name, an assignment operator assigns a value to
a variable. An assignment operator is represented by an equal sign. (X=5) With an
assignment operator, Java runs the program from the right side to the left side. All other
operators are evaluated from left to right.

arithmetic operators - Answer- Addition +
Subtraction -
Multiplication *
Division /
Modulo Division %

relational operators - Answer- Greater Than >
Less Than <

, Greater Than or Equal To >=
Less Than or Equal To <=
Equal To ==
Not Equal To !=

logical operators - Answer- These operators are used to evaluate two expressions. The
evaluation stops as soon as the result is known.
&& AND
|| OR
! NOT

&& operator - Answer- This logical operator represents the logical operation AND in
Java. This expression shows the result true if both its operands have the same value
and false if not.
X Y X&&Y
111
100
010
000
Note: 1 represents true, 0 represents false

|| operator - Answer- This operator represents the logical operation OR in Java. This
expression shows the result false only if both its operands have the same value, and
true even if one value is satisfied.
X Y X||Y
111
101
011
000
Note: 1 represents true, 0 represents false

! operator - Answer- ! represents the logical operation NOT. In this type of operator the
result is the opposite of the first operand.
X Y X!
110
100
011
001
Note: 1 represents true, 0 represents false
In this operation, if X is true then the resulting value will be false.
This logical operator is used primarily to construct multiple conditional statements.

bitwise operators - Answer- Anything and everything in the computer's memory is stored
as a bit represented by 1s and 0s. So, the machine language of a computer is 1 and 0.
It's that simple. Programmers use bitwise operators to manipulate these bits.
& Exclusive AND

Document information

Uploaded on
September 12, 2025
Number of pages
7
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$16.49

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.
wisdompoint
3.6
(19)
Sold
120
Followers
66
Items
5740
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