Starting Out with Java: From Control Structures through Data Structures (3rd Edition)
3rd Edition
ISBN: 9780134038179
Author: Tony Gaddis, Godfrey Muganda
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
Chapter 1, Problem 20SA
Program Plan Intro
Compiler:
In
- 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...
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
What is the Java source filename extension, and what is the Java bytecode filename extension?
Answer to each question should be a executable java code, tested and run
You implement each question in a separate .java file.
Assuming you are using the JDK, what command would you type at the operating system command prompt to compile the program LabAssignment.java?
Chapter 1 Solutions
Starting Out with Java: From Control Structures through Data Structures (3rd Edition)
Ch. 1.3 - Why is the computer used by so many different...Ch. 1.3 - List the five major hardware components of a...Ch. 1.3 - Internally, the CPU consists of what two units?Ch. 1.3 - Prob. 1.4CPCh. 1.3 - Prob. 1.5CPCh. 1.3 - Prob. 1.6CPCh. 1.3 - What does the term multitasking mean?Ch. 1.5 - Describe the difference between a key word and a...Ch. 1.5 - Prob. 1.9CPCh. 1.5 - Describe the difference between a program line and...
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 - If you were to look at a machine language program,...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. 10MCCh. 1 - Prob. 11MCCh. 1 - Prob. 12MCCh. 1 - Prob. 13MCCh. 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 - 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. 13SACh. 1 - Prob. 14SACh. 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. 19SACh. 1 - Prob. 20SACh. 1 - Your First Java Program This assignment will help...
Knowledge Booster
Similar questions
- According to the question, both language codes are required. In two languages, C++ and JAVA, write the following code. Please do not copy and paste from other similar questions. Also, the name of the C++ file should be "main.cc" and the name of the Java file should be "Main.java".arrow_forwardI want to write a project about file system operations in javaarrow_forwardPlease answer this question in Java language with a screenshot of the output and .java filearrow_forward
- Describe the actions you take and the tools you need to execute a Java program. What's the difference between a program's source files and bytecode? At each stage, what kinds of mistakes are being looked for?arrow_forward2 ________________is a program that manages the computer hardware a. Operating system b. RAM c. Word d. Memory Just answer without explanation pleasearrow_forwardAnswer the following questions - You must take screen shots of your program and its output. 3. Create Java Program to illustrate the concept of Accessor and Mutator.arrow_forward
- Was there a significant difference between a source code file and an object code file? What is the difference between an executable file (or program) and a program that can be executed?arrow_forwardPlease help me with these two java programs. Don’t make it complex.arrow_forwardWhich of the following steps must be completed for a computer program to be constructed and executed? None of the other choices. All of the other choices (except "None of the other choices") A computer program is loaded from storage device into RAM and the CPU "jumps to" (begins executing) the first instruction A computer program is written in a high-level language and saved as a plain-text file. A computer program is combined with (a.k.a. linked) with other previously written and compiled code the program depends on, called libraries A computer program is compiled into machine instructions in binary codearrow_forward
- What factors go into determining a program's performance? Why compare two separate applications that do the same work on the same computer rather than two distinct computers?arrow_forwardAssume you have a computer with 8 GB of RAM and a program that requires 2 GB of memory to run. If you have three instances of the program running simultaneously, what is the minimum size of the virtual memory required to run all the programs?arrow_forwardPlease solve this java problem from scratch. The text file name can be anything.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781305480537Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781305480537
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning