EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
9th Edition
ISBN: 9781337671385
Author: FARRELL
Publisher: CENGAGE LEARNING - CONSIGNMENT
bartleby

Videos

Expert Solution & Answer
Book Icon
Chapter 2, Problem 1RQ
Program Description Answer

After compilation, when a data in the program cannot be changed, then that data is defined as “constant”.

Hence, the correct answer is option “B”.

Expert Solution & Answer
Check Mark

Explanation of Solution

Constant:

The variable is defined as constant variable when the data item cannot be changed while the program is running.

  • Constants are mostly used to define default values.
    • For example: PI has the constant value 3.14.
  • Consider the following statement in a Java class, the number 143 is constant, every time the java application containing the below statement with constant 143 is executed, the value 143 is displayed.

System.out.println(143);

Want to see more full solutions like this?

Subscribe now to access step-by-step solutions to millions of textbook problems written by subject matter experts!
Students have asked these similar questions
Choose correct option                                 It is disadvantageous to use public variables in classes because ___________   It results in compilation error It cannot control its values It cannot be accessed by other variables Its values cannot be initialized
Fill-in-the-Blank A(n)__________ is a special constructor, called whenever a new object is initialized with another object’s data.
Fill-in-the-Blank Creating a class object is often called _____________ the class.
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781305480537
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Memory Management Tutorial in Java | Java Stack vs Heap | Java Training | Edureka; Author: edureka!;https://www.youtube.com/watch?v=fM8yj93X80s;License: Standard YouTube License, CC-BY