CIS 3145 MidTerm Exam Review Questions With

EXAM ELABORATIONS Sep 5, 2025
Loading...

Loading document viewer...

Page 0 of 0

Document Text

CIS 3145 MidTerm Exam Review Questions With Complete Solutions What is the Java Programming Language? - Correct Answer It was released in 1995 as a part of Sun Microsystems' Java platform. The language has developed much of its syntax from C and C++. Java applications are usually compiled to bytecode (class file) that can run on any Java Virtual Machine (JVM). Java is currently one of the most popular programming languages being used.How does the Java language compare to other languages? - Correct Answer Java was made so its applications can be run on any computer platform without needing to be compiled for each platform.Designed to automatically handle many operations involving the allocation and de-allocation of memory.How is a Java application compiled? - Correct Answer The java compiler compiles the source code into a format known as Java Byte-codes, those byte-codes can be run on any platform that has a Java Runtime Environment or JRE. Than using a JVM (Java Virtual Machine) it translates the Bytecodes into native code that can be understood.What is the IDE? - Correct Answer Integrated Development Environment. Provides features that can make developing Java applications considerably easier. These code developers include Netbeans, Eclipse, and Android Studio.How does Netbeans Work? - Correct Answer **CHAPTER 2** - Correct Answer How do you write code to create Class? - Correct Answer public class NumberGameApp; What code creates main method? - Correct Answer public static void main(String[]args) { } What code creates a statement - Correct Answer package murach.test; What code creates a java comment - Correct Answer // single line comment 1 / 3

What is an identifier in the Java language? - Correct Answer In Java programming language, an identifier is a name given to a variable, class or method. Identifiers start with a letter, underscore(_) or dollar sign ($).What are the rules for naming a class? Recommendations? - Correct Answer Common coding convention is to start the class name and every word within that name with a capital letter. Letters and Digits only.

Examples: CodeTesterApp, NumberGuessingGame, and StudentClass

What are the rules and recommendations for naming variables? - Correct Answer All variables have to be initialized with the fist letter of the first word lowercase and any word after that with no space and capitalized. Also, avoid abbreviations

Example: newCust, productPrice, maxQuantity

What is the syntax for declaring a primitive variable? - Correct Answer There are eight primitive data types that are used for storing values in memory.boolean char byte float void short double int long Int and double are the two most common.What is an assignment statement and how is it used with arithmetic expressions? - Correct Answer An assignment statement assigns a value to a variable that is already declared. This value can be a literal value, another variable, or an expression.How is a string variable different from primitive variables? - Correct Answer Primitive types are the basic types of data 2 / 3

byte, short, int, long, float, double, boolean, char primitive variables store primitive values reference types are any instantiable class as well as arrays String, Scanner, Random, Die, int[], String[], etc.reference variables store addresses What objects are used to get input and send output to the console? - Correct Answer Getting input int number = Integer.parseInt( input ); Sending output System.out.println("Output to console") **CHAPTER 3** - Correct Answer What code is used to create a class? - Correct Answer java.lang.String java.lang.Integer java.lang.Double java.util.Scanner java.text.NumberFormat What code is used to create an object? - Correct Answer new ClassName(arguments); When creating an object, you are creating an instance of the class. Then, use the methods of the class by calling them from the object.What are methods? - Correct Answer A method is a block of code that preforms an action. A method typically returns a value or object that you can assign to a variable.What is a static method? - Correct Answer A static method, similar to regular methods, but you can call them directly from the class without creating an object from the class.

  • / 3

Download Document

Buy This Document

$30.00 One-time purchase
Buy Now
  • Full access to this document
  • Download anytime
  • No expiration

Document Information

Category: EXAM ELABORATIONS
Added: Sep 5, 2025
Description:

CIS 3145 MidTerm Exam Review Questions With Complete Solutions What is the Java Programming Language? - Correct Answer It was released in 1995 as a part of Sun Microsystems' Java platform. The lang...

Get this document $30.00