<< Chapter < Page Chapter >> Page >

Back to Question 20

Answer 19

The name of the primitive type begins with a lower-case letter and the name of the wrapper type begins with an upper-case letter such as double and Double . Note that in some cases, however, that they are not spelled the same. For example, the Integer class is the wrapper for type int .

Back to Question 19

Answer 18

Wrapper classes

Back to Question 18

Answer 17

This has some ramifications as to how variables can be used (passing to methods, returning from methods, etc.) . For example, all variables of primitive types are passed by value to methods meaning that the code in the method only has access to a copy of the variable and does not have the abilityto modify the variable.

Back to Question 17

Answer 16

False. Primitive data types in Java (int, double, etc.) are not true objects.

Back to Question 16

Answer 15

True.

Back to Question 15

Answer 14

False. The char type in Java is a 16-bit Unicode character.

Back to Question 14

Answer 13

  • byte
  • short
  • int
  • long
  • float
  • double
  • char
  • boolean

Back to Question 13

Answer 12

Primitive types contain a single value.

Back to Question 12

Answer 11

Java supports both primitive types and reference (or object) types.

Back to Question 11

Answer 10

In Java, a variable of a specified type is represented exactly the same way regardless of the platform on which the application or applet is being executed.

Back to Question 10

Answer 9

False. In Java, all variables of type int contain signed values.

Back to Question 9

Answer 8

All variables in Java must have a defined type . The definition of the type determines the set of values that can be stored in the variable and theoperations that can be performed on the variable.

Back to Question 8

Answer 7

The syntax is shown in boldface below:

public static void main( String[] args )

In this case, the type of variable declared is an array of type String named args (type String[]) . The purpose of the String array variable in the argument list is to make it possible to capture arguments entered on the commandline.

Back to Question 7

Answer 6

False. Fortunately, Java provides very strict type checking and generally refuses to compile statements with type mismatches.

Back to Question 6

Answer 5

int firstVariable, secondVariable = 10;

Back to Question 5

Answer 4

False: In Java, it is possible to initialize the value of a variable when it is declared, but initialization is not required. (Note however that in some situations, the usage of the variable may require that it be purposely initialized.) .

Back to Question 4

Answer 3

To use a variable, you must notify the compiler of the name and the type of the variable (declare the variable).

Back to Question 3

Answer 2

variable

Back to Question 2

Answer 1

