<< 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

The similarities and difference between the definition of prof Lionel Robbins and prof Paul ; A; Samuel son, each 5 definition
prince Reply
What are the basic concepts of economic
Taye Reply
With the aid of appropriate diagram differentiate between change in demand
Jones Reply
explain demand
Alaka Reply
Demand is a quantity of goods and services a consumer is willing to buy at given price in a period of time.
Aliado
who break in bulk
Alaka
what is demands and it law
matthew Reply
Demands, is the quantity of agoods a consumer is willing to buy at given price in a give period of time where as the law of demand states that, the higher the price, the lower the quantity demanded and the lower the price, the higher the quantity demanded by consumers
Aliado
what is division of labour
Sunday Reply
The similarities and difference between the definition of prof Lionel Robbins and prof Paul ; A; Samuel son, each 5 definition
prince
Demand is set to be enlastic when its what
bohvy Reply
more than boll had him had bhaag......
SHADAB
Cant you speak in English
john
a little
Tith
I do speak English.. the question is Demand is set to be elasticity went the dash *2
bohvy
if I want some document from,that 9k?
Tith
hi
muhammed
if both %^ Increase in input & %^ increase in output, then it is elastic and = to 1.
Rowda
Allah's Allah's last I'll be in the area around.....
SHADAB
Hy guyz
Vuyai
Hi
john
How are you all doing rumies
john
why is scarcity a fundamental problem in economic
Abubakar Reply
what is demand curve
Takyi Reply
xplain
Ubong
thanks for your help with the same....
SHADAB
What is elasticity of demand
Karim
what is unemployment
Alaka
what is opportunity cost
Samuel Reply
Opportunity cost which also mean real cost it is a term used for foregone alternatives
john
what is demand
ikea Reply
Demand may simply be define as the total quantity of good or service a consumer are willing to buy at a specific price within a period of time.
john
your language is tough
techy Reply
How economics is related to other subjects?
Mikateko Reply
It is social science related subjects
john
How ? explain
Mikateko
and something else help me about business cycle
Mikateko
s classified as a social science. This view makes eco­nomics an academic relative of political science, sociology, psychology and anthropology. All of these disciplines study the behaviour of human beings individually and in groups.
john
The business cycle describes the rise and fall in production output of goods and services in an economy. Business cycles are generally measured using the rise and fall in the real gross domestic product (GDP) or the GDP.
john
hello everyone
Selena
hii
Yes
hello selena
Yes
How are you doing every one
john
hello Selena
Yes
hi
NONSO
yes
NONSO
What Is Economic Growth?
Saviour Reply
is the increase of quantity of goods ans services
Hashi
what is economic
Yomina Reply
Economic may be define as the science which studies human behaviour in relationship with end and scarce which have alternative use. This definition was drafted by Lionel robbin
john
good
Tith
it is science of wealth.
SHADAB
if I want some documents from you ,Are you ok?
Tith
it is not only wealth as well as welfare also.as well as scarce means of ends,for human satisfaction for alternative uses.
Avijit
economics applications
techy
A soccer field is a rectangle 130 meters wide and 110 meters long. The coach asks players to run from one corner to the other corner diagonally across. What is that distance, to the nearest tenths place.
Kimberly Reply
Jeannette has $5 and $10 bills in her wallet. The number of fives is three more than six times the number of tens. Let t represent the number of tens. Write an expression for the number of fives.
August Reply
What is the expressiin for seven less than four times the number of nickels
Leonardo Reply
How do i figure this problem out.
how do you translate this in Algebraic Expressions
linda Reply
why surface tension is zero at critical temperature
Shanjida
I think if critical temperature denote high temperature then a liquid stats boils that time the water stats to evaporate so some moles of h2o to up and due to high temp the bonding break they have low density so it can be a reason
s.
Need to simplify the expresin. 3/7 (x+y)-1/7 (x-1)=
Crystal Reply
. After 3 months on a diet, Lisa had lost 12% of her original weight. She lost 21 pounds. What was Lisa's original weight?
Chris Reply
Difference between extinct and extici spicies
Amanpreet 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