







Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
JAVA PROGRAMMING TENTH EDITION EXAM PAPER 2026 VERIFIED ANSWERS FULL PROGRAMMING CONCEPTS STUDY GUIDE REVISION MODULE
Typology: Exams
1 / 13
This page cannot be seen from the preview
Don't miss anything!








โ Which of the following lines is not a Java comment? A. /** comments / B. // comments C. -- comments D. / comments */ E. ** comments ** Answer: C. -- comments E. ** comments ** โ Which of the following are the reserved words? A. public B. static C. void D. class Answer: A. public B. static
C. void D. class โ Every statement in Java ends with ________. A. a semicolon (;) B. a comma (,) C. a period (.) D. an asterisk (*) Answer: A. a semicolon (;) โ A block is enclosed inside __________. A. parentheses B. braces C. brackets D. quotes Answer: B. braces โ Programming style is important, because ______________. A. a program may not compile if it has a bad style B. good programming style can make a program run faster C. good programming style makes a program more readable D. good programming style helps reduce programming errors
Answer: D. Both I and II can compile and run and display Welcome to Java, but the code in I has a better style than II. โ Which of the following code has the best style? I: public class Test { public static void main(String[] args) { System.out.println("Welcome to Java!"); } } II: public class Test { public static void main(String[] args) { System.out.println("Welcome to Java!"); } } III: public class Test { public static void main(String[] args) {
System.out.println("Welcome to Java!"); } } IV: public class Test { public static void main(String[] args) { System.out.println("Welcome to Java!"); } } A. I B. II C. III D. IV Answer: D. IV โ If a program compiles fine, but it produces incorrect result, then the program suffers __________. A. a compilation error B. a runtime error C. a logic error Answer: C. a logic error
access memory. It is called RAM because a memory cell can be accessed directly. โ What unit is used to measure memory size? What unit is used to measure disk size? Answer: Memory size is measured in bytes. Disk size is measured in bytes. โ What is the primary difference between memory and a storage device? Answer: Memory is volatile, because information is lost when the power is turned off. Programs and data are permanently stored on storage devices and are moved, when the computer actually uses them, to memory, which is much faster than storage devices. โ What language does the CPU understand? Answer: The machine language is a set of primitive instructions built into every computer. This is the language understood by a computer and executed by a computer. โ What is an assembly language? What is an assembler? Answer: Assembly language is a low-level programming language in which a mnemonic is used to represent each of the machine language instructions.
Assembler is a software that translates assembly language into machine language. โ What is a high-level programming language? What is a source program? Answer: The high-level languages are English-like and easy to learn and program. The program written in a programming language is called a source program. โ What is an interpreter? What is a compiler? Answer: An interpreter is a software that reads one statement from the source code, translates it to the machine code or virtual machine code, and then executes it right away. A compiler is a software that translates a program in high-level language into machine language code. โ What is the difference between an interpreted language and a compiled language? Answer: What is the difference between an interpreted language and a compiled language? An interpreter reads one statement from the source code, and translates it to the machine code or virtual machine code, and then executes it right away. A compiler translates the entire source code into a machine code file, and the machine code file is then executed.
Answer: Multiprocessing, or parallel processing, uses two or more processors together to perform a task. โ Who invented Java? Which company owns Java now? Answer: Java was invented by a team led by James Gosling at Sun Microsystems in 1991. Originally called Oak, it became Java in 1995 when it was redesigned for developing Internet applications. Oracle bought Sun and Oracle now owns Java. โ What is a Java applet? Answer: Java applet is a special program that runs from a Web browser. Due to security reasons, applets are no longer allowed to run from Web browsers. โ What programming language does Android use? Answer: Android uses the Java programming language. โ What is the Java language specification? Answer: The Java language specification specifies the syntax for the Java language. โ What does JDK stand for? What does JRE stand for? Answer: JDK stands for Java Development Toolkit. JRE stands for Java Runtime Environment.
โ What does IDE stand for? Answer: IDE stands integrated development environment. โ Are tools like NetBeans and Eclipse different languages from Java, or are they dialects or extensions of Java? Answer: NetBeans and Eclipse are not programming languages, nor dialects, nor extensions of Java. They are Java development tools. โ What is a keyword? List some Java keywords. Answer: Keywords have specific meaning to the compiler and cannot be used for other purposes in the program such as variables or method names. Examples of keywords are class, static, and void. โ Is Java case sensitive? What is the case for Java keywords? Answer: Java source code is case sensitive. Java keywords are always in lowercase. โ What is a comment? Is the comment ignored by the compiler? How do you denote a comment line and a comment paragraph? Answer: Comments are used to document what a program is for and how a program is constructed. Comments help the programmers or users to communicate and understand the program. Comments are not programming statements and are ignored by the compiler. In
โ What are the input and output of a Java compiler? Answer: The input of a Java compiler is a Java source code file and the output is a Java class file.