Listing 2 . Listing for Answer 1.
/*File simple4.java This application reads characters from the keyboard untilencountering the # character and echoes each character to the screen. The program terminates when the user entersthe # character. **********************************************************/class simple4 { //define the controlling class public static void main(String[]args) throws java.io.IOException {int ch1 = 0; System.out.println("Enter some text, terminate with #"); while( (ch1 = System.in.read() ) != '#')System.out.print((char)ch1); System.out.println("Goodbye");}//end main }//End simple4 class.

Back to Question 1

Miscellaneous

This section contains a variety of miscellaneous information.

Housekeeping material
  • Module name: Jb0200r: Review: Variables
  • File: Jb0200r.htm
  • Published: 11/23/12
Disclaimers:

Financial : Although the Connexions site makes it possible for you to download aPDF file for this module at no charge, and also makes it possible for you to purchase a pre-printed version of the PDF file, youshould be aware that some of the HTML elements in this module may not translate well into PDF.

I also want you to know that, I receive no financial compensation from the Connexions website even if you purchase the PDF version ofthe module.

In the past, unknown individuals have copied my modules from cnx.org, converted them to Kindle books, and placed them for sale onAmazon.com showing me as the author. I neither receive compensation for those sales nor do I know who does receive compensation. If youpurchase such a book, please be aware that it is a copy of a module that is freely available on cnx.org and that it was made andpublished without my prior knowledge.

Affiliation : I am a professor of Computer Information Technology at Austin Community College in Austin, TX.

-end-

Questions & Answers

does psychology deal with love?
Mohammed Reply
Maybe, i think
edem
I definitely would say yes
Clara
how so
Isaiah
*triarchic
Meredith
there are so many different reasons why you can fall in love with someone, many of them develope subconsciously -> psychology
Clara
love messes with the brain, a lot, ergo I believe that Psychology does indeed deal with love
what is synapse
Katie Reply
In the central nervous system, a synapse is a small gap at the end of a neuron that allows a signal to pass from one neuron to the next. synapse are found where nerve cells connect with other nerve cells
Najeem
can you do auto book auto
Mariah Reply
WHT u mean?
usef
yes
MD
heyy, may i join the conversation please?
edem Reply
who is the father of psychology
Richy Reply
aristatil
Ramadevi
and please, how would you guys, describe the study of psychology at college ?
edem
psychologist student?
Aspen
i mean not yet but am about to start college so wanna know how is it(college in general and psychology course) please
edem
Psychology is the study of mind and behaviour. So if you will take psychology as a subject so you will get to know how your everything (physical, mental, social, spiritual aspects) effects your behaviour
sakina
With this brief knowledge you can help people to cope up with their problems and only you can guide them correctly
sakina
And if you go for further specialisations you can study hypnosis, face reading, body language etc
sakina
Thanks a lot🙏🏾 And ik some of the stuffs u said but i am also going to write thesis, right ?
edem
ok no prob, thanks a lot🙏🏾✨
edem
cerebellum
Khan
hae everyone, hope you are well this evning my question is what is the difference between drive and motivation
Michael
good question
Rainee
drive is more like an impulse or urge and i think they both go together (drive and motivation) even if there is a slight difference
edem
@ Michael Drive is delivered to be innate without the use of an external stimuli, motivation normally evolves an outside stimuli which may include praise, appreciate, or reward.
Reginald
*believed...sorry for typo
Reginald
@Reginald, can't the motivation come from the inner self?
edem
Good question, please give an example.
Reginald
can we say desire of success for example
edem
Wilhelm Wundt is the father of psychology
ipau
Wilhem Wundt thank you for the road that you opened.
Qwanta
You mean who is the father of having a great educated argumentative guess? nothing is more wrong than this question. The question is you should ask yourselfs is, how sure are you abour their scientific studying? one's percieved assimilated approach to judging another person and saying they are
Roger
the biggest problem with scientific research and data is that ya you could get the same result 1000 times then it could go the other way 1000 times, but we would never know that and we did, we would still say ya but the proof is there. The only thing science proves is that humanity has
Roger
no facts about human behavior in the scientific context, but more in the trial and error.. sorry to tell you, but so far no one has proven Father of anything, thats up to you and i, judgement is bias, science is good enough lazy
Roger
cognitive development is the growing and development of the brain.
Jessy Reply
Anyone knows about Techno-fascism?
Hussein Reply
Ecofascism is a theoretical political model in which an authoritarian government would require individuals to sacrifice their own interests to the "organic whole of nature". The term is also used as a rhetorical pejorative to undermine the environmental movement.
ipau
what's the big difference between prejudice and discrimination?
Danice Reply
A prejudiced person may not act on their attitude.  Therefore, someone can be prejudiced towards a certain group but not discriminate against them.  Also, prejudice includes all three components of an attitude (affective, behavioral and cognitive), whereas discrimination just involves behavior
Nancy Lee
hi
basher
hello
Rahul
what is all about cognitive development?
Kamohelo
cognitive development is the growing and development of the brain
Jessy
how do you control a variable when using spss whilst running a pearsons correlation analysis?
Jessie Reply
it dependa on your study. according to what you want to say and explain your result
Pouran
why does it say her and she
Jayla Reply
stages of cognitive development
brivia Reply
sensory preoperatinal concrete formal
Rajendra
what is psychology
Chethani Reply
the study of insecurities and the effect on the host .
Sera
Psychology is the scientific study of behavior & mental processes
Angela
psychology is science about learning human behaviour
Zhamshid
behaviorosm
Khan
In thinking about the case of Candace described earlier, do you think that Candace benefitted or suffered as a result of consistently being passed on to the next grade?
Nene Reply
what is reward
Angeles Reply
reward is a technique to change behaviour
Rajendra
Reward is a way to promote a specific behaviour or to teach someone/ something to behave a specific way or perform a specific task.
Johan
a reward is something that is usually associated with desirable behavior. The child got a reward for winning the game. A reinforcer is different in that a reinforcer is anything that increases behavior, even if it is increasing an undesirable behavior.
Meredith
reward is earned effort realized
freweini
why heroine addicted people smoke heroine in a dirty and polluted place ?
Najeem Reply
?
Sera
?
Sera
G
ky
/i don't know
Rajendra
🤔
Hammam
I believe they don't wanna be seen
Ruphine
Rajendra Singh I'm asking from those who know thanks for your comment
Najeem
Ruphine it's not a scientific answer
Najeem
Ok
Ruphine
more my personal opinions and experiences than a real answer but more of an answer than the question marks
Jehsika
what's the data or fact that actually say that heroine smokers host in dirty and polluted place.
amaan
Generally the more time an addict is using and the harder they use the more their life and everything around them crumbles. it's quite common to find neat respectable clean users but over time the addiction increases and their health declines along with their ability to keep up day to day duties.
Jehsika
I'll see if I can find some links for you to have a read.
Jehsika
hi. as heroine affedted exactly on the brain, it should be because the chages heroine makes on frintal lobe and sensory and motor parts. after a while the cannot behave in a normal way. in a way heroine ruines the neurones
Pouran
The things said in the thread are some of the most horridly presumptuous & unwarrantedly pretentious statements I've read in my entire life. It's distastefully disrespect, to say the least.
Kaytee
Pouran Hi! thanks for answering I'm agree with your opinion and may the answer be the same
Najeem
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