Question 16
True or false? With a floating point type, positive exponent values mean that the decimal point should be shifted to the left. Negative exponent values meanthat the decimal point should be shifted to the right.
Question 17
True or false? Java supports two different floating point types:
- float
- double
Question 18
True or false? The purpose of the char type is to make it possible to represent the letters of the alphabet, the punctuation characters,and the numeric characters internally in the computer. This is accomplished by assigning a numeric value to each character.
Question 19
True or false? The char type uses a standard character representation known as Unicode to represent up to 65,535 different characters.
Question 20
True or false? In Java, you usually represent a character in your program by surrounding it with quotation marks as shown below:
"A".
Question 21
True or false? The boolean type can have three values:
- true
- false
- maybe
Question 22
True or false? Java is an extensible programming language, meaning that there is a core component to the language that is always available. Beyondthe core component, different programmers can extend the language in different ways to meet their individual needs.
Question 23
True or false? As is the case in C++, one of the ways that individual programmers can extend the Java language is to create overloaded operators forthe primitive types.
Question 24
True or false? One of the ways that individual programmers can extend the Java language is to create new types.
Question 25
True or false? The specific Java mechanism that makes it possible for programmers to define new types is a mechanism known as the class definition .
What is the meaning of the following two images?
This image was inserted here simply to insert some space between the questions and the answers to keep them from being visible on the screen at thesame time.
The image is also an example of the kinds of things that we do in my course titled ITSE 2321, Object-Oriented Programming.
This image was also inserted for the purpose of inserting space between the questions and the answers.
Answers
Answer 25
True.
Answer 24
True.
Answer 23
False. Java does not allow programmers to create overloaded operators for the primitive types.
Answer 22
True.
Answer 21
False. The boolean type can have only two values:
- true
- false
Answer 20
False. In Java, you usually represent a character in your program by surrounding it with apostrophes as shown below:
'A'.
Answer 19
True.
Answer 18
True.
Answer 17
True.
Answer 16
False. With a floating point type, positive exponent values mean that the decimal point should be shifted to the right . Negative exponent values mean that the decimal point should be shifted to the left .
Answer 15
True.
Answer 14
False. Other than type char , there are no unsigned whole-number primitive types in Java.
Answer 13
True.
Answer 12
False. In Java, there are five different whole-number types:
- byte
- short
- int
- long
- char
Answer 11
True.
Answer 10
False. The primitive types are part of the core language.
Answer 9
True.
Answer 8
Four of the possible operations are:
- You can add them together.
- You can subtract one from the other.
- You can multiply one by the other.
- You can divide one by the other.
Answer 7
False. If you have an instance of the byte type, the set of all possible values that you can store in that instance is the set of all thewhole numbers ranging from -128 to +127.
Answer 6
True.
Answer 5
True.
Answer 4
False. In Java, data type boolean conceptually has nothing to do with numeric values, but deals only with the concept of true or false .
Answer 3
True.
Answer 2
False. Some data types such at type int involve whole numbers only (no fractional parts are allowed) .
Answer 1
True.
Miscellaneous
This section contains a variety of miscellaneous information.
- Module name: Jb0150r Review: A Gentle Introduction to Java Data Types
- File: Jb0150r.htm
- Published: 11/21/12
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-