<< Chapter < Page Chapter >> Page >
This module contains review questions and answers keyed to the module titled Jb0200: Java OOP: Variables.

Revised: Mon Mar 28 13:31:46 CDT 2016

This page is included in the following Books:

Table of contents

Preface

This module contains review questions and answers keyed to the module titled Jb0200: Java OOP: Variables .

The questions and the answers are connected by hyperlinks to make it easy for you to navigate from the question to the answer and back again.

Questions

Question 1 .

Write a Java application that reads characters from the keyboard until encountering the # character. Echo each character to the screen as it is read.Terminate the program when the user enters the # character.

Answer 1

Question 2

What is the common name for the Java program element that is used to contain data that changes during the execution of the program?

Answer 2

Question 3

What must you do to make a variable available for use in a Java program?

Answer 3

Question 4

True or false? In Java, you are required to initialize the value of all variables when they are declared.

Answer 4

Question 5

Show the proper syntax for declaring two variables and initializing one of them using a single Java statement.

Answer 5

Question 6

True or false? The Java compiler will accept statements with type mismatches provided that a suitable type conversion can be implemented by the compiler atcompile time.

Answer 6

Question 7

Show the proper syntax for the declaration of a variable of type String[] in the argument list of the main method of a Java program and explain its purpose.

Answer 7

Question 8

Describe the purpose of the type definition in Java.

Answer 8

Question 9

True or false? Variables of type int can contain either signed or unsigned values.

Answer 9

Question 10

What is the important characteristic of type definitions in Java that strongly supports the concept of platform independence of compiled Java programs?

Answer 10

Question 11

What are the two major categories of types in Java?

Answer 11

Question 12

What is the maximum number of values that can be stored in a variable of a primitive type in Java?

Answer 12

Question 13

List the primitive types in Java.

Answer 13

Question 14

True or false? Java stores variables of type char according to the 8-bit extended ASCII table.

Answer 14

Question 15

True or false? In Java, the name of a primitive variable evaluates to the value stored in the variable.

Answer 15

Question 16

True or false? Variables of primitive data types in Java are true objects.

Answer 16

Question 17

Why do we care that variables of primitive types are not true objects?

Answer 17

Question 18

What is the name of the mechanism commonly used to convert variables of primitive types to true objects?

Answer 18

Question 19

How can you tell the difference between a primitive type and a wrapper for the primitive type when the two are spelled the same?

Questions & Answers

learning is facilitated by
Quitta Reply
What
Angel
What is Repression?
Sharmin Reply
Repression, In psychoanalytic theory, the exclusion of distressing memories, thoughts, or feelings from the conscious mind. Often involving sexual or aggressive urges or painful childhood memories, these unwanted mental contents are pushed into the unconscious mind.
Forqan
in psychoanalytic terms a basic defense mechanism that shuts out anxiety arousing thoghts feelings and memories from one consciousness
Berrel
Repression is holding something painful inside because you're afraid to let it out for fear of what trouble it might csuse
Connie
It helps students to understand the behavior of people they encounter.
Anjonette Reply
what are the types of learning?
Ogbeyemi Reply
auditory, visual, kinesthetic, reading/writing
frederick
thanks @Frederick. But I still want to understand something. Classical conditioning, Operants conditioning and Observational learning are not types of learning?
Ogbeyemi
I believe there are several types of learning besides just the four I mentioned.
frederick
so, I can also say those I mentioned are part of learning?
Ogbeyemi
i would say so
frederick
Operant conditioning is a type of associative learning process through which the strength of a behavior is modified by reinforcement or punishment.
Forqan
what is psychology
Mukoone Reply
in simple explanation, it is the study and understanding of the human behavior
Edmar
the scientific study of the human mind and its functions, especially those affecting behaviour in a given context.
naina
the scientific study of human mind and behaviour
NishaOfficial
but I thought psychology is not limited to humans. I think it is the scientific study of behavior and mental process of organisms
Ogbeyemi
processes*
Ogbeyemi
what happened to my reply?
Trish
the study of human behavior, the reasons for the behavior, and ways to change the undesirable behaviors into desirable behaviors
RD
psychology is the study of the soul or mind of man through scientific studies relating to environmental factors and human behaviours.
Audley
not only man but animals as well
Audley
psychology is the study of the mind and behaviors*
Emely
the definition you gave Audley is incorrect
Emely
Hey Audley, also humans are animals, so the correct way to say it is.. Not only man but other animals as well. 👍🏽
Emely
Audley, you are both correct in the definition of psychology. Yours was textually from the book, while the other was simple and to the heart of it where a novice would understand.
Bosie
Emely, you stated that man is a animal as well. Explain?
Bosie
_____are the memory images that are related to particular place ,date and time .
Raghav Reply
what is psychology
Ayado Reply
can join your discussions
Ayado
he or she can
Edward
I have been wondering of minor Autism I have estrange daughter that has I have been divorced and things like the ex wife sister told bad things about Me, Which I was not there to defend my self was said. one part) the other is the ex wife mom took care of her and never gave her kind of up bringing
Edward
Much and now she is 28 has a pension cause of her Autism she has everyone like her 2brothers her mom and her father had said to go on andfor-get the past she had not wanting to only seen her once I tried to make contact online she does not my contact from G circle
Edward
too bad
Ibrahim
God bless you Edward 🙏 I pray that God heals you and your family he will make things right
Joseph
Ibrahim it's too bad you couldn't take the time to give encouragement to your brother with a few more positive words at the end were all brothers and sisters in Christ 🙏
Joseph
what is rootology
Glory Reply
Rootology is a blend of 13 concentrated herbal extracts that support against sneezing, congestion, sinus pressure, runny nose, itchy watery eyes, and headache.
Labdhee
a child playing with the friend without complaining is called
Valerie Reply
free child
Nisha
psycosocial development
Anita
playful & sporty child
Jaga
The scope of Experimental Psychology is widening with the invention of new tools and instruments for experiments.
Den Reply
like what kind?
MissRoyal
hello, what kind of people talk throught here
Marcela Reply
the kind looking for answers
Juan
?
John
thought is autonomous. it is up to us compartmentalizing these random various thoughts that we too often incorrectly give them the title of (ideas)
John
what is the scope of experimental psychology?
Fareha
who is pavlo
ROGATH Reply
he believed in classic conditioning
just
he created classical conditioning
naina
Ivan Petrovich Pavlov was a Russian physiologist known primarily for his work in classical conditioning.
lavanya
he developed the theory is classical conditioning on a dog
NishaOfficial
Hello... Gyatri, angel and thinker.. I am MJ.
Mujtaba Reply
hi
naina
Hello
Jeanica
How are you...?
Mujtaba
Fine
Jeanica
Where are you from?
Jeanica
hi everyone 😊
Luis
I'm not trying to be a killjoy but I don't think this is a conversation thread for meeting new people.
Aspen
there are plenty of apps for that
Aspen
hai
kumpulan
@Aspen German well you're right there are other apps that offers ways into meeting new people. however I don't see anything wrong in here? just saying hi and hello.
Luis
but if they turn it into something like a "dating app" then for me that's another story. just saying. 😊.
Luis
hello Everyone
artgalang
Hello Luis, this app is for friends to everyone. 😊🙏
Jeanica
Anyone having problem can leave
Mujtaba
Hi
Red
Hi
Esther
Hello
Jeanica
hello^^
Girlie
is this a Psychology Course GC?
artgalang
Hi I'm from Philippines 🇵🇭
Esther
hellow
Erick
Can anyone.... What is basic criteria for abnormalities...?
Mujtaba
Is here any psychologist or psychiatrist.
Mujtaba
hi Jeanica yes I know that 😊
Luis
hello
Fermin
yes psychologist I am
kirti
me too
artgalang
Can you please explain me Diathesis stress model and its application
Mujtaba
And how can it applied..
Mujtaba
What is randomization
Joseph Reply
definition of stimulus
Thomas Reply
an idea, object or effect via the help of a mediational process which elicits a response
Wayne
Researchers demonstrated that the hippocampus functions in memory processing by creating lesions in the hippocampi of rats, which resulted in ________.
Mapo Reply
The formulation of new memories is sometimes called ________, and the process of bringing up old memories is called ________.
Mapo Reply
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get the best Algebra and trigonometry course in your pocket!





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