Starting Out with Java: From Control Structures through Objects (6th Edition)
Starting Out with Java: From Control Structures through Objects (6th Edition)
6th Edition
ISBN: 9780133957051
Author: Tony Gaddis
Publisher: PEARSON
Question
Book Icon
Chapter 1, Problem 22SA
Program Plan Intro

Compiler:

In programming language, “compiler” is the first phase. The complier translates the source code into suitable machine code.

  • Complier completely reads the program once and compiles the entire code.
  • The complier displays all warnings and errors.
  • If the program does not contain any error, the source code will be translated into byte code.
  • Java Compiler is the tool, which is used to compile Java programs, and the command that is used for compilation is “javac”.

Explanation of Solution

b. Contents of the file:

The compiler translates the Java source code into byte code. The extension of Java source code program is “.java” and the extension of java byte code program is “.class”...

Explanation of Solution

c. Run the program:

The compiler translates the Java source code into byte code. The extension of Java source code program is “.java” and the extension of java byte code program is “.class”.

Java Bytecode program runs on any machine that has a JVM (Java Virtual Machine) interpreter.

  • The JVM (Java Virtual Machine) interpreter is designed to execute the bytecode program produced by the compiler...

Blurred answer
Students have asked these similar questions
Please answer this question in Java language  with a screenshot of the output and .java file
JAVA Using a text editor write a "Hello World" program in Java. This should produce a .java text file containing your source code. Using the command line in a terminal window, navigate to the directory where your program is stored. Display a listing of the contents where your program is stored. Capture a screen shot of the terminal window showing the listing of your program. Using the command line in a terminal window, compile your program. Using the command line in a terminal window, display the files in the directory showing the .class file created from a successful compile. Capture a screen shot of the terminal window showing the .class file. Using the command line in a terminal window, run your program. Capture a screen shot of the terminal window showing the successful run of your program.
Explain completely with comments inside the code.Thanks in advance

Chapter 1 Solutions

Starting Out with Java: From Control Structures through Objects (6th Edition)

Ch. 1.5 - Prob. 1.11CPCh. 1.5 - What happens to a variables current contents when...Ch. 1.5 - What is a compiler?Ch. 1.5 - Prob. 1.14CPCh. 1.5 - What is byte code?Ch. 1.5 - Prob. 1.16CPCh. 1.6 - What four items should you identify when defining...Ch. 1.6 - Prob. 1.18CPCh. 1.6 - What is pseudocode?Ch. 1.6 - Describe what a compiler does with a programs...Ch. 1.6 - Prob. 1.21CPCh. 1.6 - Is a syntax error (such as misspelling a key word)...Ch. 1.6 - What is the purpose of testing a program with...Ch. 1.7 - Prob. 1.24CPCh. 1.7 - Prob. 1.25CPCh. 1.7 - Prob. 1.26CPCh. 1.7 - Prob. 1.27CPCh. 1.7 - Prob. 1.28CPCh. 1 - Prob. 1MCCh. 1 - A byte is made up of eight a. CPUs b. addresses c....Ch. 1 - Each byte is assigned a unique a. address b. CPU...Ch. 1 - Prob. 4MCCh. 1 - Prob. 5MCCh. 1 - 6. This type of program is designed to be...Ch. 1 - These are words that have a special meaning in the...Ch. 1 - These are symbols or words that perform operations...Ch. 1 - These characters serve specific purposes, such as...Ch. 1 - These are words or names that are used to identify...Ch. 1 - Prob. 11MCCh. 1 - Prob. 12MCCh. 1 - Prob. 13MCCh. 1 - Prob. 14MCCh. 1 - The following pseudocode algorithm has an error....Ch. 1 - Available Credit A program that calculates a...Ch. 1 - Sales Tax A program that calculates the total of a...Ch. 1 - Account Balance A program that calculates the...Ch. 1 - The variable x starts with the value 0. The...Ch. 1 - The variable a starts with the value 10. The...Ch. 1 - Prob. 1SACh. 1 - Prob. 2SACh. 1 - What is the difference between operating system...Ch. 1 - Why must programs written in a high-level language...Ch. 1 - Why is it easier to write a program in a...Ch. 1 - What is a source file?Ch. 1 - Prob. 7SACh. 1 - What is an algorithm?Ch. 1 - What is a compiler?Ch. 1 - Prob. 10SACh. 1 - Prob. 11SACh. 1 - What must a computer have in order for it to...Ch. 1 - What is the difference between machine language...Ch. 1 - Why does byte code make Java a portable language?Ch. 1 - Prob. 15SACh. 1 - Prob. 16SACh. 1 - What part of an object forms an interface through...Ch. 1 - What type of program do you use to write Java...Ch. 1 - Will the Java compiler translate a source file...Ch. 1 - What does the Java compiler translate Java source...Ch. 1 - Prob. 21SACh. 1 - Prob. 22SACh. 1 - Your First Java Program This assignment will help...
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781305480537
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage