The Correct option here is
b) Finding all logic errors
Reason:
A java compiler can't find all logic errors in the code because the logic of the code can't be known by the compiler as it is not preprogrammed to the compiler.
The logic errors will not lead to stop the program but they will change the expected output by the compiler.
Java compiler can find all syntax errors , check the type of the parameters and also can generate machine code. But the java compiler can't find all logic errors in the code
So the correct option here is "b"
Which of the following is NOT likely to be done by a Java compiler? Finding all...
Q1: Which of the following is a double-selection control statement? do…while for if…else if. Q2: Which of the following is not a Java keyword? do next while for Q3: What is output by the following Java code segment? int temp; temp = 200; if ( temp > 90 ) System.out.println( "This porridge is too hot." ); if ( temp < 70 ) System.out.println( "This porridge is too cold." ); if ( temp == 80 ) System.out.println( "This...
Comments used to document code should: A. be used as little as possible B. be insightful and explain what the instruction's intention is C. only be included in code that is difficult to understand D. be used to define variables whose names are not easy to understand E. not be included with the program 2 points QUESTION 2 The main method for a Java program is defined by: A. public static main( ) B. public static main(String[ ] args);...
Write a JAVA program to read a list of nonnegative integers and to display the largest integer, the smallest integer and the average of all the integers. The user indicates the end of the input by entering a negative sentinel value that is not used in finding the largest, smallest and average values. The average should be a value of type double so that it is computed a fractional part. * Java program free from syntax, logic and run time...
Somebody help my assignment! CS21, Java -Chapter 1 Quiz –MCTF Know the definitions of the following: •Compiler •Bytecode •Console Window •Syntax Error •Logic Error •Runtime Error Know the rules that apply to string literals Know if the name of a Java file and the name of a Java class have to be the same Know if methods other than main are allowed to call other methods Know where the flow of control goes when a method finishes executing Know what...
Java 1. Each of the following files in the Chapter11 folder of your downloadable student files has syntax and/or logic errors. In each case, determine the problem and fix the program. After you correct the errors, save each file using the same filename preceded with Fix. For example, DebugEleven1.java will become FixDebugEleven1.java. a. DebugEleven1.java b. DebugEleven2.java c. DebugEleven3.java d. DebugEleven4.java e. Three other Debug files in the Chapter11 folder
java 4. Java allows for the use of generic typing to do away with all type checking of parameters to methods. TRUE OR FALSE ? 5 How many interfaces can a class implement? 6.When a programmer writes a class definition to implement an interface, he/she must write the method body for at least one of the method headings specified in the interface TRUE OR FALSE? 7. Declaring a formal parameter's type as T is the same thing as declaring the...
1. What does a Java compiler do? Select one: a. Runs Java programs b. Translates byte code in ".class" files into machine language c. Translates source code in ".class" files into machine language d. Translates source code in ".java" files into Java byte code in ".class" files e. Translates source code in ".java" files into machine language 2. A subclass will _____ one superclass. Select one: a. abstract b. extend c. implement d. inherit e. override 3. Consider the following...
Using PuTTY Linux Server Task Compiling: 1) Download the two files from blackboard, driver.cpp, and circle.h 2) Create a new directory to store the files in 3) Compile the code a) Run the command g++ driver.cpp -o executable_name, this will compile the code both for driver.cpp and the referenced file circle.h note: -o parameter specifies a new name for the executable, if you do not specify the “-o” parameter the default name of the executable is “a.out”...
11. A _____________ error does not cause the compiler to generate an error, but does cause the program to produce incorrect results. Syntax, logic, variable name, function name 12. A syntax error occurs when the programmer violates one or more grammar rules of the C language. True or False 13. Given this line of code: y = sqrt(x); x would be known as the argument. True or False 14. A void function does not return a value to the...
Code a Java program to create and use OO classes. Comment your code throughout. Create a Super class named Home Properties address SF (this is the number of Square feet) value (this is the dollar value of the home) Methods Set and get methods for all properties calcValue() - calculate the value as sf * 400 displayCondo() - displays all properties of a condo Create a sub class named Condo Properties HOAfee (home owners association fee) Methods Set and get...