


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



What is the functionality of a Java Virtual Machine? - correct answer ✅executes a program What will a Java statement end with? - correct answer ✅semi-colon What is the difference between byte code and source code in Java? - correct answer ✅Source code is read by a java compiler, while byte code is produced by a java compiler What is the extension of a Java source file? - correct answer ✅.java What is a program? - correct answer ✅a sequence of instructions a computer follows in order to perform a specific task What is an algorithm? - correct answer ✅a sequence of well-defined logical steps for performing a task or solving a problem What is the difference between character and string literals? - correct answer ✅enclosed in single quotation marks vs. the representation of a string value What is the scope of a variable? - correct answer ✅A variable's scope is the part of the program that has access to the variable What is a constant? - correct answer ✅special kind of variable whose value can NOT be changed after itis initialized
Is Java case sensitive? - correct answer ✅Yes, case sensitivity What is a decision structure? - correct answer ✅An algorithm may require a program to execute some statements only under a certain condition What is the difference between logical OR and logical AND operator? - correct answer ✅Only 1 condition needs to be met, both conditions need to be met What is the meaning of a break statement? - correct answer ✅causes a loop to terminate early What is the meaning of a continue statement? - correct answer ✅causes a loop to stop its current executing iteration and move on to the next iteration How to read data from a file? - correct answer ✅Scanner Class What is the difference between WHILE loop and DO-WHILE loop? - correct answer ✅Ideal in situations where you do not want the loop to iterate if the condition is false from the beginning - Ideal if you want to use a sentinel value to terminate the loop //// Ideal in situations where you always want the loop to iterate at least once Does a do-while loop end with a semicolon? - correct answer ✅yes, do-while loop semi-colon What is the most important feature of Java? - correct answer ✅Platform Independent
What is a sentinel value? - correct answer ✅special value to signal the end of the input list What is an accumulator in a loop? - correct answer ✅a running total