



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
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Java Programming Exam 1 Question & Answers ( Latest 2025 )
Typology: Exams
1 / 5
This page cannot be seen from the preview
Don't miss anything!
Type - CORRECT ANSWER ✅determines the kind of values that a variable can hold and what operations can be applied to it Computer System - CORRECT ANSWER ✅The combination of the hardware and software Hardware - CORRECT ANSWER ✅The physical components of a computer system Software - CORRECT ANSWER ✅The instructions in a computer system that tells the hardware what to do Processor (CPU) - CORRECT ANSWER ✅Interprets and executes instructions in a computer system Memory - CORRECT ANSWER ✅Holds data and instructions in a computer system Program - CORRECT ANSWER ✅A set of instructions for a computer to follow
Source code - CORRECT ANSWER ✅A program written in a high-level language Compiler - CORRECT ANSWER ✅A program that translates source code into machine code Algorithm - CORRECT ANSWER ✅A set of instructions (steps) for solving a problem. Syntax - CORRECT ANSWER ✅A set of rules that describe the correct way to write sentences in the language Syntax Error - CORRECT ANSWER ✅Violation of language's syntax rules, e.g., misspelling a word, forgetting a ;, etc. Caught by the compiler Runtime Error - CORRECT ANSWER ✅Execution error, e.g., division by zero Logical Error - CORRECT ANSWER ✅An error that occurs when the program compiles and runs without runtime errors, but does not do what it is supposed to.
Statement - CORRECT ANSWER ✅A call to a method that does not return a value Function - CORRECT ANSWER ✅A call to a method that returns a value charAt(int pos) - CORRECT ANSWER ✅(IC) returns the character at position pos in the given string substring(int start, int end) - CORRECT ANSWER ✅(IC) returns the string starting at position start and ending at position (end-1) in the given string indexOf(String aString) - CORRECT ANSWER ✅(IC) returns the position of the first occurrence of string aString in the given string (or -1 if not found) equals(String aString) - CORRECT ANSWER ✅(IC) returns true if the string aString is the same as the given string, false otherwise Comment - CORRECT ANSWER ✅text in a program that the compiler ignores
== - CORRECT ANSWER ✅(IC) equals != - CORRECT ANSWER ✅(IC) Not equal to
- CORRECT ANSWER ✅(IC) Greater than < - CORRECT ANSWER ✅(IC) Less than = - CORRECT ANSWER ✅(IC) Greater than or equal to <= - CORRECT ANSWER ✅(IC) Less than or equal to && - CORRECT ANSWER ✅(IC) And || - CORRECT ANSWER ✅(IC) Or ! - CORRECT ANSWER ✅(IC) Not