<< Chapter < Page Chapter >> Page >

Answer 17

Question 18

When the plus operator (+) is used as a concatenation operator, what is the nature of its behavior if its left operand is of type String and its right operand is not of type String ? If the right operand is a variable that is not of type String , what is the impact of this behavior on that variable.

Answer 18

Question 19

Show and describe four unary arithmetic operators supported by Java.

Answer 19

Question 20

What is the type returned by relational operators in Java?

Answer 20

Question 21

Show and describe six different relational operators supported byJava.

Answer 21

Question 22

Show the output that would be produced by the Java application shown in Listing 2 .

Listing 2 . Listing for Question 22.
class relat01 { //define the controlling class public static void main(String[]args){ //define main System.out.println("The relational 6<5 is " + (6<5 )); System.out.println("The relational 6>5 is " + (6>5 )); }//end main}//End relat01 class. Note no semicolon required //End Java application

Answer 22

Question 23

Show and describe three operators (frequently referred to as conditional or logical operators) that are often combined with relational operators to construct more complex expressions (often called conditional expressions) . Hint: The || operator returns true if either the left operand, the right operand, or both operands are true. What are the other two and how do theybehave?

Answer 23

Question 24

Describe the special behavior of the || operator in the following expression for the case where the value of the variable a is less than the value of the variable b .

(a<b) || (c<d)

Answer 24

Question 25

Show the symbols used for the bitwise and operator and the bitwise inclusive or operator.

Answer 25

Question 26

Show and describe seven operators in Java that perform actions on the operands one bit at a time (bitwise operators) .

Answer 26

Question 27

True or false? In Java, the signed right shift operation populates the vacated bits with the zeros, while the left shift and the unsigned right shift populate the vacated bits with the sign bit. If your answer is False,explain why.

Answer 27

Question 28

True or false? In a signed right-shift operation in Java, the bits shifted off the right end are lost. If your answer is False, explain why.

Answer 28

Question 29

Using the symbols 1 and 0, construct a truth table showing the four possible combinations of 1 and 0. Using a 1 or a 0, show the result of the bitwise and operation on these four combinations of 1 and 0.

Answer 29

Question 30

Using the symbols 1 and 0 construct a truth table showing the four possible combinations of 1 and 0. Using a 1 or a 0, show the result of the bitwise inclusive or operation on these four combinations of 1 and 0.

Answer 30

Question 31

Using the symbols 1 and 0 construct a truth table showing the four possible combinations of 1 and 0. Using a 1 or a 0, show the result of the bitwise exclusive or operation on these four combinations of 1 and 0.

Answer 31

Question 32

True or false? For the exclusive or , if the two bits are different, the result is a 1. If the two bits are the same, the result is a 0. If youranswer is False, explain why.

Questions & Answers

what is mutation
Janga Reply
what is a cell
Sifune Reply
how is urine form
Sifune
what is antagonism?
mahase Reply
classification of plants, gymnosperm features.
Linsy Reply
what is the features of gymnosperm
Linsy
how many types of solid did we have
Samuel Reply
what is an ionic bond
Samuel
What is Atoms
Daprince Reply
what is fallopian tube
Merolyn
what is bladder
Merolyn
what's bulbourethral gland
Eduek Reply
urine is formed in the nephron of the renal medulla in the kidney. It starts from filtration, then selective reabsorption and finally secretion
onuoha Reply
State the evolution relation and relevance between endoplasmic reticulum and cytoskeleton as it relates to cell.
Jeremiah
what is heart
Konadu Reply
how is urine formed in human
Konadu
how is urine formed in human
Rahma
what is the diference between a cavity and a canal
Pelagie Reply
what is the causative agent of malaria
Diamond
malaria is caused by an insect called mosquito.
Naomi
Malaria is cause by female anopheles mosquito
Isaac
Malaria is caused by plasmodium Female anopheles mosquitoe is d carrier
Olalekan
a canal is more needed in a root but a cavity is a bad effect
Commander
what are pathogens
Don Reply
In biology, a pathogen (Greek: πάθος pathos "suffering", "passion" and -γενής -genēs "producer of") in the oldest and broadest sense, is anything that can produce disease. A pathogen may also be referred to as an infectious agent, or simply a germ. The term pathogen came into use in the 1880s.[1][2
Zainab
A virus
Commander
Definition of respiration
Muhsin Reply
respiration is the process in which we breath in oxygen and breath out carbon dioxide
Achor
how are lungs work
Commander
where does digestion begins
Achiri Reply
in the mouth
EZEKIEL
what are the functions of follicle stimulating harmones?
Rashima Reply
stimulates the follicle to release the mature ovum into the oviduct
Davonte
what are the functions of Endocrine and pituitary gland
Chinaza
endocrine secrete hormone and regulate body process
Achor
while pituitary gland is an example of endocrine system and it's found in the Brain
Achor
what's biology?
Egbodo Reply
Biology is the study of living organisms, divided into many specialized field that cover their morphology, physiology,anatomy, behaviour,origin and distribution.
Lisah
biology is the study of life.
Alfreda
Biology is the study of how living organisms live and survive in a specific environment
Sifune
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Object-oriented programming (oop) with java. OpenStax CNX. Jun 29, 2016 Download for free at https://legacy.cnx.org/content/col11441/1.201
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Object-oriented programming (oop) with java' conversation and receive update notifications?

Ask