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

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